[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Normalizing --script and --load behavior to respect "--"

From: Psionic K
Subject: Normalizing --script and --load behavior to respect "--"
Date: Thu, 9 Jun 2022 20:24:22 -0500

I noticed that --script does not seem to respect the normal "--" cutoff for
arguments.  I expected Emacs would consume all arguments it supports and
then set `argv' to the remaining arguments, using "--" to distinguish when
to stop trying to consume.

I believe --load and --script should be similar because otherwise a script
has to skip over or interpret arguments that were intended for Emacs.

My A/B problem is running tests with a graphical window versus without.
Because --quick --no-window-system --load <file> presents a dilemma of how
to report test feedback, I used --script to run tests without a window and
encountered the behavior difference.

I'm currently using a workaround to consume extra arguments conditionally
in the loaded elisp file.

Nix wrapper scripts exhibit problematic interaction with this issue.  I
used the direct path to the binary to confirm that the behavior exists
without the wrapper.  --script always sees all of the arguments while --load
only sees non-Emacs arguments.


Psionic K <>
Software Engineer

*Positron Solutions <>*

reply via email to

[Prev in Thread] Current Thread [Next in Thread]