all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Normalizing --script and --load behavior to respect "--"
@ 2022-06-10  1:24 Psionic K
  2022-06-13 21:07 ` Emanuel Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Psionic K @ 2022-06-10  1:24 UTC (permalink / raw)
  To: help-gnu-emacs

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 <psionik@positron.solutions>
Software Engineer

*Positron Solutions <https://positron.solutions>*


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Normalizing --script and --load behavior to respect "--"
  2022-06-10  1:24 Normalizing --script and --load behavior to respect "--" Psionic K
@ 2022-06-13 21:07 ` Emanuel Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg @ 2022-06-13 21:07 UTC (permalink / raw)
  To: help-gnu-emacs

Psionic K wrote:

> 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.

Example ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-13 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-10  1:24 Normalizing --script and --load behavior to respect "--" Psionic K
2022-06-13 21:07 ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.