🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #88075

bug in rmail-resend

#88075
From: Bruno.Verlyck
Date: Mon, 08 Aug 1994 23:13
69 lines
3133 bytes
In GNU Emacs 19.25.2 of Mon Jun  6 1994 on yakima (sparc-sunos4.1.3)

When you resend a message with rmail-resend prior to any other mail sending,
you get:

Symbol's value as variable is void: mail-alias-file

A dribble file:

xrmail<return>xrmail-resend<return>bruno<return>^Xbruno^Ntest^C^C

(I have replaced control-chars by ^char; BTW, the output of open-dribble-file
is not as nice as it could be: M-x becomes x...)

My understanding is that mail-alias-file is bound by rmail-resend when
sendmail is required (inside rmail-resend); this prevents sendmail.el's
(defvar mail-alias-file nil ...) to give it a global value, used later when
sending another message.

The simplest fix is probably this one:

*** /afs/inria.fr/sun4/usr/local/lib/emacs/19.25/lisp/sendmail.el	Mon May 23 06:53:13 1994
--- /tmp/sendmail.el	Mon Aug  8 17:30:58 1994
***************
*** 62,67 ****
--- 62,68 ----
  (defvar mail-default-reply-to nil
    "*Address to insert as default Reply-to field of outgoing messages.")
  
+ ;;;###autoload
  (defvar mail-alias-file nil
    "*If non-nil, the name of a file to use instead of `/usr/lib/aliases'.
  This file defines aliases to be expanded by the mailer; this is a different

But it is global.  Inside rmail-resend, one could do:

*** /afs/inria.fr/sun4/usr/local/lib/emacs/19.25/lisp/rmail.el	Fri May 27 01:05:57 1994
--- /tmp/rmail.el	Mon Aug  8 17:35:55 1994
***************
*** 1979,1985 ****
  	    (forward-line 1)
  	    (insert-buffer forward-buffer))))))
  
! (defun rmail-resend (address &optional from comment mail-alias-file)
    "Resend current message to ADDRESSES.
  ADDRESSES should be a single address, a string consisting of several
  addresses separated by commas, or a list of addresses.
--- 1979,1985 ----
  	    (forward-line 1)
  	    (insert-buffer forward-buffer))))))
  
! (defun rmail-resend (address &optional from comment alias-file)
    "Resend current message to ADDRESSES.
  ADDRESSES should be a single address, a string consisting of several
  addresses separated by commas, or a list of addresses.
***************
*** 1995,2000 ****
--- 1995,2001 ----
    (require 'mailalias)
    (if (not from) (setq from (user-login-name)))
    (let ((tembuf (generate-new-buffer " sendmail temp"))
+ 	(mail-alias-file alias-file)
  	(mail-header-separator "")
  	(case-fold-search nil)
  	(mailbuf (current-buffer)))

I don't know which is better.

Bruno.
Technical Details
Message-ID: <199408081544.RAA01099@waco.inria.fr>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!sundog.tiac.net!usenet.elf.com!news2.near.net!MathWorks.Com!news.cic.net!magnus.acs.ohio-state.edu!cis.ohio-state.edu!inria.FR!Bruno.Verlyck

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,77954a3d33b9375a,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-08-08 17:14:08 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!sundog.tiac.net!usenet.elf.com!news2.near.net!MathWorks.Com!news.cic.net!magnus.acs.ohio-state.edu!cis.ohio-state.edu!inria.FR!Bruno.Verlyck
From: Bruno.Verlyck@inria.FR
Newsgroups: gnu.emacs.bug
Subject: bug in rmail-resend
Date: 8 Aug 1994 19:13:42 -0400
Organization: GNUs Not Usenet
Lines: 70
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <199408081544.RAA01099@waco.inria.fr>