help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Impossible to customize world clock


From: Eli Zaretskii
Subject: Re: Impossible to customize world clock
Date: Tue, 09 Apr 2024 07:00:16 +0300

> From: tpeplt <tpeplt@gmail.com>
> Cc: Kepa <gnu.cognition199@slmails.com>
> Date: Mon, 08 Apr 2024 16:45:22 -0400
> 
> Kepa via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
> 
> > I add a new one (Europe/Berlin):
> >
> >  '(zoneinfo-style-world-list
> >    '(("America/Los_Angeles" "Seattle")
> >      ("America/New_York" "New York")
> >      ("Europe/London" "London")
> >      ("Europe/Paris" "Paris")
> >      ("Asia/Calcutta" "Bangalore")
> >      ("Asia/Tokyo" "Tokyo")
> >      ("Europe/Berlin" "Germany"))))
> >
> 
> Notice that the second string in each pair is a city name, rather than a
> country name.  So, your new entry should be: ("Europe/Berlin" "Berlin")

No, the second string is just a label, something you want to be shown
as the name of the corresponding time zone.  It can be anything, not
necessarily the name of a city.  See the doc string for more detail.

> This new entry appears to work as expected.  Try the following:
> 
> 1. Start Emacs from a shell prompt with no configuration:
> 
>    $ emacs -Q
> 
> 2. In the *scratch* buffer, enter 
> 
>    M-x world-clock RET
> 
> 3. Evaluate the following expression in the *scratch* buffer:
> 
> (cl-pushnew '("Europe/Berlin" "Berlin") zoneinfo-style-world-list)

This signals an error:

  error: (void-function cl-pushnew)

> 4. Try ‘world-clock’ again:
> 
>    M-x world-clock RET
> 
> Results:
> 
> Berlin    Monday 08 April 22:33 CEST
> Seattle   Monday 08 April 13:33 PDT
> New York  Monday 08 April 16:33 EDT
> London    Monday 08 April 21:33 BST
> Paris     Monday 08 April 22:33 CEST
> Bangalore Tuesday 09 April 02:03 IST
> Tokyo     Tuesday 09 April 05:33 JST

If this works for you, you are not on MS-Windows, like the OP.

> 5. If you want to make this permanent, one way to do that is to use
> ‘customize-option’:
> 
>    M-x customize-option RET
> 
>    a. At the "Customize variable: " prompt, type zoneinfo-style-world-list RET

On MS-Windows, one should customize legacy-style-world-list instead.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]