unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11208: 23.4; shell-command-on-region does not {de,en}code as documented
@ 2012-04-09 11:09 Gustav Hållberg
  2012-04-09 16:58 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Gustav Hållberg @ 2012-04-09 11:09 UTC (permalink / raw)
  To: 11208

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

shell-command-on-region (M-|) does not do the {de,en}coding of I/O to the
process as documented.

It says (if I read it correctly) that it will use buffer-file-coding-system
(at least unless coding-system-for-{read,write} are set) for output to and
input from (if doing substitution with a prefix argument) the process.

However, it "just" calls call-process-region which will use
default-process-coding-system rather than buffer-file-coding-system.

To try, 'emacs -q', switch to an empty buffer, and:

  C-x RET f iso-8859-7 RET C-SPC C-u M-| echo -e '\0245' RET

This does not insert a drachma sign.

However, if you run (setq default-process-coding-system '(iso-8859-7
iso-8859-7)) first, it does indeed produce a drachma.

Output encoding works the same way.

- Gustav

[-- Attachment #2: Type: text/html, Size: 1018 bytes --]

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

* bug#11208: 23.4; shell-command-on-region does not {de,en}code as documented
  2012-04-09 11:09 bug#11208: 23.4; shell-command-on-region does not {de,en}code as documented Gustav Hållberg
@ 2012-04-09 16:58 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2012-04-09 16:58 UTC (permalink / raw)
  To: Gustav Hållberg; +Cc: 11208-done

> Date: Mon, 9 Apr 2012 13:09:07 +0200
> From: Gustav Hållberg <gustav@gmail.com>
> 
> shell-command-on-region (M-|) does not do the {de,en}coding of I/O to the
> process as documented.
> 
> It says (if I read it correctly) that it will use buffer-file-coding-system
> (at least unless coding-system-for-{read,write} are set) for output to and
> input from (if doing substitution with a prefix argument) the process.
> 
> However, it "just" calls call-process-region which will use
> default-process-coding-system rather than buffer-file-coding-system.

Thanks, I made the doc string match the implementation.

The fix is committed as revision 107794 on the emacs-24 branch, and
will be in Emacs 24.1.






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

end of thread, other threads:[~2012-04-09 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 11:09 bug#11208: 23.4; shell-command-on-region does not {de,en}code as documented Gustav Hållberg
2012-04-09 16:58 ` Eli Zaretskii

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