all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 34448@debbugs.gnu.org
Subject: bug#34448: --no-build-details means system-name is nil
Date: Thu, 10 Oct 2019 00:26:53 +0200	[thread overview]
Message-ID: <87imoxzhaq.fsf@gnus.org> (raw)
In-Reply-To: <bdbm3hrctj.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 11 Feb 2019 20:54:32 -0500")

Glenn Morris <rgm@gnu.org> writes:

> emacs -Q --no-build-details
>
> then (system-name) returns nil. I expect this switch to only affect the
> values stored in the Emacs binary, not the run-time result.

Yup.  It seems like this was the intention here:

void
init_system_name (void)
{
  if (!build_details)
    {
      /* Set system-name to nil so that the build is deterministic.  */
      Vsystem_name = Qnil;
      return;
    }

which is called from

static void
init_and_cache_system_name (void)
{
  init_system_name ();
  cached_system_name = Vsystem_name;
}

which is called from

DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0,
       doc: /* Return the host name of the machine you are running on, as a string.  */)
  (void)
{
  if (EQ (Vsystem_name, cached_system_name))
    init_and_cache_system_name ();
  return Vsystem_name;

Is --no-build-details just meant to be used during builds?  If so, we
can just document that, I guess?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-10-09 22:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  1:54 bug#34448: --no-build-details means system-name is nil Glenn Morris
2019-10-09 22:26 ` Lars Ingebrigtsen [this message]
2019-10-10  7:39   ` Eli Zaretskii
2019-10-11  7:05     ` Lars Ingebrigtsen

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=87imoxzhaq.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=34448@debbugs.gnu.org \
    --cc=rgm@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.