unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53302: 29.0.50; shell-command-on-region doesn't execute the command remotely
@ 2022-01-16 12:24 miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-16 12:49 ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-16 12:24 UTC (permalink / raw)
  To: 53302

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

If default-directory is a remote directory, shell-command (M-!) executes
the command on the remote machine, but shell-command-on-region (M-|)
executes it locally.

This is more of a feature request rather than a bug report, but it might
be nice if shell-command-on-region executed the command remotely as
well. Or perhaps, a new command called something like
'shell-command-on-region-file' could be added that executed the command
remotely.

Thanks, best regards.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

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

* bug#53302: 29.0.50; shell-command-on-region doesn't execute the command remotely
  2022-01-16 12:24 bug#53302: 29.0.50; shell-command-on-region doesn't execute the command remotely miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-16 12:49 ` Michael Albinus
  2022-01-21 12:00   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2022-01-16 12:49 UTC (permalink / raw)
  To: 53302; +Cc: miha

miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:

Hi,

> If default-directory is a remote directory, shell-command (M-!) executes
> the command on the remote machine, but shell-command-on-region (M-|)
> executes it locally.
>
> This is more of a feature request rather than a bug report, but it might
> be nice if shell-command-on-region executed the command remotely as
> well.

Indeed, shell-command-on-region uses internally call-process-region,
which isn't aware of remote default-directory.

> Or perhaps, a new command called something like
> 'shell-command-on-region-file' could be added that executed the command
> remotely.

For consistency reasons, I prefer that shell-command-on-region behaves
like the other functions of this family, shell and shell-command.

> Thanks, best regards.

Best regards, Michael.





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

* bug#53302: 29.0.50; shell-command-on-region doesn't execute the command remotely
  2022-01-16 12:49 ` Michael Albinus
@ 2022-01-21 12:00   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-21 12:00 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 53302, miha

Michael Albinus <michael.albinus@gmx.de> writes:

>> Or perhaps, a new command called something like
>> 'shell-command-on-region-file' could be added that executed the command
>> remotely.
>
> For consistency reasons, I prefer that shell-command-on-region behaves
> like the other functions of this family, shell and shell-command.

And I'd be surprised if shell-command-on-region did anything remotely --
I'm asking Emacs to work on something in the current buffer, which is
different from asking Emacs to execute a command in general (which is
what `M-!' does).

So I think everything here is working as designed, and I'm therefore
closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2022-01-21 12:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 12:24 bug#53302: 29.0.50; shell-command-on-region doesn't execute the command remotely miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-16 12:49 ` Michael Albinus
2022-01-21 12:00   ` Lars Ingebrigtsen

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