all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Passing time zones
Date: Wed, 05 Feb 2025 00:55:05 +0000	[thread overview]
Message-ID: <pS-Pv0g4GxQeRMkKStl61UZ_RbWfBkgqGsBz9X1lP0upa6BlHyrV9-j1GxG-FyWsKp5RyY1uj6_ujj8A1bPpH5pZaOaRxycXzYckjMD3-84=@protonmail.com> (raw)

I need some ideas on how I can have the user input the time zone name.
The list has cons cells with the car having a time-zone label, while the
cdr has a name for the TZ Environment Variable.  The user will just select
the time-zone label.

  (interactive
    (list
      (read-string " Clock Name: " "World Clock")

      (let ( (cseq '(("UTC"         . "UTC")
                     ("New York"    . "America/New_York")
                     ("London"      . "Europe/London")
                     ("Tokyo"       . "Asia/Tokyo")
                     ("Sydney"      . "Australia/Sydney")
                     ("Berlin"      . "Europe/Berlin")
                     ("Los Angeles" . "America/Los_Angeles")
                     ("Kolkata"     . "Asia/Kolkata"))) )
        (completing-read " Time Zone: " cseq nil t))

      (let ( (cseq '("red" "green" "blue" "orange" "purple"
                     "cyan" "magenta" "yellow")) )
        (completing-read " Colour: " cseq nil t))))






             reply	other threads:[~2025-02-05  0:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05  0:55 Heime via Users list for the GNU Emacs text editor [this message]
2025-02-05 10:18 ` Passing time zones Joel Reicher
2025-02-05 10:19 ` Joel Reicher
2025-02-05 12:00   ` Heime via Users list for the GNU Emacs text editor
2025-02-05 13:18     ` Heime via Users list for the GNU Emacs text editor

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='pS-Pv0g4GxQeRMkKStl61UZ_RbWfBkgqGsBz9X1lP0upa6BlHyrV9-j1GxG-FyWsKp5RyY1uj6_ujj8A1bPpH5pZaOaRxycXzYckjMD3-84=@protonmail.com' \
    --to=help-gnu-emacs@gnu.org \
    --cc=heimeborgia@protonmail.com \
    /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.