GNU bug report logs -
#19438
24.4; system-name bad cache
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Thu, 25 Dec 2014 10:22:02 UTC
Severity: minor
Found in version 24.4
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19438 in the body.
You can then email your comments to 19438 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Thu, 25 Dec 2014 10:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo Liu <sdl.web <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 25 Dec 2014 10:22:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I just moved from one network to another and find that my long running
Emacs no longer has the right value for (system-name).
I am seeing this: (system-name) => Leos-MacBook.local
but a freshly-started emacs gives me: 014136144036.static.ctinets.com
It turns out system name is not computed dynamically. Could someone fix
this problem? Thanks.
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Fri, 26 Dec 2014 03:58:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 19438 <at> debbugs.gnu.org (full text, mbox):
> I am seeing this: (system-name) => Leos-MacBook.local
> but a freshly-started emacs gives me: 014136144036.static.ctinets.com
AFAIK neither of those two names correspond to the intended meaning of
`system-name', which should be "the name of machine" (something that
ideally won't change until the machine is retired or at most
re-purposed), rather than "some DNS name you can use to access the
machine".
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Fri, 26 Dec 2014 16:09:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 19438 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Unfortunately even "the name of the machine" can change; e.g., I can invoke the
shell command "hostname garfield" to change my machine's name to garfield.
Also, I expect that if Emacs has its process migrated (LinuxPMI, anybody?) it
will then be running on a different machine with a different name.
How about the attached patch? The idea is that (system-name) actually inquires
for the current system name, and system-name caches the result. If an Emacs
lisp program assigns to system-name, though, it's no longer updated thereafter.
[0001-system-name-s-returned-value-can-vary.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Fri, 26 Dec 2014 22:12:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 19438 <at> debbugs.gnu.org (full text, mbox):
On 2014-12-27 03:07 +1100, Paul Eggert wrote:
> How about the attached patch? The idea is that (system-name) actually
> inquires for the current system name, and system-name caches the
> result. If an Emacs lisp program assigns to system-name, though, it's
> no longer updated thereafter.
Why not get rid of the variable system-name? It seems what it provides
can be easily achieved without it. Thanks for looking into the issue.
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Fri, 26 Dec 2014 22:17:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 19438 <at> debbugs.gnu.org (full text, mbox):
Leo Liu wrote:
> Why not get rid of the variable system-name? It seems what it provides
> can be easily achieved without it.
It's documented so we shouldn't just remove it; we'd need to mark it as obsolescent.
Its documented behavior is "you can set the variable @code{system-name} in case
Emacs is confused about the name of your system". I've never found this feature
to be useful, though I understand it was useful for others long ago. Perhaps
some people still find it useful? Anyway, if there's consensus to mark the
variable as obsolescent I can prepare a patch along those lines.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Sat, 27 Dec 2014 15:14:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 19438 <at> debbugs.gnu.org (full text, mbox):
>> Why not get rid of the variable system-name? It seems what it provides
>> can be easily achieved without it.
> It's documented so we shouldn't just remove it; we'd need to mark it
> as obsolescent.
> Its documented behavior is "you can set the variable @code{system-name} in
> case Emacs is confused about the name of your system". I've never found
> this feature to be useful, though I understand it was useful for others long
> ago. Perhaps some people still find it useful? Anyway, if there's
> consensus to mark the variable as obsolescent I can prepare a patch along
> those lines.
Maybe we could mark it obsolete, tho I'm not completely sure what
replaces it. Random thoughts:
- "it" is unclear, since currently the var and the function are just identical.
- this not-very-useful functionality occasionally causes 30s wait at
startup time, so it would be good to get rid of the DNS lookup.
Maybe we could make the system-name function return the same as
`hostname` (and do it dynamically).
> How about the attached patch? The idea is that (system-name) actually
> inquires for the current system name, and system-name caches the result.
> If an Emacs lisp program assigns to system-name, though, it's no longer
> updated thereafter.
Sounds OK.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Sat, 27 Dec 2014 23:32:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 19438 <at> debbugs.gnu.org (full text, mbox):
On 2014-12-28 02:13 +1100, Stefan Monnier wrote:
> Maybe we could mark it obsolete, tho I'm not completely sure what
> replaces it. Random thoughts:
> - "it" is unclear, since currently the var and the function are just identical.
> - this not-very-useful functionality occasionally causes 30s wait at
> startup time, so it would be good to get rid of the DNS lookup.
I am mostly against having a variable and a function for a simple small
feature. Such feature should be straightforward to use with either the
variable or the function public. With Paul's change it only makes sense
to use (system-name), the variable system-name just provides a way to
override it. Worst comes to worst, they can advise it.
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Sun, 28 Dec 2014 01:12:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 19438 <at> debbugs.gnu.org (full text, mbox):
> variable or the function public. With Paul's change it only makes sense
> to use (system-name), the variable system-name just provides a way to
> override it. Worst comes to worst, they can advise it.
That's right. But we have to take backward compatibility into account.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19438
; Package
emacs
.
(Sun, 28 Dec 2014 02:04:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 19438 <at> debbugs.gnu.org (full text, mbox):
> On 2014年12月28日, at 12:11, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>
> That's right. But we have to take backward compatibility into account.
Agreed. I meant to say phase out:)
Leo
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Mon, 29 Dec 2014 20:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leo Liu <sdl.web <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 29 Dec 2014 20:48:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 19438-done <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier wrote:
> Maybe we could make the system-name function return the same as
> `hostname` (and do it dynamically).
OK, thanks, I revised the patch to do that, and made the var obsolete, and
installed something along those lines into the master. (It was 3 patches not
one because I installed the wrong version first, sorry.) Marking this as done.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 27 Jan 2015 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 92 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.