Subject: 24.5; Emacs sometimes inserts superfluous ">" when sending e-mails

From: Markus Triska <[email-masked]>
Date: Wed, 08 Jun 2016 22:57:07 +0200

Hi all,

please bear with me. For the first time, I do not have a recipe starting
from emacs -Q. I am trying to narrow down a mistake in Emacs that occurs
extremely rarely, when sending e-mails. In short, the mistake is that
Emacs, under very specific conditions, seems to insert a superfluous ">"
(greater than) character into e-mails before they are sent.

I first noticed the problem in 2008 when reporting two issues:

https://lists.gnu.org/archive/html/bug-gnu-emacs/2008-09/msg00606.html
https://lists.gnu.org/archive/html/bug-gnu-emacs/2008-12/msg00687.html

Please note the characteristic superfluous ">" in front of "From" in
both of these mails. I do not mean in the "From:" header, but within the
actual text of both mails, in particular:

 *) ">From machine B..."
 *) ">From OSX 10.4..."

I am 100% certain that I did not enter these ">" characters.

This issue has also happened to other users:

Example 1 (">From the documentation"):

    https://lists.gnu.org/archive/html/bug-gnu-emacs/2003-03/msg00013.html

Example 2 (">From man page"):

    https://lists.gnu.org/archive/html/bug-gnu-emacs/2013-09/msg00108.html

To find examples of this issue, I have analyzed 116 thousand messages
that were posted to the GNU Emacs bug tracker from 2002 to 2016.

Of these messages, I have restricted the search to those messages that
contained the regexp "User-Agent.*Gnus". There were 35 thousand such
messages. I have done this to limit the search to those messages that
were most likely really sent from within Emacs. There are several
further occurrences of the issue, but I could not tell with such
certainty whether those messages were sent with Emacs itself.

Interestingly this seems to happen only when "From" is used somewhere in
the mail, at the beginning of a line. Then, sometimes Emacs simply turns
"From" to ">From".

And it even gets somewhat stranger: In my ~/Mail/sent file, I have one
more occurrence of the issue:

  ">From what I understand..."

which arose when I posted (Wed, 21 Oct 2015 01:47:22 +0200) to:

   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21526

but in fact the superfluous ">" does not occur in the message as it is
shown in the tracker. Again, I am 100% certain that I did not manually
enter the ">" in front of "From", yet it appears in ~/Mail/sent.

At this point, it would already be extremely helpful to me if someone
could say "Yes, I also noticed this at some point in time."

If it helps, the value of my mail-user-agent is: message-user-agent,
and send-mail-function is: sendmail-send-it.

Thank you and all the best!
Markus

In GNU Emacs 24.5.1 (x86_64-apple-darwin15.5.0, X toolkit, Xaw scroll bars)
 of 2016-05-30 on mt-imac
Windowing system distributor `The X.Org Foundation', version 11.0.11502000
Configured using:
 `configure --prefix=/opt/local --without-dbus --without-gconf
 --without-libotf --without-m17n-flt --without-gpm --without-gnutls
 --with-xml2 --infodir /opt/local/share/info/emacs
 --with-x-toolkit=lucid --without-xaw3d --without-imagemagick --with-xpm
 --with-jpeg --with-tiff --with-gif --with-png --without-rsvg --with-xft
 'CFLAGS=-pipe -Os -arch x86_64' CPPFLAGS=-I/opt/local/include
 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -lfreetype
 -lfontconfig -Wl,-no_pie -arch x86_64''