VM

Incorrect inclusion of multiline headers

Bug #777570 reported by Wojciech Komornicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Invalid
Undecided
Uday Reddy

Bug Description

Using: vm-8.1.1
Debug trace:
Debugger entered--Lisp error: (error "Invalid header line (maybe a continuation line lacks initial whitespace)")
  signal(error ("Invalid header line (maybe a continuation line lacks initial whitespace)"))
  error("Invalid header line (maybe a continuation line lacks initial whitespace)")
  mail-send()
  vm-mail-send()
  vm-mail-send-and-exit(nil)
  call-interactively(vm-mail-send-and-exit nil nil)
Reproduce: To reproduce you need a message from a mailer which does not format its headers correctly.

Some mailers include multiline headers without a space character indicate continuation of the header. For example
    References: <xxxxxxxxxxxxxxxx>
    <xxxxxxxxxxx>
The second line should be indented preferrably be a tab.
I suggest (I am not an expert on mail syntax) the following in vm-mail-mode-show-headers
   (save-excursion
    (goto-char (point-min))
    (while (not (looking-at "--text follows"))
      (forward-line 1)
      (if (looking-at "<")
 (insert-char 9 1))
I have modiffied the code in my implementation to fix the annoying message of invalid headers.

Revision history for this message
Uday Reddy (reddyuday) wrote : Re: [Bug 777570] [NEW] Incorrect inclusion of multiline headers

Wojciech Komornicki writes:

> Reproduce: To reproduce you need a message from a mailer which does not
> format its headers correctly.

Hi,

The error you are getting is in mail-send, which is dealing with the message
you have composed. What does this have to do with other mailers?

In any case, I would need to have a sample message composition that produces
the problem.

Also, please let me know what happens if you run VM with all its default
settings.

Cheers,
Uday

Revision history for this message
Wojciech Komornicki (wnk) wrote :
Download full text (3.5 KiB)

Uday,
    Thanks for getting back to me and sorry for not being clear and not debugging my
    situation more thoroughly.

    The situation occurs when I reply to someone's mail message. Their "References:"
    headers are included but the continuation lines do not start with whitespace. When I
    do not include my .emacs file nor the system startup file I do not get the error
    mentioned below. I will slowly add various packages and see which is the offending
    package that causes the error.

    For know remove the bug report. Mea culpa.
--
Wojciech Komornicki Dept of Mathematics
wnk at hamline.edu Hamline University
http://wnk.hamline.edu/~wnk/ St Paul, MN 55104
                                                                                      USA

The goal of collegiate mathematics is the understanding of mathematical ideas per se. The
role of applications is to enhance that understanding and not vice versa.
                                                                         Saunders MacLane

>>>>> "Uday" == Uday Reddy <email address hidden> writes:

  Uday:> Wojciech Komornicki writes:
  Uday:> > Reproduce: To reproduce you need a message from a mailer which does not
  Uday:> > format its headers correctly.

  Uday:> Hi,

  Uday:> The error you are getting is in mail-send, which is dealing with the message
  Uday:> you have composed. What does this have to do with other mailers?

  Uday:> In any case, I would need to have a sample message composition that produces
  Uday:> the problem.

  Uday:> Also, please let me know what happens if you run VM with all its default
  Uday:> settings.

  Uday:> Cheers,
  Uday:> Uday

  Uday:> --
  Uday:> You received this bug notification because you are a direct subscriber
  Uday:> of the bug.
  Uday:> https://bugs.launchpad.net/bugs/777570

  wnk:> Title:
  wnk:> Incorrect inclusion of multiline headers

  wnk:> Status in VM (View Mail) for Emacs:
  wnk:> New

  wnk:> Bug description:
  wnk:> Using: vm-8.1.1
  wnk:> Debug trace:
  wnk:> Debugger entered--Lisp error: (error "Invalid header line (maybe a continuation line lacks initial whitespace)")
  wnk:> signal(error ("Invalid header line (maybe a continuation line lacks initial whitespace)"))
  wnk:> error("Invalid header line (maybe a continuation line lacks initial whitespace)")
  wnk:> mail-send()
  wnk:> vm-mail-send()
  wnk:> vm-mail-send-and-exit(nil)
  wnk:> call-interactively(vm-mail-send-and-exit nil nil)
  wnk:> Reproduce: To reproduce you need a message from a mailer which does not format its headers correctly.

  wnk:> Some mailers include multiline headers without a space character indicate continuation of the header. For example
  wnk:> References: <xxxxxxxxxxxxxxxx>
  wnk:> <xxxxxxxxxxx>
  wnk:> The second line should be indented preferrably be a tab.
  wnk:> I suggest (I am not an expert on mail syntax) the following in vm-mail-mode-show-headers
  wnk:> (save-excursion
  wnk:> (goto-char (point-min))
  w...

Read more...

Revision history for this message
Uday Reddy (reddyuday) wrote :

Please check to see if you have changed vm-mail-mode-hidden-headers, in particular.

Cheers,
Uday

Revision history for this message
Wojciech Komornicki (wnk) wrote : [Bug 777570] Re: Incorrect inclusion of multiline headers

I think I have tracked down my bug and it is a bug I introduced in my .vm file. Since I
use supercite, the indentation provided by supercite does not work well with tabs. Hence
I have a hook which untabifies a buffer before it is passed to supercite. Unfortunately,
I did not realize that my hook also untabified the headers.

I hope that makes sense.
--
Wojciech Komornicki Dept of Mathematics
wnk at hamline.edu Hamline University
http://wnk.hamline.edu/~wnk/ St Paul, MN 55104
                                                                                      USA

The goal of collegiate mathematics is the understanding of mathematical ideas per se. The
role of applications is to enhance that understanding and not vice versa.
                                                                         Saunders MacLane

>>>>> "Uday" == Uday Reddy <email address hidden> writes:

  Uday:> Please check to see if you have changed vm-mail-mode-hidden-headers, in
  Uday:> particular.

  Uday:> Cheers,
  Uday:> Uday

Revision history for this message
Uday Reddy (reddyuday) wrote :

Ok, well done! I am closing the bug report now.

Cheers,
Uday

Changed in vm:
status: New → Invalid
milestone: none → 8.2.0a
assignee: nobody → Uday Reddy (reddyuday)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.