From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25670: Feature request: ignore --help in --script mode Date: Sat, 18 Feb 2017 11:59:00 +0200 Message-ID: <83fujbrfa3.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1487411953 31865 195.159.176.226 (18 Feb 2017 09:59:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2017 09:59:13 +0000 (UTC) Cc: 25670@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 18 10:59:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cf1nF-0007Z4-8w for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Feb 2017 10:59:05 +0100 Original-Received: from localhost ([::1]:57834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf1nK-0004lc-SY for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Feb 2017 04:59:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf1nE-0004lW-VW for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2017 04:59:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cf1nB-0007zQ-VC for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2017 04:59:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cf1nB-0007zM-Rf for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2017 04:59:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cf1nB-0004Ra-Lb for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2017 04:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2017 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25670 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25670-submit@debbugs.gnu.org id=B25670.148741192117057 (code B ref 25670); Sat, 18 Feb 2017 09:59:01 +0000 Original-Received: (at 25670) by debbugs.gnu.org; 18 Feb 2017 09:58:41 +0000 Original-Received: from localhost ([127.0.0.1]:44166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cf1mr-0004R2-G5 for submit@debbugs.gnu.org; Sat, 18 Feb 2017 04:58:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cf1mp-0004Qq-On for 25670@debbugs.gnu.org; Sat, 18 Feb 2017 04:58:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cf1mh-0007gW-Fq for 25670@debbugs.gnu.org; Sat, 18 Feb 2017 04:58:34 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf1mh-0007gP-CN; Sat, 18 Feb 2017 04:58:31 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4862 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cf1mg-0005wq-KU; Sat, 18 Feb 2017 04:58:31 -0500 In-reply-to: (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel on Thu, 9 Feb 2017 16:00:59 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129486 Archived-At: > From: Clément Pit--Claudel > Date: Thu, 9 Feb 2017 16:00:59 -0500 > > 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? What should be done with --help in that case? (In general, I'd expect such script not to use --help or --version at all.) > 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? Which other options should be processed when --script is given? Are there any requirements for what command-line-args-left should have when the script is loaded? IOW, it is not clear to me what are the expectations in this use case. Please take a look at how the command-line arguments are processed at startup, in emacs.c and in startup.el, and make a more detailed proposal. Then we could see if it's easy to implement without potentially breaking anything.