* Emacs in batch mode: handling of commandline arguments
@ 2013-06-30 22:32 Thorsten Jolitz
2013-07-01 7:23 ` Thorsten Jolitz
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Jolitz @ 2013-06-30 22:32 UTC (permalink / raw)
To: help-gnu-emacs
Hi List,
I try to write a generic, flexible and robust function in another
programming language for calling Emacs in batch mode. I did quite a lot
of experimenting, but I'm still a bit confused about the following
questions:
1. chaining of '--load' args
with a call like this
,-----------------------------------------------------
| emacs --batch --load=file1 --load=file2 --load=file3
`-----------------------------------------------------
is only file1 loaded and the others are ignored?
2. chaining of '--eval' args
is a call like this
,-----------------------------------------------------
| emacs --batch --eval='(+ 3 4)' --eval='(- 5 3)' --eval='(* 3 3)'
`-----------------------------------------------------
equivalent to
,-------------------------------------------------------
| emacs --batch --eval='(progn (+ 3 4) (- 5 3) (* 3 3))'
`-------------------------------------------------------
3. mixing of '--load' and '--eval' args
with a call like this
,-----------------------------------------------------
| emacs --batch --load=file1 --eval='(+ 3 4)'
`-----------------------------------------------------
is only file1 loaded and evaluation ignored?
4. what about processes?
with a call like this
,-----------------------------------------
| emacs --batch --load=file1 --load=file2
`-----------------------------------------
and given that both files are actually loaded - would variable 'myVar'
set in file1
,----------------
| (setq myVar 33)
`----------------
be available in file2
,-------------------------
| (setq myVar (+ myVar 7))
`-------------------------
?
I less words: can there be several --load and --eval statements in one
'emacs --batch' call, and are they all executed in the same Emacs
process (i.e. are the results of earlier evaluations available for later
evaluations)?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Emacs in batch mode: handling of commandline arguments
2013-06-30 22:32 Emacs in batch mode: handling of commandline arguments Thorsten Jolitz
@ 2013-07-01 7:23 ` Thorsten Jolitz
0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Jolitz @ 2013-07-01 7:23 UTC (permalink / raw)
To: help-gnu-emacs
Thorsten Jolitz <tjolitz@gmail.com> writes:
> 1. chaining of '--load' args
>
> with a call like this
>
> ,-----------------------------------------------------
> | emacs --batch --load=file1 --load=file2 --load=file3
> `-----------------------------------------------------
>
> is only file1 loaded and the others are ignored?
>
> 2. chaining of '--eval' args
>
> is a call like this
>
> ,-----------------------------------------------------
> | emacs --batch --eval='(+ 3 4)' --eval='(- 5 3)' --eval='(* 3 3)'
> `-----------------------------------------------------
>
> equivalent to
>
> ,-------------------------------------------------------
> | emacs --batch --eval='(progn (+ 3 4) (- 5 3) (* 3 3))'
> `-------------------------------------------------------
>
> 3. mixing of '--load' and '--eval' args
>
> with a call like this
>
> ,-----------------------------------------------------
> | emacs --batch --load=file1 --eval='(+ 3 4)'
> `-----------------------------------------------------
>
> is only file1 loaded and evaluation ignored?
>
> 4. what about processes?
>
> with a call like this
>
> ,-----------------------------------------
> | emacs --batch --load=file1 --load=file2
> `-----------------------------------------
>
> and given that both files are actually loaded - would variable 'myVar'
> set in file1
>
> ,----------------
> | (setq myVar 33)
> `----------------
>
> be available in file2
>
> ,-------------------------
> | (setq myVar (+ myVar 7))
> `-------------------------
All of this does actually work in the shell but did not work as expected
in my program, so the problems must be there and this question is kind
of obsolete.
[I think I wanted to know what is the expexted behaviour, but it seems
any number of --load= and --eval= can be used and combined]
sorry for the noise ...
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-01 7:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-30 22:32 Emacs in batch mode: handling of commandline arguments Thorsten Jolitz
2013-07-01 7:23 ` Thorsten Jolitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).