all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Running a shell script command, paste output above selection?
@ 2024-03-12 21:15 Marc Coquand
  2024-03-13  3:08 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Coquand @ 2024-03-12 21:15 UTC (permalink / raw)
  To: help-gnu-emacs


Heya,

I know that I can use M-| to run a shell script command. I can also use
~C-u M-|~ to run a shell script, pipe the selection as input and have it
replace my selection.

However, I'm wondering if there is a built in way to run a command,
pipe the selection to a shell script, then paste the output of the
command above or below the selection?

Thanks in advance,
Marc



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

* Re: Running a shell script command, paste output above selection?
  2024-03-12 21:15 Running a shell script command, paste output above selection? Marc Coquand
@ 2024-03-13  3:08 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-03-13  3:08 UTC (permalink / raw)
  To: help-gnu-emacs

> I know that I can use `M-|` to run a shell script command. I can also use
> `C-u M-|` to run a shell script, pipe the selection as input and have it
> replace my selection.
>
> However, I'm wondering if there is a built in way to run a command,
> pipe the selection to a shell script, then paste the output of the
> command above or below the selection?

I guess you can do:

    M-w C-y C-x C-x     ; Duplicate the region to keep a copy
    C-u M-|


-- Stefan




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

end of thread, other threads:[~2024-03-13  3:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12 21:15 Running a shell script command, paste output above selection? Marc Coquand
2024-03-13  3:08 ` Stefan Monnier via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.