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

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

Re: buffer-local mail-envelope-from


From: Simon Josefsson
Subject: Re: buffer-local mail-envelope-from
Date: Thu, 27 Dec 2001 21:07:43 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

"Golubev I. N." <gin@mo.msk.ru> writes:

> Newer versions of `sendmail.el' from emacs-21.1 or mail-lib-1.40
> allows to specify sendmail program `-f' option argument using
> `mail-envelope-from' user variable (why this variable is declared
> boolean while it is a string?).

It is a bug.  I have sent in a patch but it was rejected because it
contained controversial modifications as well.  Thanks for pointing
this out.

> But setting buffer-local value of that variable in sendmail-mode
> buffer will not affect message sending since it will not affect
> sendmail program option list creation which occurs in a temporary
> buffer (tembuf) with default values of all buffer-local variables.
>
> An ideal solution would be copying *all* buffer-local variables from
> sendmail-mode buffer to tembuf.  Unless that is done, one has to
> create temporary variable bindings like this.

Thanks for the patch.  I'm not sure copying all buffer-local variables
to tempbuf is better, wouldn't it open up for "problematic" local
variables such as `enable-multibyte-characters' etc?  Of course
sendmail.el could reset all such "problematic" local variables to the
value sendmail.el wants, but this might cause other problems.

Can someone commit the below?

2001-12-27  Simon Josefsson  <jas@extundo.com>

        * mail/sendmail.el (mail-envelope-from): Fix :type.  Suggested by
        "Golubev I. N." <gin@mo.msk.ru>.
        (sendmail-send-it): Copy `mail-envelope-from' from calling buffer.
        From "Golubev I. N." <gin@mo.msk.ru>.

--- sendmail.el.~1.245.~        Thu Dec 27 21:04:33 2001
+++ sendmail.el Thu Dec 27 21:04:52 2001
@@ -81,7 +81,8 @@
 If this is nil while `mail-specify-envelope-from' is non-nil, the
 content of `user-mail-address' is used."
   :version "21.1"
-  :type 'boolean
+  :type '(choice (const :tag "Use `user-mail-address'" nil)
+                string)
   :group 'sendmail)
 
 ;;;###autoload
@@ -796,7 +797,8 @@
        (mailbuf (current-buffer))
        (program (if (boundp 'sendmail-program)
                     sendmail-program
-                  "/usr/lib/sendmail")))
+                  "/usr/lib/sendmail"))
+       (mail-envelope-from mail-envelope-from))
     (unwind-protect
        (save-excursion
          (set-buffer tembuf)




reply via email to

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