GNU bug report logs - #11421
call-process behavior wrt. to read only buffers depends on coding system for read operations

Previous Next

Package: emacs;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Sun, 6 May 2012 16:09:02 UTC

Severity: normal

Tags: moreinfo

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Forwarded to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651420

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: Pierre Courtieu <pierre.courtieu <at> gmail.com>, 11421 <at> debbugs.gnu.org, 651420-forwarded <at> bugs.debian.org, 651420 <at> bugs.debian.org
Subject: bug#11421: call-process behavior wrt. to read only buffers depends on coding system for read operations
Date: Thu, 03 Oct 2019 19:08:30 +0200
Rob Browning <rlb <at> defaultvalue.org> writes:

> It appears that depending on the LOCALE setting, Emacs 23.4 may or may
> not signal a "buffer is read-only" error.  At least here, this can be
> demonstrated as follows.
>
> Save to ./test.el:
>
>   (let ((buf (get-buffer-create "xxx")))
>     (with-current-buffer buf
>       (compilation-mode))
>     (let ((coding-system-for-read 'iso-latin-1-unix))
>       (condition-case err
> 	  (progn
> 	    (call-process "/bin/cat" "/proc/cpuinfo" buf t)
> 	    (message "iso-latin-1-unix: No call-process error"))
> 	(error
> 	 (message "iso-latin-1-unix: call-process error: %s %s"
> 		  (car err) (cdr err)))))
>     (let ((coding-system-for-read 'utf-8-unix))
>       (condition-case err
> 	  (progn
> 	    (call-process "/bin/cat" "/proc/cpuinfo" buf t)
> 	    (message "utf-8-unix: No call-process error"))
> 	(error
> 	 (message "utf-8-unix: call-process error: %s %s"
> 		  (car err) (cdr err))))))

[...]

> which should produce something like this:
>
>   iso-latin-1-unix: call-process error: buffer-read-only (xxx)
>   utf-8-unix: No call-process error

When I try this in Emacs 27, I get:

Waiting for process to die...done
iso-latin-1-unix: call-process error: buffer-read-only (xxx)
Waiting for process to die...done
utf-8-unix: call-process error: buffer-read-only (xxx)

Can you still reproduce this bug on modern Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 36 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.