emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hexl and running a shell


From: Eli Zaretskii
Subject: Re: hexl and running a shell
Date: Fri, 30 Nov 2001 13:10:23 +0200

> From: "Stefan Monnier" <monnier+gnu/address@hidden>
> Date: Fri, 30 Nov 2001 05:00:57 -0500
> 
> For some reason, `hexl' currently uses shell-command-on-region
> even though it doesn't use any particular feature of the shell.
> I use the patch below which makes it use call-process-region
> instead.

I think this might be dangerous: call-process-region requires that you
figure out in advance how to group together command-line arguments
that have embedded whitespace.  split-string won't cut it.

As another example, what if hexl-options includes redirection of
stderr?

> It was arguably a misconfiguration on his part, but OTOH there's
> really no good reason why hexl-mode should use the shell.

I think user-level features that invoke subsidiary programs should in
general behave as if the command was typed at the shell prompt.  That
means you need to go through the shell, even if in most cases a
simple call-process or call-process-region will do.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]