From: Lars Ingebrigtsen <larsi@gnus.org>
To: Rob Browning <rlb@defaultvalue.org>
Cc: Pierre Courtieu <pierre.courtieu@gmail.com>,
11421@debbugs.gnu.org, 651420-forwarded@bugs.debian.org,
651420@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 [thread overview]
Message-ID: <871rvthi41.fsf@gnus.org> (raw)
In-Reply-To: <87ehqx1egt.fsf@trouble.defaultvalue.org> (Rob Browning's message of "Sun, 06 May 2012 11:06:26 -0500")
Rob Browning <rlb@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
next prev parent reply other threads:[~2019-10-03 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-06 16:06 bug#11421: call-process behavior wrt. to read only buffers depends on coding system for read operations Rob Browning
2019-10-03 17:08 ` Lars Ingebrigtsen [this message]
2020-04-17 10:23 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rvthi41.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=11421@debbugs.gnu.org \
--cc=651420-forwarded@bugs.debian.org \
--cc=651420@bugs.debian.org \
--cc=pierre.courtieu@gmail.com \
--cc=rlb@defaultvalue.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).