bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling of default value of message-dont-reply-to-names should respect


From: Niels Möller
Subject: Handling of default value of message-dont-reply-to-names should respect the user-mail-address setting
Date: 06 Jul 2006 12:43:46 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

I have the login name "nisse", user-mail-address set to
"address@hidden", and message-dont-reply-to-names set to the default
value, nil.

According to the documentation string for message-dont-reply-to-names,
"A value of nil means exclude your own name only.". This doesn't work
for me, when I use gnus-summary-followup in a Gnus *Summary*-buffer,
my own email address is added to the Cc:-header of the reply.

A little digging reveals that the function message-get-reply-headers
in message.el calls rmail-dont-reply-to to do the work,

          (let ((rmail-dont-reply-to-names message-dont-reply-to-names))
            (insert (prog1 (rmail-dont-reply-to (buffer-string))
                      (erase-buffer))))

Next, rmail-dont-reply-to, in mail-utils.el, handles the default
behavior (rmail-dont-reply-to-names nil) as follows:

  (if (null rmail-dont-reply-to-names)
      (setq rmail-dont-reply-to-names
            (concat (if rmail-default-dont-reply-to-names
                        (concat rmail-default-dont-reply-to-names "\\|")
                        "")
                    (concat (regexp-quote (user-login-name))
                            "\\>"))))

That is, it uses (user-login-name), which returns "nisse".
I see two problems with this:

  1. It means that if mail address and local user name doesn't match
     (that's the problem in my case), setting user-mail-address is not
     sufficient configuration to make emacs to do the right thing. I
     need to set message-dont-reply-to-names too.

  2. As far as I can see, one can get false positives. Say
     address@hidden sends email to a mailing list that address@hidden is
     subscribed to. address@hidden wants to make a wide reply both to
     the sender and to the list. Then the sender's address will be
     removed, just because the two different persons use mail
     addresses based on the same local login name, each within his or
     her own domain.

I think the sanest way to remove addresses would be to match on
the email addresses only, including the host part, but excluding any
human name that precede <address@hidden>, and also excluding any
RFC 2822 comments.

Regards,
/Niels

Version information (from M-x report-emacs-bug):

In GNU Emacs 21.4.1 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2005-03-17 on trouble, modified by Debian
configured using `configure '--build=i386-linux' '--host=i386-linux' 
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' 
'--localstatedir=/var/lib' '--infodir=/usr/share/info' 
'--mandir=/usr/share/man' '--with-pop=yes' '--with-x=yes' 
'--with-x-toolkit=athena' 'CFLAGS=-DDEBIAN -g -O2' 'build_alias=i386-linux' 
'host_alias=i386-linux''
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t




reply via email to

[Prev in Thread] Current Thread [Next in Thread]