GNU bug report logs - #25670
Feature request: ignore --help in --script mode

Previous Next

Package: emacs;

Reported by: Clément Pit--Claudel <clement.pitclaudel <at> live.com>

Date: Thu, 9 Feb 2017 21:02:02 UTC

Severity: wishlist

Done: Clément Pit--Claudel <clement.pitclaudel <at> live.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#25670: closed (Feature request: ignore --help in --script mode)
Date: Fri, 10 Feb 2017 16:54:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 10 Feb 2017 11:52:50 -0500
with message-id <6e731e53-dc69-f68e-aa52-82ba89c9c518 <at> live.com>
and subject line Re: bug#25670: Feature request: ignore --help in --script mode
has caused the debbugs.gnu.org bug report #25670,
regarding Feature request: ignore --help in --script mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
25670: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25670
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Feature request: ignore --help in --script mode
Date: Thu, 9 Feb 2017 16:00:59 -0500
[Message part 3 (text/plain, inline)]
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 (application/pgp-signature, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: 25670-done <at> debbugs.gnu.org
Subject: Re: bug#25670: Feature request: ignore --help in --script mode
Date: Fri, 10 Feb 2017 11:52:50 -0500
[Message part 6 (text/plain, inline)]
On 2017-02-10 10:05, Ted Zlatanov wrote:
> On Thu, 9 Feb 2017 16:00:59 -0500 Clément Pit--Claudel <clement.pitclaudel <at> live.com> 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 (application/pgp-signature, attachment)]

This bug report was last modified 8 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.