--- Begin Message ---
Subject: |
Feature request: ignore --help in --script mode |
Date: |
Thu, 9 Feb 2017 16:00:59 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
Hi bug-gnu-emacs,
Event with --script, Emacs still displays its help when passed --help. This is
confusing for users (they might write emacs --script some-script.el --help
expecting to get help on the script, but instead they get Emacs' help), and it
force ELisp scripts to use --usage or some other harder-to-guess synonym.
Could this be changed so that emacs --script a.el --help does not show Emacs'
help?
More generally, could we guarantee that options that appear *after* "--script"
aren't processed by Emacs itself (and instead left to the script)? Or would
that break things?
Thanks!
Clément.
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#25670: Feature request: ignore --help in --script mode |
Date: |
Fri, 10 Feb 2017 11:52:50 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 2017-02-10 10:05, Ted Zlatanov wrote:
> On Thu, 9 Feb 2017 16:00:59 -0500 Clément Pit--Claudel <address@hidden>
> wrote:
>
> CP> More generally, could we guarantee that options that appear *after*
> "--script" aren't processed by Emacs itself (and instead left to the script)?
> Or would that break things?
>
> Typically I've seen "--" used to indicate the end of parseable options.
> Would it help?
Yes! And in fact it seems to work :) Neat.
$ emacs -Q --batch --eval '(print argv)' -- --help
("--" "--help")
I see now that it was mentioned in
http://www.lunaryorn.com/posts/emacs-script-pitfalls.html. Not sure how I
missed it.
Thanks Ted!
Clément.
signature.asc
Description: OpenPGP digital signature
--- End Message ---