GNU bug report logs -
#11421
call-process behavior wrt. to read only buffers depends on coding system for read operations
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11421 in the body.
You can then email your comments to 11421 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11421
; Package
emacs
.
(Sun, 06 May 2012 16:09:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Rob Browning <rlb <at> defaultvalue.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 06 May 2012 16:09:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
(If possible, please preserve the 651420-forwarded address in any replies.)
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))))))
Run:
emacs -q --no-site-file -batch -l ./test.el
which should produce something like this:
iso-latin-1-unix: call-process error: buffer-read-only (xxx)
utf-8-unix: No call-process error
Additional information may be found here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651420
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11421
; Package
emacs
.
(Thu, 03 Oct 2019 17:09:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 11421 <at> debbugs.gnu.org (full text, mbox):
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
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 03 Oct 2019 17:09:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Fri, 17 Apr 2020 10:24:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Rob Browning <rlb <at> defaultvalue.org>
:
bug acknowledged by developer.
(Fri, 17 Apr 2020 10:24:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 11421-done <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> 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?
More information was requested, but none was given within 28 weeks, so
I'm closing this bug. If this is still an issue, please reply to this
email (use "Reply to all" in your email client) and we can reopen the
bug report.
Best regards,
Stefan Kangas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 15 May 2020 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 339 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.