🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #87364

RMAIL local variables become global when find-file gets new version

#87364
From: kdo
Date: Tue, 27 Sep 1994 15:33
32 lines
2107 bytes
This is in emacs 19.21.1 under DEC RISC Ultrix 4.3.

The following series of steps produces the error "Wrong type argument:
integer-or-marker-p, nil" in rmail-message-labels-p in
rmail-first-unseen-message.

1. Read mail (with M-x rmail).  Quit from rmail.
2. Modify RMAIL file on disk (e.g. with "touch RMAIL")
3. Type "M-x rmail" again
4. Answer yes to the question "File RMAIL changed on disk, read the
   new version?"
5. Kill your RMAIL buffer
6. Type "M-x rmail" a third time.  Before getting your new mail, emacs
will give the error above.

The proximate cause is that in step 4 the values of variables
"rmail-message-vector" (and "rmail-current-message", etc.) have
acquired global values, instead being local to the RMAIL buffer.  (I
think what's happened is that the values in the old RMAIL file have
become global, while the new RMAIL file has local values as well.)
As a result of this, in step 6, "rmail-maybe-set-message-counters"
sees that "rmail-message-vector" and so on have values and thus
doesn't think it has any work to do.  Thus rmail-msgbeg uses the old
value in rmail-message-vector, which doesn't point into the right
buffer, causing the error above.

						Ken

P.S. In spite of the seemingly convoluted set of steps above, I
encounter this bug fairly regularly, because I'm reading my mail from
home and from work and sometimes forgetting to kill my old RMAIL
buffer and sometimes remembering.
Technical Details
Message-ID: <9409271532.AA03612@marie.mit.edu>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!mit.EDU!kdo

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,6250679ad32f8609,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-09-27 08:44:51 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!mit.EDU!kdo
From: kdo@mit.EDU
Newsgroups: gnu.emacs.bug
Subject: RMAIL local variables become global when find-file gets new version
Date: 27 Sep 1994 11:33:58 -0400
Organization: GNUs Not Usenet
Lines: 32
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9409271532.AA03612@marie.mit.edu>