all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Command on current buffer
@ 2003-10-06 11:47 Boris
  2003-10-06 12:13 ` Mats Löfdahl
  0 siblings, 1 reply; 5+ messages in thread
From: Boris @ 2003-10-06 11:47 UTC (permalink / raw)


I want to execute a command on the current buffer or file. Someone here
recommended shell-command-on-region, but that works on a region, not on a
buffer.
How do I pass the whole buffer to a shell command?

Boris Hollas

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

* Re: Command on current buffer
  2003-10-06 11:47 Command on current buffer Boris
@ 2003-10-06 12:13 ` Mats Löfdahl
  2003-10-06 13:00   ` Boris
  0 siblings, 1 reply; 5+ messages in thread
From: Mats Löfdahl @ 2003-10-06 12:13 UTC (permalink / raw)


Boris <b0risNO@gmxDOTde.SPAM> writes:

> I want to execute a command on the current buffer or file. Someone
> here recommended shell-command-on-region, but that works on a
> region, not on a buffer.
> How do I pass the whole buffer to a shell command?

M-x mark-whole-buffer

-- 
-- Mats Löfdahl                                                  --
                                                                 --

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

* Re: Command on current buffer
  2003-10-06 12:13 ` Mats Löfdahl
@ 2003-10-06 13:00   ` Boris
  2003-10-06 17:57     ` Kevin Rodgers
  2003-11-30 18:46     ` Kai Grossjohann
  0 siblings, 2 replies; 5+ messages in thread
From: Boris @ 2003-10-06 13:00 UTC (permalink / raw)


Mats Löfdahl wrote:

> M-x mark-whole-buffer

No, I don't want to mark the buffer first, I want to execute something
similar to tex-latex-file. Doesn't Emacs have that?

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

* Re: Command on current buffer
  2003-10-06 13:00   ` Boris
@ 2003-10-06 17:57     ` Kevin Rodgers
  2003-11-30 18:46     ` Kai Grossjohann
  1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2003-10-06 17:57 UTC (permalink / raw)


Boris wrote:

> Mats Löfdahl wrote:
>>M-x mark-whole-buffer


C-x h


> No, I don't want to mark the buffer first, I want to execute something
> similar to tex-latex-file. Doesn't Emacs have that?

"Emacs is the extensible, customizable, self-documenting real-time
display editor."


(defun shell-command-on-buffer (command)
  "Execute string COMMAND in inferior shell with buffer as input.
See \\[shell-command-on-region]."
  (interactive (list (read-from-minibuffer "Shell command on buffer: "
                                           nil nil nil
                                           'shell-command-history)))
  (shell-command-on-region (point-min) (point-max) command
                           current-prefix-arg
                           current-prefix-arg
                           shell-command-default-error-buffer))

-- 
Kevin Rodgers

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

* Re: Command on current buffer
  2003-10-06 13:00   ` Boris
  2003-10-06 17:57     ` Kevin Rodgers
@ 2003-11-30 18:46     ` Kai Grossjohann
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Grossjohann @ 2003-11-30 18:46 UTC (permalink / raw)


Boris <b0risNO@gmxDOTde.SPAM> writes:

> Mats Löfdahl wrote:
>
>> M-x mark-whole-buffer
>
> No, I don't want to mark the buffer first

But marking the buffer first is how you do it...  What's bad about
marking the buffer first?  Too many keys to press?

C-x h M-| foo RET doesn't seem too long IMVHO.

Kai

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

end of thread, other threads:[~2003-11-30 18:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-06 11:47 Command on current buffer Boris
2003-10-06 12:13 ` Mats Löfdahl
2003-10-06 13:00   ` Boris
2003-10-06 17:57     ` Kevin Rodgers
2003-11-30 18:46     ` Kai Grossjohann

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.