all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Execute command on marked buffers
@ 2008-09-08 16:06 Sean McLaughlin
  2008-09-08 20:58 ` Xah
  2008-09-09  9:18 ` Michael Heerdegen
  0 siblings, 2 replies; 3+ messages in thread
From: Sean McLaughlin @ 2008-09-08 16:06 UTC (permalink / raw)
  To: help-gnu-emacs

Having marked some buffers in a buffer menu, how do I execute a
particular command upon them?  Specifically, I want to change a
bunch of buffers that are erroneously in "xml-mode" to
"nxml-mode".

This is with 22.2.1.


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

* Re: Execute command on marked buffers
  2008-09-08 16:06 Execute command on marked buffers Sean McLaughlin
@ 2008-09-08 20:58 ` Xah
  2008-09-09  9:18 ` Michael Heerdegen
  1 sibling, 0 replies; 3+ messages in thread
From: Xah @ 2008-09-08 20:58 UTC (permalink / raw)
  To: help-gnu-emacs


On Sep 8, 9:06 am, "Sean McLaughlin" <non...@domain.invalid> wrote:
> Having marked some buffers in a buffer menu, how do I execute a
> particular command upon them?  Specifically, I want to change a
> bunch of buffers that are erroneously in "xml-mode" to
> "nxml-mode".
>
> This is with 22.2.1.

To apply a function to marked files in dired, use “dired-get-marked-
files”, like this:

;; idiom for processing a list of files in dired's marked files

;; suppose myProcessFile is your function that takes a file path
;; and do some processing on the file

(defun dired-myProcessFile ()
  "apply myProcessFile function to marked files in dired."
  (interactive)
  (require 'dired)
  (mapc 'myProcessFile (dired-get-marked-files))
)

you can read some other idioms here:
http://xahlee.org/emacs/elisp_idioms.html

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Execute command on marked buffers
  2008-09-08 16:06 Execute command on marked buffers Sean McLaughlin
  2008-09-08 20:58 ` Xah
@ 2008-09-09  9:18 ` Michael Heerdegen
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Heerdegen @ 2008-09-09  9:18 UTC (permalink / raw)
  To: help-gnu-emacs

I use `ibuffer' as buffer menu. There, pressing E does what you
want. You can try it with M-x ibuffer.


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

end of thread, other threads:[~2008-09-09  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-08 16:06 Execute command on marked buffers Sean McLaughlin
2008-09-08 20:58 ` Xah
2008-09-09  9:18 ` Michael Heerdegen

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.