🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99159

bug in ftp-write-file

#99159
From: Nathan Wilson
Date: Thu, 15 Nov 1990 03:13
27 lines
1878 bytes
A coworker and I just discovered a bug in ftp-write-file in ftp.el.
In particular, calling ftp-write-file causes the second buffer in the
buffer list to mysteriously become read only.  The actual problem is
in the function ftp-setup-buffer which does a (setq buffer-read-only
t).  I don't understand enough about emacs lisp to understand where
buffer-read-only is coming from but the wrong one is getting bashed.
I have verified the bug on three different versions of emacs (18.50,
18.54, and 18.55).

To reproduce:
1) start up emacs
2) load a file (say your .emacs file)
3) C-x C-b (list-buffers to show that nothing is currently read-only)
4) M-x ftp-write-file
5) Give a new file name.  Even <local-host>:/tmp/junk works!
6) Give the password.  Wait for the write to complete.
7) C-x C-b and suddenly your *scratch* buffer is read only!

The simplest partial fix we found was to comment out the (setq
buffer-read-only t) from ftp-setup-buffer.  This has the problem that
if the second buffer happens to actually be read-only then it is made
writable.  It would be wonderful if someone would figure out what's
really happening and fix it.

Nathan Wilson
Teleos Research
nathan%teleos.com@ai.sri.com
Technical Details
Message-ID: <16419@csli.Stanford.EDU>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CSLI.STANFORD.EDU!wilson

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,6c853f6bd5d59ad3,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-11-14 19:13:35 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CSLI.STANFORD.EDU!wilson
From: wilson@CSLI.STANFORD.EDU (Nathan Wilson)
Newsgroups: gnu.emacs.bug
Subject: bug in ftp-write-file
Message-ID: <16419@csli.Stanford.EDU>
Date: 15 Nov 90 03:13:35 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: Center for the Study of Language and Information, Stanford U.
Lines: 27
Approved: bug-gnu-emacs@prep.ai.mit.edu
Posted: Thu Nov 15 04:13:35 1990