unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11421: call-process behavior wrt. to read only buffers depends on coding system for read operations
@ 2012-05-06 16:06 Rob Browning
  2019-10-03 17:08 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Browning @ 2012-05-06 16:06 UTC (permalink / raw)
  To: 11421; +Cc: Pierre Courtieu, 651420, 651420-forwarded

(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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#11421: call-process behavior wrt. to read only buffers depends on coding system for read operations
  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
  2020-04-17 10:23   ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-03 17:08 UTC (permalink / raw)
  To: Rob Browning; +Cc: Pierre Courtieu, 11421, 651420-forwarded, 651420

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#11421: call-process behavior wrt. to read only buffers depends on coding system for read operations
  2019-10-03 17:08 ` Lars Ingebrigtsen
@ 2020-04-17 10:23   ` Stefan Kangas
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-04-17 10:23 UTC (permalink / raw)
  To: Lars Ingebrigtsen
  Cc: Pierre Courtieu, 11421-done, 651420-forwarded, 651420,
	Rob Browning

Lars Ingebrigtsen <larsi@gnus.org> writes:

> 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?

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-17 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-04-17 10:23   ` Stefan Kangas

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).