unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24949: Command-line argument parsing: named daemons
@ 2016-11-15 22:25 Glenn Morris
  2016-11-16  3:39 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2016-11-15 22:25 UTC (permalink / raw)
  To: 24949

Package: emacs
Severity: minor
Version: 25.1

This starts a daemon with a server named "FOO":
   emacs -Q --daemon=FOO

(This usage is documented in the "Initial Options" appendix of the
manual, but not mentioned in --help, or the man page.)


But this very similar form does not work (it starts an un-named daemon and
visits file "FOO"):
   emacs -Q --daemon FOO

Compare with something like "--chdir /tmp", where both forms (with and
without "=") work.

This is due to the fragility of the Emacs argument parsing code,
which seems pretty home-grown. In particular, I guess it is because
struct standard_args has --daemon listed as taking no arguments.
Options with optional arguments don't seem to be handled.

There is a 20-year old comment in emacs.c:

   Too bad we can't just use getopt for all of this, but we don't have
   enough information to do it right.

Perhaps standard argument parsing libraries have improved since then...?





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

end of thread, other threads:[~2019-05-05 17:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15 22:25 bug#24949: Command-line argument parsing: named daemons Glenn Morris
2016-11-16  3:39 ` Eli Zaretskii
2017-09-06 17:33   ` Philipp Stephani
2017-09-06 18:05     ` Eli Zaretskii
2017-09-06 18:32       ` Philipp Stephani
2017-09-07  2:31         ` Eli Zaretskii
2017-09-08  3:46           ` Richard Stallman
2018-01-07 22:44   ` Philipp Stephani
2018-01-08  4:00     ` Eli Zaretskii
2019-05-05  3:59       ` Noam Postavsky
2019-05-05 17:16         ` Philipp Stephani
2018-01-08  8:44     ` Andreas Schwab

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