From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Greg Minshall Newsgroups: gmane.emacs.devel Subject: Re: Emacs script options Date: Sat, 18 Nov 2023 11:36:52 -0800 Message-ID: <7094.1700336212@archlinux> References: <1325582.1700277236@archlinux> <83cyw7o6m3.fsf@gnu.org> <1496758.1700318304@archlinux> <83cyw7m3rr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26860"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 18 20:37:41 2023 Return-path: Envelope-to: ged-emacs-devel@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 1r4R8O-0006nV-LS for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Nov 2023 20:37:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4R82-0007vm-4z; Sat, 18 Nov 2023 14:37:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4R7t-0007tG-K9 for emacs-devel@gnu.org; Sat, 18 Nov 2023 14:37:09 -0500 Original-Received: from relay-egress-host.us-east-2.a.mail.umich.edu ([13.59.128.245] helo=friendly-aeron.relay-egress.a.mail.umich.edu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r4R7o-0003oi-N2; Sat, 18 Nov 2023 14:37:09 -0500 Original-Received: from amenable-duende.authn-relay.a.mail.umich.edu (ip-10-0-73-242.us-east-2.compute.internal [10.0.73.242]) by friendly-aeron.relay-egress.a.mail.umich.edu with ESMTPS id 6559125E.6A55D9E.7BC5E346.541446; Sat, 18 Nov 2023 14:37:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=relay-2018-08-29; t=1700336221; bh=f+snqq/W+ecIHVEWzdjSomqRcB8iSbFLWWT6ICBDsXw=; h=To:cc:From:Subject:In-reply-to:References:Date; b=qEuyUHWkRQLzDFG86SeLXxWjf5kcAkYo/bGOVtx7gY492lbebSA4SrPk5xiTjSF6F IJ1UwF+X1j7BFUcskOu7pdTJTzodOzAuYIHzCKgh62Sf2rdp/ygcw4OGHiCrHRV8wV FsvNPEj7tizyigseHaOX9iKDcFOmZAaYVI7+bUMz90MttDuSJGYxJFtM4+ILOM/qGH czr+w/jhuleO839QlPL0s5cXlwsK59IM3b3BIUtcILq1JHFiPGRbjNqx77nzmoh2j+ 4/iBsUq/knBGDbeHIue5p8HKAuMQ9tRZnnDt1fHI1oTMj6KwzESqO9WDVP3DY1p1th x2/Ahxl8ES1Hw== Authentication-Results: amenable-duende.authn-relay.a.mail.umich.edu; iprev=pass policy.iprev=134.16.93.10 (134-016-093-010.res.spectrum.com); auth=pass smtp.auth=minshall Original-Received: from localhost (134-016-093-010.res.spectrum.com [134.16.93.10]) by amenable-duende.authn-relay.a.mail.umich.edu with ESMTPSA id 6559125D.5DEA03C.43279B06.1619697; Sat, 18 Nov 2023 14:37:01 -0500 In-reply-to: <83cyw7m3rr.fsf@gnu.org> Comments: In-reply-to Eli Zaretskii message dated "Sat, 18 Nov 2023 18:20:56 +0200." X-Mailer: MH-E 8.6+git; nmh 1.7.1; Emacs 30.0.50 Content-ID: <7093.1700336212.1@archlinux> Received-SPF: pass client-ip=13.59.128.245; envelope-from=minshall@umich.edu; helo=friendly-aeron.relay-egress.a.mail.umich.edu X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312927 Archived-At: Eli Zaretskii wrote: > How would you pass these -F, -d, -V etc. options to Emacs, or use them > in any other way in the script, whose contents is supposed to be an > Emacs Lisp program? There's something I'm missing here. I asked my > question because I thought you had a real-life example of a script you > wanted to use, but in your response you don't show any such example. > Can you show it? in this case, the -F, -d, -V are aimed at the elisp code running in the script, not for Emacs itself. think of wanting to convert some random unix utility to run as an Emacs script (rather than as a shell script, say), and trying to make the command line options (and invocation) the same as the original shell script. does that help clarify? in my case, i have the beginnings of a shell script that is to set up some state and then invoke Emacs to do some work (org mode stuff). its projected getopt(1) strings look like ---- getopt -o "B:C:dhP:V" -l "base-dir:,config-file:,debug,help,publish-dir:,v= ersion" ---- presumably most of those options (especially the long ones) don't conflict with any Emacs command line options. but, some might ("-d" does, as it turns out). i'd like the users (hah!) to be able to type ---- ./random-script -d --base-dir ${PWD}/foo ---- rather than ---- ./random-script -- -d --base-dir ${PWD}/foo ---- cheers, Greg (truth in advertising: in addition to this *application*, i also -- for this application, really -- wrote some emacs-getopt package that would probably benefit from such a facility.)