Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Emacs batch commands



Stephen T: wrote:
Emacs sees and visits them; it's your Lisp program that doesn't.
emacs * -batch -eval '(while (> (length (buffer-list) 0)) \
(insert "from batch") (save-buffer) (kill-buffer))'

Naruhodo. So all those zillions of files are open/visited all at once! I thought emacs did a shell script pipeline style of opening one after another.

So, what I really need to do is write the lisp code to intercept the command line arguments and open them one at a time?

The elisp info says

"The init file can access the values of the action arguments as the
elements of a list in the variable `command-line-args'.  The init file
can override the normal processing of the action arguments, or define
new ones, by reading and setting this variable."

Or maybe just do this whole thing from emacs by going to a dir and then executing my little function.

Thanks very much. I could not quite see what was happening. Now I see that its not really correct to approach things the way I was.

David




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links