From unknown Thu Sep 11 06:21:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#79217 <79217@debbugs.gnu.org> To: bug#79217 <79217@debbugs.gnu.org> Subject: Status: [PATCH] display-time-mode: Include world-clock time in mode line. Reply-To: bug#79217 <79217@debbugs.gnu.org> Date: Thu, 11 Sep 2025 13:21:12 +0000 retitle 79217 [PATCH] display-time-mode: Include world-clock time in mode l= ine. reassign 79217 emacs submitter 79217 Wilko Meyer severity 79217 normal tag 79217 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 11 10:00:57 2025 Received: (at submit) by debbugs.gnu.org; 11 Aug 2025 14:00:57 +0000 Received: from localhost ([127.0.0.1]:49582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulT56-0000Wy-Mr for submit@debbugs.gnu.org; Mon, 11 Aug 2025 10:00:57 -0400 Received: from lists.gnu.org ([2001:470:142::17]:34104) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulT4w-0000WJ-Aw for submit@debbugs.gnu.org; Mon, 11 Aug 2025 10:00:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ulT4f-00035t-Fo for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2025 10:00:29 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ulT4Z-0002M3-OV for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2025 10:00:29 -0400 DKIM-Signature: a=rsa-sha256; b=hkl6kvwnGLVsEreogXuSGLC59Aarar3I2x2cI3JPc2R9DCCgL1kR4cBRKM7fbHULlZrNez+Fopl4zlOuC7SoXyw89OAd5ZKjHzWiSfPD5Yii+BlTDmiiSwxdJuW2nOJQ+VIb28BDBKCa+cUXUDswzxZMVEkcW67G3Bpsd1+r7J/jHpCZ79kk9beMOICPVLG0BrSY+7yFcaRLDmvMHTEn/Pwn6DxNSb49+VV3To4RAkl9OF6UqZZs4VbB1lm+Tz/nmWEEvWqi4yhKiPBaxjXYwnisCQ3fB/UCzqcEvEc/VfEC37f6ZX8d3z8pdw1/PqKVILM7QRJJ5tM44Byai+kGQQ==; s=purelymail1; d=wmeyer.eu; v=1; bh=jqF4fvGbxBp3XM+4fu8zjQX4d48muYENN3QOSn6qZpg=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=i/uyusihIYS1oyJFSqVIbgsro2WFD8UScKayQyUoleUp4rHermysQT9TrBGfEZ7D9iaHuVpf/7iwz7olyEK7mS2t1EvKwUJuI18dlAlTA7nkkS5+qQc1JJ5rkvcpTz7KRwE+q/cG/iIN5Ra//MR4TkfB2MbNcckM7xcUPKvEPWv5DdYtuHY4xGEvRWBu/hf81PtRH5ZBi65GDdnA4ka2n/oz9pXb2vWxslDRposq0ZFA/XLr8zwMY0cYvZY8gAS/UR+HB5RqM0htwOzUCIpQIPK/CEUXrDkwHs+BsXQbJRHPIVcG4k4D+3a3TOHibQRh9v7c5Lkk2qidn99mGfF0gQ==; s=purelymail1; d=purelymail.com; v=1; bh=jqF4fvGbxBp3XM+4fu8zjQX4d48muYENN3QOSn6qZpg=; h=Feedback-ID:Received:From:To:Subject:Date; Feedback-ID: 82836:11164:null:purelymail X-Pm-Original-To: bug-gnu-emacs@gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 388967713 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 11 Aug 2025 14:00:17 +0000 (UTC) From: Wilko Meyer To: bug-gnu-emacs@gnu.org Subject: [PATCH] display-time-mode: Include world-clock time in mode line. Date: Mon, 11 Aug 2025 16:00:15 +0200 Message-ID: <86ikiuklg0.fsf@wmeyer.eu> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=34.202.193.197; envelope-from=w@wmeyer.eu; helo=sendmail.purelymail.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Hi, This patch introduces an user option to conditionally include world-clock time, in addition to the localtime, when display-time-mode is active, in mode line. Right now time in different timezones is only available in a separate world-clock buffer, having this information included in the mode line would be useful in my book. WDYT? I'm not sure if I already have assigned copyright to the FSF before, so I'll do that within the next hours as required. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-display-time-mode-Add-option-to-show-world-clock-tim.patch Content-Description: 0001-display-time-mode-world-clock.patch >From ac5e6bb2be0c0636534be55a170b34dd8386ef5f Mon Sep 17 00:00:00 2001 From: Wilko Meyer Date: Mon, 11 Aug 2025 15:34:07 +0200 Subject: [PATCH] display-time-mode: Include world-clock time in mode line. * lisp/time.el (display-time-include-world-clock): Add user option. (display-time-string-forms): Conditionally include world clock time. --- lisp/time.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lisp/time.el b/lisp/time.el index 3750206d08e..f6da94d2e9a 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -177,6 +177,11 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'." :type '(choice (const :tag "Default" nil) string)) +(defcustom display-time-include-world-clock nil + "Non-nil means time from `world-clock-list', `zoneinfo-style-world-list' +or `legacy-style-world-list' entries are displayed in mode line." + :type 'boolean) + (defcustom display-time-string-forms '((if (and (not display-time-format) display-time-day-and-date) (format-time-string "%a %b %e " now) @@ -187,6 +192,18 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'." now) 'face 'display-time-date-and-time 'help-echo (format-time-string "%a %b %e, %Y" now)) + (if display-time-include-world-clock + (mapconcat + (lambda (p) + (pcase-let ((`(,tz ,label) p)) + (format " %s (%s)" + (format-time-string + (or display-time-format + (if display-time-24hr-format "%H:%M" "%-I:%M%p")) + now tz) + label))) + (time--display-world-list)) + "") load (if mail ;; Build the string every time to act on customization. -- 2.50.1 --=-=-= Content-Type: text/plain -- Kind regards, Wilko Meyer --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 11 19:15:17 2025 Received: (at 79217) by debbugs.gnu.org; 11 Aug 2025 23:15:17 +0000 Received: from localhost ([127.0.0.1]:50629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulbjZ-0004E7-3p for submit@debbugs.gnu.org; Mon, 11 Aug 2025 19:15:17 -0400 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]:47558) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ulbjT-0004CQ-RP for 79217@debbugs.gnu.org; Mon, 11 Aug 2025 19:15:13 -0400 Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-7074a74248dso44518516d6.3 for <79217@debbugs.gnu.org>; Mon, 11 Aug 2025 16:15:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754954104; x=1755558904; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:cc:content-language:from :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=RtMzpeqldOOmKnN6bX+JCV9E5k/ucOvKWukcQXVN1SU=; b=SFrV4rwheIjt8ZUe4vexcpYVy+4c1+SdOXmFglZaD0cjAt92t1qN43R94OlOpw7JdB O7aNT+5oOXScs5np3ioSHtKMc/hPMLg8jxft5FK75xo042eqzvUJJK/guT7+oMKw7z19 gA45dlOmea+VM3nRvlAaqUKOHg1BbkHX8xkhfdJiao0l1IHCxLKFjG2oJSfrEDh8GpDZ 1YMuCWCVerCyerbqEJhV/cQLy2XUzmblrPPzNZZ57koxYOvhJG2JqYy1OFLB+n7/xhDG QlVP++hzogL1jFK+QNGyGaTlme4MeEAs8UMy60YikxcHK5cSpxekf62V5COhR/jYpXhv gqjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754954104; x=1755558904; h=content-transfer-encoding:in-reply-to:cc:content-language:from :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RtMzpeqldOOmKnN6bX+JCV9E5k/ucOvKWukcQXVN1SU=; b=A6ccPKX/ObhuXvWKeVgyQaIQT8rOK/pwvTY1X98f7EAsM4md9n3HUmLeURLRWkU2vV k3D2cskS5EyyO+/C43cAJZn7T1M495bDURih50OJ5hG5Eo+VFwPlzSm1GdnxGE3Ss1gU FNQPlKmt4l+H6GekoGQ4YXrpxBKdnSp/cuAXyJUdoZsLN1BbFI7UT/ib4qUpFrY11t8G Gpebyph8nVAsy3Ml4isUNrQza+O4O27fHeaIg8bRgxXbWLLKOvOzxnxLpAsBM9wSFYhV PFhUdlJU3/vPqZiBxtrlHeCjCyC+hPaYr5M/uFxPdr9rEOKMDjNjPVhtJRcLVJagVQpo XqXw== X-Gm-Message-State: AOJu0YyOwYhamM2rXe6xAVs6zJY5ef+t57xr0vTPkzH41Z2M8AF2U9TM zIAwkci/TjXV6PhhYxXzgGOqQVJ7RoNuHAaJbQFDhTfacr2SsGxErHom/WLD7f+z X-Gm-Gg: ASbGncuHxlK9mdGzdeJ+lV4ozKPOu//xqOXQsur0yblMfDvzYHxLOZaHftZT3Tt+eb9 59PWPJyD+5T6RETQxM5puYR+RHaeS31vxJy+psKySq7cTObWqs17j9juf7DhzrauM69U2/JaZ6k 1NJMYxaVg546sFDoOxMfFe+mi226KOIfecOy4/1vAbaHvreq5JJ4BMtWueSqYUBze2wU5UnrUFN nTmRH045KMQ/vtA7wxoOPy/U+yGkrqppC0/AGl6NgHMhWO9Sy6u+TQDyVBo0MDXL1+OCXOsz7oF htz92OxeHlvSL28uwvN849vdt0CmQCard94v2pdsUa3GvXXqVnjXHBFaCGFck6qt/LVvMWpZMzl E+ZTA2/SrHmH9sYRjlDeeYZmB/zCPKfsXkewJyZ6ov9v6sNgG4dv2wr1B7pHNOQ== X-Google-Smtp-Source: AGHT+IE5g2dsNjfFWcbB6tfINWRhzmvxcTHMArlK5rQxs1w6xUP9jBP5hWG3+jdHfgL3ALO25O2Tpg== X-Received: by 2002:ad4:5f8f:0:b0:709:b56a:92c0 with SMTP id 6a1803df08f44-709d5ce3cc0mr28649556d6.21.1754954103511; Mon, 11 Aug 2025 16:15:03 -0700 (PDT) Received: from [192.168.1.10] (135-23-138-165.cpe.pppoe.ca. [135.23.138.165]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-7077c9da7dcsm164027916d6.12.2025.08.11.16.15.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Aug 2025 16:15:03 -0700 (PDT) Message-ID: <1fe2c9d3-c0ae-4a23-bb1a-4082613f0344@gmail.com> Date: Mon, 11 Aug 2025 19:15:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#79217: [PATCH] display-time-mode: Include world-clock time in mode line. To: Wilko Meyer References: <86ikiuklg0.fsf@wmeyer.eu> From: "Jacob S. Gordon" Content-Language: en-CA In-Reply-To: <86ikiuklg0.fsf@wmeyer.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79217 Cc: 79217@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hey Wilko, On 2025-08-11 10:00, Wilko Meyer wrote: > This patch introduces an user option to conditionally include > world-clock time, in addition to the localtime, when display-time-mode is > active, in mode line. Sounds useful to me. Some thoughts: + When the world clock list is long, this takes up a big chunk of the mode line. Would it make sense to limit the # or width somehow? + When enabled, it might help to have something like “(local)” beside the current time as a separator, i.e. it could look like: 6:56PM (local) 7:56AM (Tokyo) instead of: 6:56PM 7:56AM (Tokyo) + Perhaps the order should reflect `world-clock-sort-order' (by calling `world-clock--sort-entries' with the list and time). + I’m not sure what the norm is for mode line entries, but maybe the :set of the defcustom could refresh the mode line. Best, -- Jacob S. Gordon jacob.as.gordon@gmail.com Please avoid sending me HTML emails and MS Office documents. https://useplaintext.email/#etiquette From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 12 08:37:48 2025 Received: (at 79217) by debbugs.gnu.org; 12 Aug 2025 12:37:49 +0000 Received: from localhost ([127.0.0.1]:52529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uloGC-0006oU-5h for submit@debbugs.gnu.org; Tue, 12 Aug 2025 08:37:48 -0400 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]:36093) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uloG0-0006o2-Ih for 79217@debbugs.gnu.org; Tue, 12 Aug 2025 08:37:43 -0400 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 5E7B314000F9; Tue, 12 Aug 2025 08:37:30 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Tue, 12 Aug 2025 08:37:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamkovic.org; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1755002250; x=1755088650; bh=WKAQHpPU9QMgPS1UOnbwBQQpovOqH/aFN5ORZMPEfxo=; b= GxT4oq9FgHNHCHKDxWKUsRn2CilEreKNvrYUMT4aCfieDobnQ+vfnmHGiJ3fTErz UDBVINHSRgy0antUqU6HoS+PNVu0nYsUjFLoZnJrGemnbWsTbiKJ4uiJisEmwQwp wQ4Ryazcm8uCybZ7P7xw5AqWNfl604YEn8jnaeTxO4ukgn/Khd2CRXmwWASAdng8 mvQFk2QCfTZOZIpvK7ZYApn+ouJ5Wx1S2svjSeFdIkKuB4Y1MypkOxbLHCrsbYg7 paOf6NU5ZGfDr3NKUH69RpRcnIqN3pwigA5HsbNGdGgZ2U9dr1nVEIU3f7FuJDN9 DvRrA1xbd+SG6jds4ZRBuA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1755002250; x=1755088650; bh=W KAQHpPU9QMgPS1UOnbwBQQpovOqH/aFN5ORZMPEfxo=; b=lduhdGYKDkWPvk5Vt Ep3RUXksCRdjZLFGBdpSIX4nGbVV/7k07n4UWvLfZWS/B39voU2W8PLhjGi5GC6/ s4tAWVDvHoEn5SlAdPFmd61rcoHwUJisQgxaUEenuEsS/KoS1poRLpogEtMAjlfq k8b+SasI9fTm68BGR+IGYjivS5nnI+fNjujOno8wVTBOf3jgZNoAsr8WOMQk4XYQ z4ofBB/xTV/Iy9oGNCVPq4L55100np/wxH9a1Sff4Wj0nsQKXULtlFTuRBh0QZBh gkiRxdvl6uHyxhK1bj7siBnWnWV6FXMNF5p57Ok8D67pK4GuDyCO0mbbOTuXuqU3 pQELQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddufeehfeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffffkgggtgfesthhqredttd dtjeenucfhrhhomheptfhuugholhhfucetuggrmhhkohhvihgtuceorhhuugholhhfsegr uggrmhhkohhvihgtrdhorhhgqeenucggtffrrghtthgvrhhnpeehgffhhfefteehiedtve ffleffteevudetjeekhedvhfejvedvueekhefgffehteenucffohhmrghinheprggurghm khhovhhitgdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehruhguohhlfhesrggurghmkhhovhhitgdrohhrghdpnhgspghrtghpthht ohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjeelvddujeesuggvsggsuh hgshdrghhnuhdrohhrghdprhgtphhtthhopeifseifmhgvhigvrhdrvghu X-ME-Proxy: Feedback-ID: i88214938:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Aug 2025 08:37:28 -0400 (EDT) From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: Wilko Meyer , 79217@debbugs.gnu.org Subject: Re: bug#79217: [PATCH] display-time-mode: Include world-clock time in mode line. In-Reply-To: <86ikiuklg0.fsf@wmeyer.eu> References: <86ikiuklg0.fsf@wmeyer.eu> Date: Tue, 12 Aug 2025 14:37:26 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79217 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Wilko Meyer via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > +(defcustom display-time-include-world-clock nil > + "Non-nil means time from `world-clock-list', `zoneinfo-style-world-lis= t' > +or `legacy-style-world-list' entries are displayed in mode line." > + :type 'boolean) I would like to use this feature but with only for one or two entries from my `world-clock-list'. Could this (optionally) be a list of entry labels, e.g. '("Mike") to show only Mike's time in the mode line? Rudy --=20 "I do not fear death. I had been dead for billions and billions of years before I was born, and had not suffered the slightest inconvenience from it= ." --- Mark Twain, paraphrased Rudolf Adamkovi=C4=8D [he/him] http://adamkovic.org From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 12 16:07:42 2025 Received: (at 79217) by debbugs.gnu.org; 12 Aug 2025 20:07:43 +0000 Received: from localhost ([127.0.0.1]:55018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulvHa-0001WG-F6 for submit@debbugs.gnu.org; Tue, 12 Aug 2025 16:07:42 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:46918) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulvHU-0001Vh-Qn for 79217@debbugs.gnu.org; Tue, 12 Aug 2025 16:07:38 -0400 Authentication-Results: purelymail.com; auth=pass DKIM-Signature: a=rsa-sha256; b=Y73vFPatuAODBYgHFdypEREP/a5g+VOlCaM+OjgR7q7cL84R3cJt+NUJHRcqw7nCBbK29iFC1mwFFuXBgQxXP6bvYoW9dLkSY6wQBX6kRQCWEPM4DUxBSnshipkfEggKzbYhbfl5fEnOWiDyyElkXCbqdmWRoDP5DsdSyWvq9sGYBpOTKGBZDW9MZYZt4be+SxHOdoDV2htqxnuqOEYEUngg/zCu3gBjWVB8VWkSo50ZtiKlybdwQW5CLYacnCl3+mdLLWF2LX69mUw/AeVv+s5ZsdEl5KoRez6GanHHG5eQ5Yr73UWn6VpaC7HhYRhKOflDlGceKeTc8Xkh5ZuBBQ==; s=purelymail2; d=wmeyer.eu; v=1; bh=HZ2cnnHtsrL/OQRQr4WoiFu4445vT1Rq7phQQfZgQN8=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=sv0klDwmjFt21sGrqjeVVyqd++k4chgAU4Uf7j0/DwdGN3i4eP1FbnIHrTlYqr+5YZUdSFOkuTeCk8pelripFH9f6xK+SfEwcUSyY485QtAQ1cD084KBDefx8k7BJ+ptWWU2tnj0KsZqV1UkaP0a6N2eImSbdtZ7Voq1pgBJnSUSQEhcamtqExHfJaSLlv6tLPhZ9bVcA0HXbFNGaTRT8/vKINx4Q1f2kQ3kiDOrpEh2WPmckpdE8E9aMd+4p/soiJ2YW2jQJgAC7QcVEwYYMhRhcf/wrOWfJrjjLynLuVXZVcBmxICJWO+YFIds9WyaF5vYXRLUQu5nd4kGRDSuxw==; s=purelymail2; d=purelymail.com; v=1; bh=HZ2cnnHtsrL/OQRQr4WoiFu4445vT1Rq7phQQfZgQN8=; h=Feedback-ID:Received:From:To:Subject:Date; Feedback-ID: 82836:11164:null:purelymail X-Pm-Original-To: 79217@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 2026982057; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 12 Aug 2025 20:07:30 +0000 (UTC) From: Wilko Meyer To: 79217@debbugs.gnu.org Subject: [PATCH v2] display-time-mode: Include world-clock time in mode line. Date: Tue, 12 Aug 2025 22:07:01 +0200 Message-ID: <20250812200701.6906-1-w@wmeyer.eu> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79217 Cc: rudolf@adamkovic.org, jacob.as.gordon@gmail.com, Wilko Meyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * lisp/time.el (display-time-include-world-clock): Add user option. (display-time-include-world-clock-labels): Add user option. (display-time-string-forms): Conditionally include world clock time as well as a local suffix for the users time. (time--create-world-time-mode-line-string): Helper function to fetch the entries to be included the right way. --- lisp/time.el | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/lisp/time.el b/lisp/time.el index 3750206d08e..82dee91bfc3 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -177,16 +177,37 @@ display-time-format :type '(choice (const :tag "Default" nil) =09=09 string)) =20 +(defcustom display-time-include-world-clock t + "Include world times in the mode line. The value can be one of: +t =3D> to include all entries from `time--display-world-list`. +nil =3D> to disable showing the world clock in mode line. +NUM =3D> to include at most NUM entries." + :type '(choice + (const :tag "Off" nil) + (const :tag "All" t) + (integer :tag "Max entries" 1))) + +(defcustom display-time-include-world-clock-labels nil + "Only include world-clock entries whose label is in this list." + :type '(repeat (string :tag "Label"))) + (defcustom display-time-string-forms '((if (and (not display-time-format) display-time-day-and-date) =09(format-time-string "%a %b %e " now) "") (propertize - (format-time-string (or display-time-format + (concat (format-time-string (or display-time-format =09=09=09 (if display-time-24hr-format "%H:%M" "%-I:%M%p")) -=09=09=09 now) +=09=09=09 now) + (if display-time-include-world-clock " (local)")) 'face 'display-time-date-and-time 'help-echo (format-time-string "%a %b %e, %Y" now)) + (if display-time-include-world-clock + (propertize + (time--create-world-clock-mode-line-string now) + 'face 'display-time-date-and-time + 'help-echo "World clock entries") + "") load (if mail =09;; Build the string every time to act on customization. @@ -516,6 +537,26 @@ time--display-world-list =09 legacy-style-world-list =09zoneinfo-style-world-list)))) =20 +(defun time--create-world-clock-mode-line-string (&optional now) + (let* ((now (or now (current-time))) + (entries (world-clock--sort-entries (time--display-world-list) no= w)) +=09 (entries (if display-time-include-world-clock-labels +=09=09 (seq-filter (lambda (p) (member (cadr p) display-time-include-= world-clock-labels)) entries) + entries)) +=09 (entries (cond ((integerp display-time-include-world-clock) +=09=09=09 (seq-take entries display-time-include-world-clock)) +=09=09=09((eq display-time-include-world-clock t) entries)))) + (mapconcat + (lambda (p) + (pcase-let ((`(,tz ,label) p)) + (format " %s (%s)" + (format-time-string + (or display-time-format + (if display-time-24hr-format "%H:%M" "%-I:%M%p")) + now tz) + label))) + entries))) + (defcustom world-clock-time-format "%A %d %B %R %Z" "Time format for `world-clock', see `format-time-string'." :type 'string --=20 2.50.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 12 16:21:32 2025 Received: (at 79217) by debbugs.gnu.org; 12 Aug 2025 20:21:33 +0000 Received: from localhost ([127.0.0.1]:55040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulvUy-0002Dz-F7 for submit@debbugs.gnu.org; Tue, 12 Aug 2025 16:21:32 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:49906) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulvUr-0002Dd-67 for 79217@debbugs.gnu.org; Tue, 12 Aug 2025 16:21:29 -0400 Authentication-Results: purelymail.com; auth=pass DKIM-Signature: a=rsa-sha256; b=APThbCUxzPyJMjeXinBP6ifMF9/bXlT2V1DIBGimXu8XJiaygnkaKcH9ZOZhuj9zwscbh3c/ocwLf2pyVJgplRAR+wsy8rARyPt/hmWf4d0gPLwvHNobi2b8WjYPxOuUaNzFl73OuiEVXdxaB3SbggPPMe6NsjLFBLrEQwtPiECWZBRM8kFxgHWsDzK6Z9spzZcpQD2KTKFQlMRL+Vsy1sEdK8ivdMUR884MTKNpMCEfIMI+QktyuZ0FEo8yX8dq7gIgwSqrIzS9a9swECYtP7ooXiMzuN4JCl707b0xiW+Hs8OdpQ4COG9vgA3z//+UBOCdJLhdNpASYeLows5Ukg==; s=purelymail2; d=wmeyer.eu; v=1; bh=YxVs/jF3lxrtmcALA1RwWBG0eteyptly5oA0fiWMqjs=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=riggqqWl9Qw1ND9ZHCqMdxBYdo5d8jigFfhiXrPN8D/vfJ+RYUbghnmyACkcWISNmKjIMBlJWd4DsGAofznjdssn+RulzK9+VmkcW3SspRtr8NtY5uLBFG1aMOzLbwgqBZe8apjvUL+/coszoKrC+WQVFqx+FuG+cDETQWjm/BTSQCwqjESBLuk66sseDSNd8EMds/LM7kFuWbDblJRFCnp4JH2g3JYQ7FuYgYt0PyEUWAozmnh9puDbYnu2W9BX4rHYVPbB6aTW+YMwqz6KWU19ZubgB83qlzN8AAI6XESMr8WgMuTzju8BJF5bSsS1qpAvqw7NnzjBUPj5/6ZW0w==; s=purelymail2; d=purelymail.com; v=1; bh=YxVs/jF3lxrtmcALA1RwWBG0eteyptly5oA0fiWMqjs=; h=Feedback-ID:Received:From:To:Subject:Date; Feedback-ID: 82836:11164:null:purelymail X-Pm-Original-To: 79217@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1674605720; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 12 Aug 2025 20:21:16 +0000 (UTC) From: Wilko Meyer To: "Jacob S. Gordon" Subject: Re: bug#79217: [PATCH] display-time-mode: Include world-clock time in mode line. In-Reply-To: <1fe2c9d3-c0ae-4a23-bb1a-4082613f0344@gmail.com> References: <86ikiuklg0.fsf@wmeyer.eu> <1fe2c9d3-c0ae-4a23-bb1a-4082613f0344@gmail.com> Date: Tue, 12 Aug 2025 22:21:14 +0200 Message-ID: <86a544l29x.fsf@wmeyer.eu> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79217 Cc: Wilko Meyer , 79217@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Jacob, thanks for the feedback! "Jacob S. Gordon" writes: > + When the world clock list is long, this takes up a big chunk of the > mode line. Would it make sense to limit the # or width somehow? I just prepared a second version of this patch that allows display-time-include-world-clock to be either t (to include all entries), nil (to disable mode line inclusion), or NUM. If it's set to a number that number will be used as the max number of possible entries to be displayed. > + When enabled, it might help to have something like =E2=80=9C(local)=E2= =80=9D beside > the current time as a separator, i.e. it could look like: Also included this. > + Perhaps the order should reflect `world-clock-sort-order' (by > calling `world-clock--sort-entries' with the list and time). I am now fetching the entries like: (world-clock--sort-entries (time--display-world-list) now) so the sort-order is honored, didn't know that sorting the entries was possible before. > + I=E2=80=99m not sure what the norm is for mode line entries, but maybe = the > :set of the defcustom could refresh the mode line. that's a good question, haven't seen usage of :set in time.el, but I also don't really know how other mode line entries are handling this yet, will probably look that up during the next days if time permits. --=20 Kind regards, Wilko Meyer From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 14 03:35:32 2025 Received: (at 79217) by debbugs.gnu.org; 14 Aug 2025 07:35:32 +0000 Received: from localhost ([127.0.0.1]:60847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1umSUm-0006NG-91 for submit@debbugs.gnu.org; Thu, 14 Aug 2025 03:35:32 -0400 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:50640) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1umSUj-0006Mt-4M for 79217@debbugs.gnu.org; Thu, 14 Aug 2025 03:35:30 -0400 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-7e87050b077so74814585a.1 for <79217@debbugs.gnu.org>; Thu, 14 Aug 2025 00:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755156923; x=1755761723; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7dKlmI0ZgdkVijvrVEabr4Y5yumi7yjSOfvv5ynTBSs=; b=mIaFUnPePlGZfZTXIv9XsTTfl/MplHJ93BUseYyxQTH8tSlYM3ZACCJs0ptnyF2TJl YDflus9IdPcxEsNvisiCxd2QR8g29rBdz/0aoSMFcYxU/XCBvITZwAYoZBAzw20DjL5R 9BgXxZ+sxIuHL2A6B4Du6WMueHC82cj53fz+NfwhwXeAv2/dlc8thVrXpDbbB7Qr4+sU Am7ZKgnEjrzSh1EJSL7ovTDcSPyA1O4hTj0royt4r4aaKz4VSip5e99GAPXoXXW4iaG1 4XEOHkgtbu17u85KX7i+gAmxpmnxb3aJj8eNkIxwzBOdDedYmOgokPVlDU2VzWiSOSf6 9d6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755156923; x=1755761723; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7dKlmI0ZgdkVijvrVEabr4Y5yumi7yjSOfvv5ynTBSs=; b=o2C3U90edJWSNbw9WgIj1SQ1q82iZ2HViqh2lBHyO60Up6euXTYochhHg5KBzcjv8i moCU5sa6gy+rsTIDcLC7xMGQoLLCclr0c6b0EnAIg7X7zaVH1EQAoegNfSgTD6brmTjN jU+RLxxToYI8t0IitRkJbh/OPzouD6/8stVT3HWt6oim+uIZxlFwVcpNt+4xu0nSibtw g9wf8WLA6Oaci3T6LiKPNmqdLUXgx4WVmnHBmUtfxcxygqCFkL0U+E+4sh0VZV/Ai7j1 G+ttA7ZwYH4m1jypZlW2RfMh/36tUUG2riTLTOFUh2p0JWryMxfXz12w+ZEQ0sG5aapM le+A== X-Gm-Message-State: AOJu0YxfeZJtI4yZAmiwvzy+AbFURlv7syrE1/ZCFhqouhkkY5+lHPLw WlpCFvzFCAP35SO3R/Nr1S/Au/SlVeNu0hq1xjC+cE1KXILhiwQp7u1Uf1rZApzj X-Gm-Gg: ASbGnctwgc+HhHLZqRIKOCCR/ieFkv9jJrPWUjdwg5bRxzXTeDVsv6aaFuMuUh1rwKV +DmEqq34/r+e/MZd5pXlDkF4lf/rp05B13Yl2ZkpXNbhGiCMhXzvpLIDAioOga0vd/kLvcmukhy x7nedu1Iad7YotL7ZjHnctwyQLBgCXKXA5ZKSgdqIb00qHLlusxpGBDwvNuUxJUtqObif5UGs9T GpPNAEJwmuCahzMFTbPplyUZAYIZj8qsQoNf9riCblB/LWBS52QTZtawWaLs4qBAlbyXNfYl6tM 8pyi0QSIPKj0uYUMB/OGBZZDf5ReBRaJk6ITgA9J5XEOyQzrqKMA3RQdEDWnHCdDhswBqpUNfGm T40rKtrkhfmKsh4p5TpiX+VLPxS3KRC/ofl4kb1bZDVPPvncEEo7L36I5IIOsXw== X-Google-Smtp-Source: AGHT+IGPiyd8Y/hx8gi5XXM7HWjr9fEtKqQtLjljKCx+ENxyk8ruZzb1eT46VWgF1TVr9yAVBmsz+g== X-Received: by 2002:a05:622a:51:b0:4b0:8057:1de9 with SMTP id d75a77b69052e-4b10a9cc092mr29450961cf.3.1755156922714; Thu, 14 Aug 2025 00:35:22 -0700 (PDT) Received: from [192.168.1.10] (135-23-138-165.cpe.pppoe.ca. [135.23.138.165]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4af0e32d04asm172348131cf.0.2025.08.14.00.35.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Aug 2025 00:35:22 -0700 (PDT) Message-ID: <2502f59a-3281-4815-b83c-d7a9ad68b51b@gmail.com> Date: Thu, 14 Aug 2025 03:35:21 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#79217: [PATCH] display-time-mode: Include world-clock time in mode line. To: Wilko Meyer References: <86ikiuklg0.fsf@wmeyer.eu> <1fe2c9d3-c0ae-4a23-bb1a-4082613f0344@gmail.com> <86a544l29x.fsf@wmeyer.eu> From: "Jacob S. Gordon" Content-Language: en-CA In-Reply-To: <86a544l29x.fsf@wmeyer.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79217 Cc: 79217@debbugs.gnu.org, =?UTF-8?Q?Rudolf_Adamkovi=C4=8D?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hey Wilko, Thanks for considering my feedback! On 2025-08-12 16:07, Wilko Meyer wrote: >+(defcustom display-time-include-world-clock t I think it should be nil by default (as in your first version). >+NUM => to include at most NUM entries." >--8<-- >+(defcustom display-time-include-world-clock-labels nil >+ "Only include world-clock entries whose label is in this list." >+ :type '(repeat (string :tag "Label"))) I wonder if the # of entries and the list of labels should be options of the same variable, as they both limit the included zones. Is something lost if they can’t both be specified? >+(defcustom display-time-include-world-clock t >+ "Include world times in the mode line. The value can be one of: Nit: The opening sentence should be alone on the first line to act as a summary. >+t => to include all entries from `time--display-world-list`. Nit: This should link to something user-facing like world-clock-list (and quoted `like this'). >+ (if display-time-include-world-clock " (local)")) Nit: Maybe this could be factored into your helper function. On 2025-08-12 16:21, Wilko Meyer wrote: > so the sort-order is honored, didn't know that sorting the entries was > possible before. Thanks, it’s pretty new (and I have some selfish motivation to advocate for it ;P). > that's a good question, haven't seen usage of :set in time.el, but I > also don't really know how other mode line entries are handling this > yet, will probably look that up during the next days if time permits. I could definitely be off-base here, maybe someone more experienced than I can comment. Best, -- Jacob S. Gordon jacob.as.gordon@gmail.com Please avoid sending me HTML emails and MS Office documents. https://useplaintext.email/#etiquette From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 14 12:42:13 2025 Received: (at 79217) by debbugs.gnu.org; 14 Aug 2025 16:42:13 +0000 Received: from localhost ([127.0.0.1]:34359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1umb1p-0003Np-BQ for submit@debbugs.gnu.org; Thu, 14 Aug 2025 12:42:13 -0400 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:54600) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1umb1l-0003NU-5W for 79217@debbugs.gnu.org; Thu, 14 Aug 2025 12:42:10 -0400 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-70a92814016so13690916d6.1 for <79217@debbugs.gnu.org>; Thu, 14 Aug 2025 09:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755189723; x=1755794523; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Q2YZJmSRPvyjU2yEcxh18BIC+kBPrPJy5JiFwrjME44=; b=CauTupVftnN9uo0vJyMsLrgerx07Fo7a15OBNmxm7M0vjqWGxStmdE7kAVX7VUP9AS 9ffzPjzxpJqxAFyckOi10gTATFQGBWCxoCuFryY5sgdmMk+H3Ob+oDcllbVCcNKqv103 rSmG3ab8S5WJHNx6igUGj5x8F4CQ8U3X9ib3zu74zr1fiuwjRAeaAri4anjQq/jNdBaj NJ4ZTMCZMR6v0aqcWPIUCYmde4W60VUyCL2HUEHnbK74Zjyyvgv5ieCk6jB1pYIe5j0g y1EWOqa3uTiUpiDar9uH5Wa6DGsmxVs9NZhqLkWw6vfffYsnpjUoZWfPiYjXsrxDmvle 4MaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755189723; x=1755794523; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Q2YZJmSRPvyjU2yEcxh18BIC+kBPrPJy5JiFwrjME44=; b=q2MueqHlWJ1k/sTNknIwf5Y/Yg9P1THjRTGSycnIOgE2t5tLCLjtGme9mskaInaRcc MPbsglnLy7QGla+t75A+UI7gcW3UmRj7qOn90eJ9eIfUdeiIC8fzirFd01j6rNLRmj9g rkBMsdivR1/uxNEYEL27hVa4Re171LJvgifjI1i4f1mV+lwoMVFRvvhlm29Jd88dd8rl 4OidEAduzmLLY0qUSbNP3JBUlYf6OQCObrrbIetPNORMj0jAsrenZ8MsXdJKibAuaGTk UiQY1DuZ+2y6/3mGIMPQNR61iRiXLgljOx+VBhHcRk9kKwSJUZm8KDhacSc7A4UhkhGp RMxA== X-Gm-Message-State: AOJu0Yx2rrtzb61XDR0Vgg5NixOp2d0FF2E3cyVN/D8gIfGXhglEm2jq MYN8tQrgadXQl8kTDisYN9hNy+zA/BpYX8x/9ZHplTrhV53w3TYrViOQ X-Gm-Gg: ASbGnctNO//YQwLyMKpg59QpPtJGsmVjoXrv90AbfaezUSoW7Rb6beIz5dOcfoB9SN9 E5h6LrW5qnWrHg8leGVt06knUzOIAXZ6WCwfhVQ+6zTYtRimES43PpDIq3zoKFMz2iCoZoB9TKo fagyz9IwRE4h6slSJcZi8Fv/8bLAAW18oiVqNEz+9G+pyS+jQqXwv1lnyGIZsOP3fCiBOYsXx2B kpAZHyOPvrLRziinmYMVUFcQIfS4cW+2QJ9hMEMOPJ70/APt9V/gC3P/Ii74Jc/XSecmsLYPctZ FdGvYaZneC9nj13X12COc9kvmBcqJBsAr0qOGZWt3JOzBZiMdo9qDUAV/Fs77FTk0xJSWpSN0o1 KLIYhjT+dfosJQq9zADb+zO1gOCXXdnMYnpjIZgOh9OXKrXtDpoIuzMgTHsbJrw== X-Google-Smtp-Source: AGHT+IGeUPDTqa3vuS3HalIBfQFerRG3YNPMRsstcmPGyPQf5opcvR3q6+HAR8b2+pz8ZX+qa6D5Mg== X-Received: by 2002:a05:6214:21e9:b0:707:71dc:a382 with SMTP id 6a1803df08f44-70af5b8468amr55308746d6.25.1755189722330; Thu, 14 Aug 2025 09:42:02 -0700 (PDT) Received: from [192.168.1.10] (135-23-138-165.cpe.pppoe.ca. [135.23.138.165]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-70adc1da2a2sm15435526d6.4.2025.08.14.09.42.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Aug 2025 09:42:02 -0700 (PDT) Message-ID: <51e7c944-f921-427d-90c9-436a228e58eb@gmail.com> Date: Thu, 14 Aug 2025 12:42:01 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#79217: [PATCH] display-time-mode: Include world-clock time in mode line. To: Wilko Meyer References: <86ikiuklg0.fsf@wmeyer.eu> <1fe2c9d3-c0ae-4a23-bb1a-4082613f0344@gmail.com> <86a544l29x.fsf@wmeyer.eu> From: "Jacob S. Gordon" Content-Language: en-CA In-Reply-To: <86a544l29x.fsf@wmeyer.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79217 Cc: 79217@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2025-08-12 16:21, Wilko Meyer wrote: > haven't seen usage of :set in time.el Oh and in case it wasn’t clear: I don’t think this is essential, just a potential nicety when customizing. As you pointed out, things like display-time-format don’t do this, and the mode line will update either way when the clock updates. So it’s more about my curiosity, and you should feel free to ignore :) Best, -- Jacob S. Gordon jacob.as.gordon@gmail.com Please avoid sending me HTML emails and MS Office documents. https://useplaintext.email/#etiquette From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 30 03:41:30 2025 Received: (at 79217) by debbugs.gnu.org; 30 Aug 2025 07:41:30 +0000 Received: from localhost ([127.0.0.1]:44493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1usGDJ-0003L6-9O for submit@debbugs.gnu.org; Sat, 30 Aug 2025 03:41:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45622) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1usGDG-0003K3-Lh for 79217@debbugs.gnu.org; Sat, 30 Aug 2025 03:41:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1usGDB-0004LL-2w; Sat, 30 Aug 2025 03:41:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=EfQ6CBTBaZ7DBgpcwMuMfyJ6VRSKRoIeFh53tcEcDy4=; b=BrYzRqZ806POIkc4zUSH CmY0HFO7M9RDeYKGlxHYsfEKEmm0nFNo554woAwW3lYWYKZKVmGfvlegqpxuXxHMGi+u9EOw2VlZo cND1L1mu6PLbJOVYiP5vhzm/pJGsihT1RBx4DHbqFAuhNWWbjhGJZfrnBuOdUnsaDP3G0Qo1kHt8U ELZHfc9mENbOl1/yUituGKM6Q81hJdp46iYXouLVvEfh0G7ERoyYIV2VrPiCnbU2MU6OHsbgA2CI9 yhM1DgwFen44wLFUm10ummImcmQzrQUaUr9vNzY9CqKgZEqo0KS++UDvxVqzR8+g/B+I/2LjwfKqP ekOWkilF3AS0sQ==; Date: Sat, 30 Aug 2025 10:41:18 +0300 Message-Id: <86plcdqmsh.fsf@gnu.org> From: Eli Zaretskii To: "Jacob S. Gordon" In-Reply-To: <51e7c944-f921-427d-90c9-436a228e58eb@gmail.com> (jacob.as.gordon@gmail.com) Subject: Re: bug#79217: [PATCH] display-time-mode: Include world-clock time in mode line. References: <86ikiuklg0.fsf@wmeyer.eu> <1fe2c9d3-c0ae-4a23-bb1a-4082613f0344@gmail.com> <86a544l29x.fsf@wmeyer.eu> <51e7c944-f921-427d-90c9-436a228e58eb@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79217 Cc: w@wmeyer.eu, 79217@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 79217@debbugs.gnu.org > Date: Thu, 14 Aug 2025 12:42:01 -0400 > From: "Jacob S. Gordon" > > On 2025-08-12 16:21, Wilko Meyer wrote: > > haven't seen usage of :set in time.el > > Oh and in case it wasn’t clear: I don’t think this is essential, just > a potential nicety when customizing. As you pointed out, things like > display-time-format don’t do this, and the mode line will update > either way when the clock updates. So it’s more about my curiosity, > and you should feel free to ignore :) So do we have an agreed-upon patch for this feature? Is the last v2 posted here the one in which all the review comments were accounted for and adjudicated? If so, I have a few minor comments to that patch: > * lisp/time.el (display-time-include-world-clock): Add user option. > (display-time-include-world-clock-labels): Add user option. > (display-time-string-forms): Conditionally include world clock time as > well as a local suffix for the users time. > (time--create-world-time-mode-line-string): Helper function to fetch the > entries to be included the right way. Please mention the bug number in the commit log message. > +(defcustom display-time-include-world-clock t This default of t changes past behavior. I think the default should be nil, to preserve past behavior. > + "Include world times in the mode line. The value can be one of: The first line of a doc string should be a single complete sentence (because some commands, like "M-x apropos", show only that first line). > +t => to include all entries from `time--display-world-list`. > +nil => to disable showing the world clock in mode line. > +NUM => to include at most NUM entries." > + :type '(choice > + (const :tag "Off" nil) > + (const :tag "All" t) > + (integer :tag "Max entries" 1))) All new defcustom's should have a :version tag. > +(defcustom display-time-include-world-clock-labels nil > + "Only include world-clock entries whose label is in this list." > + :type '(repeat (string :tag "Label"))) So if the user customizes display-time-include-world-clock to a non-nil value, no world clock will be shown unless this option is _also_ customized to include some labels? This might be confusing UI, but in any case, the doc strings of both options should cross-reference to the other option and explain the dependencies. Also, how can a user know which label to add for a particular entry? IOW, the format of these labels should be described in enough detail for the users to know how to set up this option for a particular clock to be shown. Thanks.