From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#20682: bug#25671: Feature request: emacs -Q --script as a single binary Date: Mon, 18 Apr 2022 13:01:10 +0200 Message-ID: <874k2qk64p.fsf_-_@gnus.org> References: <878uc8pzyc.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31777"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 25671@debbugs.gnu.org, Michael Heerdegen , Stefan Monnier , 20682@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 18 13:03:22 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngPA9-00084Q-AJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Apr 2022 13:03:21 +0200 Original-Received: from localhost ([::1]:48022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngPA7-0005nE-Og for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Apr 2022 07:03:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngP8s-0005mG-IF for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2022 07:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44287) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngP8s-0004Mk-8y for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2022 07:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ngP8s-0002bx-15 for bug-gnu-emacs@gnu.org; Mon, 18 Apr 2022 07:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Apr 2022 11:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20682 X-GNU-PR-Package: emacs Original-Received: via spool by 20682-submit@debbugs.gnu.org id=B20682.16502796859976 (code B ref 20682); Mon, 18 Apr 2022 11:02:01 +0000 Original-Received: (at 20682) by debbugs.gnu.org; 18 Apr 2022 11:01:25 +0000 Original-Received: from localhost ([127.0.0.1]:38179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngP8H-0002ap-2a for submit@debbugs.gnu.org; Mon, 18 Apr 2022 07:01:25 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:52284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngP8E-0002aX-OV; Mon, 18 Apr 2022 07:01:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hCxUx/RO4VLH1fcue8+R9qLDs/9O4MPrub76ckAz+ys=; b=CF3J7TSpI6LrS6sYfpSefW45nS GNx9brL/hbXjR3/1d87cw1G9+oN3dOu9X0fDGJqpUPVVTCHlpFEGp3jNmx8iWLB9tnHwrxozaj5gq RdXL29Dxed4z/c2waCjQOHXB1H5mcIJIimaH1k6FWAYMvvLT53rCYseJT7QlGIswGUAE=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngP83-00013j-KE; Mon, 18 Apr 2022 13:01:14 +0200 In-Reply-To: (Glenn Morris's message of "Thu, 28 May 2015 16:30:19 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230166 Archived-At: Glenn Morris 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