From: Eli Zaretskii <eliz@gnu.org>
To: Greg Minshall <minshall@umich.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs script options
Date: Sat, 18 Nov 2023 09:36:36 +0200 [thread overview]
Message-ID: <83cyw7o6m3.fsf@gnu.org> (raw)
In-Reply-To: <1325582.1700277236@archlinux> (message from Greg Minshall on Fri, 17 Nov 2023 19:13:56 -0800)
> From: Greg Minshall <minshall@umich.edu>
> Date: Fri, 17 Nov 2023 19:13:56 -0800
>
> hi. i would like to be able to write Emacs scripts ("#!...") that allow
> a user to enter almost any option to the script itself, *without* having
> to use double dashes ("--") to avoid colliding with Emacs option
> processing.
>
> looking at "--script" and "-x", this doesn't seem possible.
>
> as a test case, given a simple script foo.sh (*), using "-x", and
> invoking it with an option "--eval" gives this error:
>
> ----
> % ./foo.sh --eval
> emacs: Option '--eval' requires an argument
> ----
>
> (that bare "--eval" *should* be an error if it were meant for Emacs
> itself; however, it is meant for the Emacs script, which may have other
> ideas of the syntax/semantics of "--eval".)
But if we change that, how can we pass additional options to Emacs
when invoking it from a script? That is also an important capability,
and replacing it with what you want seems to be an incompatible
change, which takes away a capability we have now.
If we want to be able to pass options to the script itself, we need to
do it in a compatible way, that doesn't lose what we have now.
In any case, could you please show a real-life case where this is
needed? The -x option was intended to support the use cases where the
rest of the script is Emacs Lisp code, so what would such a script do
with an option that is not interpreted by Emacs, and why is that
needed?
Thanks.
next prev parent reply other threads:[~2023-11-18 7:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 3:13 (unknown) Greg Minshall
2023-11-18 7:05 ` (unknown) Jim Porter
2023-11-18 14:10 ` (unknown) -x behavior change Greg Minshall
2023-11-18 7:36 ` Eli Zaretskii [this message]
2023-11-18 14:38 ` Emacs script options Greg Minshall
2023-11-18 16:20 ` Eli Zaretskii
2023-11-18 19:36 ` Greg Minshall
2023-11-19 5:55 ` Eli Zaretskii
2023-11-27 3:29 ` Greg Minshall
2023-11-27 12:59 ` Eli Zaretskii
2023-11-27 19:32 ` Greg Minshall
2023-11-18 19:18 ` Sebastian Miele
2023-11-18 19:49 ` Greg Minshall
2023-11-19 21:39 ` Jens Schmidt
2023-11-19 21:47 ` Jens Schmidt
2023-11-20 1:19 ` Greg Minshall
2023-11-21 21:13 ` Jens Schmidt
2023-11-22 18:17 ` Sebastian Miele
2023-11-22 20:18 ` Jens Schmidt
2023-11-24 4:22 ` Greg Minshall
2023-11-26 18:07 ` Jens Schmidt
2023-11-20 6:10 ` Sebastian Miele
2023-11-20 20:10 ` Jens Schmidt
2023-11-21 8:51 ` Sebastian Miele
2023-11-19 5:04 ` Bob Rogers
2023-11-19 6:21 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83cyw7o6m3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=minshall@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).