Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Emacs batch commands, over many files
- Date: Thu, 27 Jul 2006 18:48:46 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] Emacs batch commands, over many files
- References: <mailman.1.1153969203.1166.tlug@example.com> <44C831B7.8040903@example.com>
- Organization: The XEmacs Project
- User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.5-b27 (linux)
>>>>> "David" == David Riggs <dariggs@example.com> writes: David> emacs * -batch --eval '(progn (insert "from David> batch")(save-buffer))' David> But this works on only last of the files served up by the David> "*" expansion, the rest of the files are ignored. David> How do I get emacs to see all the files passed to it? Emacs sees and visits them; it's your Lisp program that doesn't. Here's a mass-murder approach, but less violent APIs will be visible if you use C-h a -buffer$ RET (in XEmacs, anyway; Emacs still seems to believe that ordinary users don't want to see non-interactive functions). emacs * -batch -eval '(while (> (length (buffer-list) 0)) \ (insert "from batch") (save-buffer) (kill-buffer))' (You may want to check for (equal (buffer-name) "*scratch*") and stuff like that, too.) Probably a more convenient way to work on this is to defun the code as myfun in a file myprog.el and do emacs * -batch -l myprog -f myfun -- School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software.
- References:
- [tlug] Emacs batch commands, over many files
- From: David Riggs
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Portability of Misaligned Data Access . . . . . . .
- Next by Date: Re: [tlug] I'm a glutton for punishment - Palm Pilot and Ubuntu Dapper LTS connectivity [SOLVED]
- Previous by thread: [tlug] Emacs batch commands, over many files
- Next by thread: [tlug] [OT] Lunch Place around Ginza Was: TLUG Technical Meeting 2006-07-29
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links