all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: 24949@debbugs.gnu.org
Subject: bug#24949: Command-line argument parsing: named daemons
Date: Tue, 15 Nov 2016 17:25:46 -0500	[thread overview]
Message-ID: <05vavopehh.fsf@fencepost.gnu.org> (raw)

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





             reply	other threads:[~2016-11-15 22:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 22:25 Glenn Morris [this message]
2016-11-16  3:39 ` bug#24949: Command-line argument parsing: named daemons 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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05vavopehh.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=24949@debbugs.gnu.org \
    /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 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.