bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20682: bug#25671: Feature request: emacs -Q --script as a single bin


From: Lars Ingebrigtsen
Subject: bug#20682: bug#25671: Feature request: emacs -Q --script as a single binary
Date: Mon, 18 Apr 2022 13:01:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Glenn Morris <rgm@gnu.org> writes:

>> OTOH I'd be happy to see a new argument that lets you provide various
>> args as one.  E.g. "emacs --args=-Q,--script" which would be more
>> generally useful to deal with the limit of only one arg in shebang.
>> Given the size limit of shebang lines, we'd also want this extra arg to
>> be shortish.
>>
>> An alternative would be to combine --args and --script, so you could
>> say "emacs --script=-Q" to get what you're asking for.
>
> Apparently it's somewhat conventional (perl, ruby) to use "-x" for this
> purpose. A nice write-up at
>
> https://github.com/smikes/node/blob/minus-x-switch/doc/Minus-X-Switch-Proposal.md
>
> Amazingly, "-x" is available as an Emacs command-line switch...

I think that sounds really attractive, so I've added this to Emacs 29.
The new -x switch is like --script, but will kill Emacs when it reaches
the end of the script, and return the value of the final form as the
return value, so you can say use 0 at the end to signal success to the
caller.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]