GNU bug report logs - #24291
25.1; display-time-world seems to ignore zoneinfo-style-world-list when display-time-mode is t

Previous Next

Package: emacs;

Reported by: nljlistbox2 <at> gmail.com (N. Jackson)

Date: Tue, 23 Aug 2016 11:52:02 UTC

Severity: minor

Tags: patch

Found in version 25.1

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 24291 in the body.
You can then email your comments to 24291 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Tue, 23 Aug 2016 11:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to nljlistbox2 <at> gmail.com (N. Jackson):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 23 Aug 2016 11:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1;
 display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Tue, 23 Aug 2016 08:50:53 -0300
The command display-time-world seems to be ignoring the
zoneinfo-style-world-list variable; instead, the time for the default
list of cities is displayed.

Setting zoneinfo-style-world-list in `emacs -Q' works as expected, so I
bisected my init file and it seems that the problem is "caused" by
setting display-time-mode to show the clock in the mode line.

This recipe shows the problem from `emacs -Q'

0. emacs -Q

1. Enter the following elisp in *scratch*:

  (custom-set-variables
   '(display-time-mode t)
   '(zoneinfo-style-world-list
     (quote
      (("Etc/UTC" "Universal Time")
       ("AST4ADT" "Atlantic Time")
       ("EST5EDT" "Eastern Time")
       ("Europe/London" "London")
       ("Asia/Tokyo" "Tokyo")))))

2. `C-x C-e' (eval-last-sexp) to run it

3. `M-x display-time-world'

Observed result:

  Seattle   Tuesday 23 August 04:22 PDT
  New York  Tuesday 23 August 07:22 EDT
  London    Tuesday 23 August 12:22 BST
  Paris     Tuesday 23 August 13:22 CEST
  Bangalore Tuesday 23 August 16:52 IST
  Tokyo     Tuesday 23 August 20:22 JST

Expected result:

  Universal Time Tuesday 23 August 11:24 UTC
  Atlantic Time  Tuesday 23 August 08:24 ADT
  Eastern Time   Tuesday 23 August 07:24 EDT
  London         Tuesday 23 August 12:24 BST
  Tokyo          Tuesday 23 August 20:24 JST


If the recipe above is modified to remove the line that sets
display-time-mode, the output is as expected.

I'm more than slightly confused by what I'm observing here. I don't
believe it was more than a couple of months ago that I set z-s-w-l for
the first time. It worked perfectly then even though I always have d-t-m
on (because the mode line clock is the one I use to know what time it is
during the day). But now I'm seeing the reported problem in versions of
the Emacs 25 pre-release going back for months, and indeed, in Emacs
24.5.


In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-07-24 built on moondust
Windowing system distributor 'Fedora Project', version 11.0.11803000
System Description:	Fedora release 23 (Twenty Three)

Configured using:
 'configure --prefix=/home/nlj/local/ --enable-checking=yes,glyphs
 --enable-check-lisp-object-type 'CFLAGS=-O2 -g3 -gdwarf-4''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_MONETARY: en_DK.utf8
  value of $LC_NUMERIC: en_DK.utf8
  value of $LC_TIME: en_DK.utf8
  value of $LANG: en_CA.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix


Features:
(shadow bbdb-message emacsbug sendmail gnus-html browse-url url-cache
mm-url smiley gnus-cite gnus-bcklg gnus-async qp mail-extr gnus-ml
disp-table nndraft nnmh utf-7 server pinentry epa-file epa derived
network-stream nsm starttls nnfolder bbdb-gnus bbdb-mua nnnil gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache
org-clock tabify vc-git diff-mode python tramp-sh tramp tramp-compat
tramp-loaddefs trampver ucs-normalize json map sh-script smie executable
latexenc preview prv-emacs font-latex sage-latex tex-buf latex tex-style
tex dbus xml tex-mode shell flyspell ispell sage sage-load rx
emms-bookmarks emms-cue emms-mode-line-icon emms-browser sort
emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd
emms-playing-time emms-lyrics emms-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source url-vars emms-streams emms-tag-editor emms-mark
emms-mode-line emms-cache emms-info-ogginfo emms-info-mp3info emms-info
later-do emms-playlist-mode emms-player-vlc emms-player-mplayer
emms-player-simple emms-source-playlist emms-source-file locate
emms-setup emms emms-compat calfw-org calfw cl-seq holidays hol-loaddefs
cl pdf-occur ibuf-ext ibuffer tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw eieio eieio-core cl-macs mode-local cedet pdf-isearch
let-alist pdf-misc imenu pdf-tools compile cus-edit pdf-view bookmark pp
pdf-cache pdf-info tq pdf-util org-contacts org-capture gnus-art mm-uu
mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls
utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rfc822
mml mml-sec password-cache epg mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums gmm-utils mailheader gnus-win gnus
gnus-ems nnheader mail-utils mm-util help-fns mail-prsvr org-eldoc
org-w3m org-rmail org-mhe org-irc org-info org-habit org-gnus gnus-util
org-docview doc-view subr-x jka-compr image-mode dired org-bibtex bibtex
org-bbdb org-element avl-tree org-agenda org advice org-macro
org-footnote org-pcomplete pcomplete org-list org-faces org-entities
noutline outline easy-mmode org-version ob-latex ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint comint
ansi-color ring ob-core ob-eval org-compat org-macs org-loaddefs
format-spec find-func bbdb-anniv diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs bbdb-com crm mailabbrev bbdb bbdb-site timezone
bbdb-loaddefs finder-inf tex-site info package epg-config seq byte-opt
gv bytecomp byte-compile cl-extra help-mode cconv edmacro kmacro recentf
tree-widget wid-edit easymenu time wheatgrass-theme paren savehist
saveplace elec-pair battery desktop frameset cl-loaddefs pcase cl-lib
delsel cua-base cus-start cus-load time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 965862 52373)
 (symbols 48 105262 0)
 (miscs 40 19647 6806)
 (strings 32 175240 17487)
 (string-bytes 1 6112277)
 (vectors 16 82378)
 (vector-slots 8 2081333 128971)
 (floats 8 732 932)
 (intervals 56 73267 3321)
 (buffers 976 229)
 (heap 1024 114049 23712))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Tue, 23 Aug 2016 14:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: nljlistbox2 <at> gmail.com (N. Jackson)
Cc: 24291 <at> debbugs.gnu.org
Subject: Re: bug#24291: 25.1;
 display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Tue, 23 Aug 2016 17:43:29 +0300
> From: nljlistbox2 <at> gmail.com (N. Jackson)
> Date: Tue, 23 Aug 2016 08:50:53 -0300
> 
> 0. emacs -Q
> 
> 1. Enter the following elisp in *scratch*:
> 
>   (custom-set-variables
>    '(display-time-mode t)
>    '(zoneinfo-style-world-list
>      (quote
>       (("Etc/UTC" "Universal Time")
>        ("AST4ADT" "Atlantic Time")
>        ("EST5EDT" "Eastern Time")
>        ("Europe/London" "London")
>        ("Asia/Tokyo" "Tokyo")))))
> 
> 2. `C-x C-e' (eval-last-sexp) to run it
> 
> 3. `M-x display-time-world'
> 
> Observed result:
> 
>   Seattle   Tuesday 23 August 04:22 PDT
>   New York  Tuesday 23 August 07:22 EDT
>   London    Tuesday 23 August 12:22 BST
>   Paris     Tuesday 23 August 13:22 CEST
>   Bangalore Tuesday 23 August 16:52 IST
>   Tokyo     Tuesday 23 August 20:22 JST
> 
> Expected result:
> 
>   Universal Time Tuesday 23 August 11:24 UTC
>   Atlantic Time  Tuesday 23 August 08:24 ADT
>   Eastern Time   Tuesday 23 August 07:24 EDT
>   London         Tuesday 23 August 12:24 BST
>   Tokyo          Tuesday 23 August 20:24 JST

You need to set zoneinfo-style-world-list before time.el is loaded.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Tue, 23 Aug 2016 19:40:01 GMT) Full text and rfc822 format available.

Message #11 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24291 <at> debbugs.gnu.org
Subject: Re: bug#24291: 25.1;
 display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Tue, 23 Aug 2016 16:39:21 -0300
At 17:43 +0300 on Tuesday 2016-08-23, Eli Zaretskii wrote:

>> From: nljlistbox2 <at> gmail.com (N. Jackson)
>> Date: Tue, 23 Aug 2016 08:50:53 -0300
>> 
>> 0. emacs -Q
>> 
>> 1. Enter the following elisp in *scratch*:
>> 
>>   (custom-set-variables
>>    '(display-time-mode t)
>>    '(zoneinfo-style-world-list
>>      (quote
>>       (("Etc/UTC" "Universal Time")
>>        ("AST4ADT" "Atlantic Time")
>>        ("EST5EDT" "Eastern Time")
>>        ("Europe/London" "London")
>>        ("Asia/Tokyo" "Tokyo")))))
>> 
>> 2. `C-x C-e' (eval-last-sexp) to run it
>> 
>> 3. `M-x display-time-world'
>> 
>> Observed result:
>> 
>>   Seattle   Tuesday 23 August 04:22 PDT
>>   New York  Tuesday 23 August 07:22 EDT
>>   London    Tuesday 23 August 12:22 BST
>>   Paris     Tuesday 23 August 13:22 CEST
>>   Bangalore Tuesday 23 August 16:52 IST
>>   Tokyo     Tuesday 23 August 20:22 JST
>> 
>> Expected result:
>> 
>>   Universal Time Tuesday 23 August 11:24 UTC
>>   Atlantic Time  Tuesday 23 August 08:24 ADT
>>   Eastern Time   Tuesday 23 August 07:24 EDT
>>   London         Tuesday 23 August 12:24 BST
>>   Tokyo          Tuesday 23 August 20:24 JST
>
> You need to set zoneinfo-style-world-list before time.el is loaded.

I see. Then maybe showing he problem from `emacs -Q' requires a more
carefully-crafted example.

But this doesn't work when I run Emacs normally, and in that case I'm
not doing anything unusual. I don't know when time.el is loaded with
respect to when my init file is run. But even if I comment out my entire
init file except for this snippet, this problem occurs.

I can't change the order because Customize puts its variables in
alphabetical order.

N.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Wed, 24 Aug 2016 02:39:02 GMT) Full text and rfc822 format available.

Message #14 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: nljlistbox2 <at> gmail.com (N. Jackson)
Cc: 24291 <at> debbugs.gnu.org
Subject: Re: bug#24291: 25.1;
 display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Wed, 24 Aug 2016 05:38:27 +0300
> From: nljlistbox2 <at> gmail.com (N. Jackson)
> Cc: 24291 <at> debbugs.gnu.org
> Date: Tue, 23 Aug 2016 16:39:21 -0300
> 
> I can't change the order because Customize puts its variables in
> alphabetical order.

You can use setq instead.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Wed, 24 Aug 2016 05:41:02 GMT) Full text and rfc822 format available.

Message #17 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "N. Jackson" <nljlistbox2 <at> gmail.com>, 24291 <at> debbugs.gnu.org
Subject: Re: bug#24291: 25.1;
 display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Wed, 24 Aug 2016 01:40:02 -0400
Sounds like zoneinfo-style-world-list needs a :set function to update
any existing display.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Wed, 24 Aug 2016 21:04:01 GMT) Full text and rfc822 format available.

Message #20 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24291 <at> debbugs.gnu.org
Subject: Re: bug#24291: 25.1;
 display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Wed, 24 Aug 2016 18:03:03 -0300
At 05:38 +0300 on Wednesday 2016-08-24, Eli Zaretskii wrote:

>> From: nljlistbox2 <at> gmail.com (N. Jackson)
>> Cc: 24291 <at> debbugs.gnu.org
>> Date: Tue, 23 Aug 2016 16:39:21 -0300
>> 
>> I can't change the order because Customize puts its variables in
>> alphabetical order.
>
> You can use setq instead.

Hi Eli,

I'm not clear what you're telling me here.

If you're saying that there is a workaround available to me, then thank
you. Yes, indeed setq works.

If you are saying that there is no problem because the user can use
setq instead of using Customize, then I think I disagree. To me it
doesn't make sense for Emacs to have a variable that is "Customizable"
if using Customize to set it doesn't work reliably.

N.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Thu, 25 Aug 2016 02:41:02 GMT) Full text and rfc822 format available.

Message #23 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: nljlistbox2 <at> gmail.com (N. Jackson)
Cc: 24291 <at> debbugs.gnu.org
Subject: Re: bug#24291: 25.1;
 display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Thu, 25 Aug 2016 05:40:31 +0300
> From: nljlistbox2 <at> gmail.com (N. Jackson)
> Cc: 24291 <at> debbugs.gnu.org
> Date: Wed, 24 Aug 2016 18:03:03 -0300
> 
> At 05:38 +0300 on Wednesday 2016-08-24, Eli Zaretskii wrote:
> 
> >> From: nljlistbox2 <at> gmail.com (N. Jackson)
> >> Cc: 24291 <at> debbugs.gnu.org
> >> Date: Tue, 23 Aug 2016 16:39:21 -0300
> >> 
> >> I can't change the order because Customize puts its variables in
> >> alphabetical order.
> >
> > You can use setq instead.
> 
> Hi Eli,
> 
> I'm not clear what you're telling me here.
> 
> If you're saying that there is a workaround available to me, then thank
> you. Yes, indeed setq works.
> 
> If you are saying that there is no problem because the user can use
> setq instead of using Customize, then I think I disagree. To me it
> doesn't make sense for Emacs to have a variable that is "Customizable"
> if using Customize to set it doesn't work reliably.

Knowing me and my attitude towards Emacs, what do you think I'm
saying?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Mon, 02 Oct 2017 07:11:01 GMT) Full text and rfc822 format available.

Message #26 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "N. Jackson" <nljlistbox2 <at> gmail.com>
Cc: 24291 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Mon, 2 Oct 2017 00:10:09 -0700
[Message part 1 (text/plain, inline)]
This seems to be a clear bug in time.el, as a customizable variable's initial 
value should not depend on that of another customizable variable. Proposed patch 
attached.
[0001-Fix-customization-of-zoneinfo-style-world-list.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Mon, 02 Oct 2017 07:12:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Mon, 02 Oct 2017 16:02:02 GMT) Full text and rfc822 format available.

Message #31 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: nljlistbox2 <at> gmail.com, 24291 <at> debbugs.gnu.org
Subject: Re: display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Mon, 02 Oct 2017 19:00:56 +0300
> Cc: 24291 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Mon, 2 Oct 2017 00:10:09 -0700
> 
> This seems to be a clear bug in time.el, as a customizable variable's initial 
> value should not depend on that of another customizable variable. Proposed patch 
> attached.

LGTM, thanks.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 02 Oct 2017 16:09:02 GMT) Full text and rfc822 format available.

Notification sent to nljlistbox2 <at> gmail.com (N. Jackson):
bug acknowledged by developer. (Mon, 02 Oct 2017 16:09:03 GMT) Full text and rfc822 format available.

Message #36 received at 24291-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: nljlistbox2 <at> gmail.com, 24291-done <at> debbugs.gnu.org
Subject: Re: display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Mon, 2 Oct 2017 09:08:01 -0700
OK, I installed it on emacs-26 and am closing the bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24291; Package emacs. (Mon, 02 Oct 2017 17:02:01 GMT) Full text and rfc822 format available.

Message #39 received at 24291 <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 24291 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: display-time-world seems to ignore zoneinfo-style-world-list when
 display-time-mode is t
Date: Mon, 02 Oct 2017 13:00:55 -0400
Hello Paul,

At 00:10 -0700 on Monday 2017-10-02, Paul Eggert wrote:
>
> This seems to be a clear bug in time.el, as a customizable
> variable's initial value should not depend on that of another
> customizable variable. Proposed patch attached.

I have just tested your proposed patch, and it fixes the problem
here.

(I'm on a recent version of the emacs-26 branch:

In GNU Emacs 26.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.17)
 of 2017-10-02 built on moondust.localdomain
Repository revision: 8b2ab5014b2c1641bb62efa63b9ee54b4c056b5a
Windowing system distributor 'Fedora Project', version 11.0.11903000
System Description:	Fedora release 25 (Twenty Five)

.)

Thank you.

N.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 31 Oct 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.