unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thibault Polge <thibault@thb.lt>
To: 31859@debbugs.gnu.org
Subject: bug#31859: 26.1; Emacs has no way to determine if the current instance has a running server
Date: Sat, 16 Jun 2018 18:27:03 +0200	[thread overview]
Message-ID: <87sh5md7e0.fsf@thb.lt> (raw)
In-Reply-To: <83a7ruzp0o.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

> Does it work to test whether server-process is bound and non-nil?

It works, indeed.  Would you accept a documentation PR on the variable
and the two functions, which are much more obvious candidates?
Something like:

For a general way of determining if the current instance has a server
running, check the value of `server-process`.

Or a PR adding a stupid helper function like:

;; server.el ---
...
;;;###autoload
(defun server-started-p ()
    "Return non-nil if this Emacs has a server started."
    (and (boundp server-process) server-process))

What do you think?

Th

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-06-16 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16 16:04 bug#31859: 26.1; Emacs has no way to determine if the current instance has a running server Thibault
2018-06-16 16:15 ` Eli Zaretskii
2018-06-16 16:27   ` Thibault Polge [this message]
2018-06-16 16:30     ` Eli Zaretskii
2018-06-23  7:52       ` 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=87sh5md7e0.fsf@thb.lt \
    --to=thibault@thb.lt \
    --cc=31859@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 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).