all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Macros in dired - Is it possible?
@ 2009-07-17 18:41 zeek peters
  0 siblings, 0 replies; 8+ messages in thread
From: zeek peters @ 2009-07-17 18:41 UTC (permalink / raw)
  To: help-gnu-emacs

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

[ *Question* ]
Is it possible to mark files in dired and then run a macro on all
the selected files?

[ *Background* ]
The macro finds and deletes certain portions/paragraphs from text
files to cut them down in size so that I can read them easier and quicker.

But I am getting tired of loading one file at a time into Emacs to
run the macro ( via ^u 0 MX macro1 ). I do this about 100x/day. So is there
a
quicker/better way to run a macro en mass?

[ *What I Have Tried, but Hasn't Worked* ]
As an example
1. I load 10 text files into emacs, thus creating 10 separate
buffers.
2. Then tried creating another macro that calls the first macro,
and also saves the edited and much smaller file, and then kills the buffer
3.  So, for 10 files, I would call macro2 via [ ^u 10 Mx macro2 ]
4. The problem, I am having is that the 2nd macro doesn't record
the save or the kill. So, I tried to edit the saved macro2 via [
Mx edit-named-k TAB RET macro2 ]. I add the commands [ ^x ^s ]
and [ ^x k RET ], and do a [ c ^c ]. The changes are saved, but
when I try again, the 2nd macro calls macro1 to do its magic, but
the modifications aren't saved, nor is the buffer killed. So,
only one of the 10 files files has been modified.

[ *What I have learned* ]
A lot, since I am a completely new to this. Learned a little bit about Git,
compiling, Org-mode. Currently, reading the both manuals ( emacs
and Lisp how2 ).

I'm looking forward to learning more, but starting to get a bit
frustated. Hope you could offer some insight/assistance. Thanks

[ *Info* ]
emacs-snapshot ( GNU Emacs 23.0.95.1 (i486-pc-linux-gnu, GTK+
Version 2.16.4) of 2009-07-03

[-- Attachment #2: Type: text/html, Size: 1785 bytes --]

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

end of thread, other threads:[~2009-07-19 16:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2744.1247896840.2239.help-gnu-emacs@gnu.org>
2009-07-18  9:14 ` Macros in dired - Is it possible? Xah Lee
2009-07-18 17:19   ` zeek
2009-07-18 21:10     ` Anselm Helbig
2009-07-18 21:02 ` muede
2009-07-18 21:08 ` Anselm Helbig
2009-07-19  2:29   ` zeek
2009-07-19 16:04     ` Xah Lee
2009-07-17 18:41 zeek peters

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.