🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99583

bug in 'cmd_error' in keyboard.c

#99583
From: Andy Norman
Date: Tue, 17 Jul 1990 16:22
34 lines
1888 bytes
Apologies in advance if this is already known.

In src/fileio.c, the routine 'barf_or_query_if_file_exists' in certain cases
(such as copy-file noticing that the destination file exists) does the
equivalent of:

  (signal 'file-already-exists (cons filename nil))

The *intent* of doing this is that an error message is output of the form:

  File already exists: filename

What actually happens is that the error message output is just:

  filename

The reason for this is that cmd_error in src/keyboard.c correctly gets the
'error-message' string "File already exists" from the error, but then notices
that one of the error-conditions for 'file-already-exists' is 'file-error' and
overwrites the error message with the name of the argument to the error, i.e.
just the filename.

The bug can be seen by creating a file called /tmp/foo and filling it with a
few lines of garbage, followed by M-x copy-file /tmp/foo /tmp/foo and
answering "n" to the prompt.

If it matters, I'm running GNU Emacs 18.55 on HP-UX 7.0.

Hope this helps... a bit...

					-- ange --

					ange@hplb.hpl.hp.com
					ange%hplb@hplabs.hp.com
Technical Details
Message-ID: <ANGE.90Jul17172218@anorman.hpl.hp.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!anorman!ange

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,e644ffe501abaa46,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-07-17 15:21:30 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!anorman!ange
From: ange@hplb.hpl.hp.com (Andy Norman)
Newsgroups: gnu.emacs.bug
Subject: bug in 'cmd_error' in keyboard.c
Keywords: gnu emacs, signal, bug, file-exists
Message-ID: <ANGE.90Jul17172218@anorman.hpl.hp.com>
Date: 17 Jul 90 16:22:18 GMT
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Lines: 34
Posted: Tue Jul 17 17:22:18 1990
Nntp-Posting-Host: anorman.hpl.hp.com