From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tpeplt Newsgroups: gmane.emacs.help Subject: Re: Impossible to customize world clock Date: Mon, 08 Apr 2024 16:45:22 -0400 Message-ID: <87msq3fusd.fsf@gmail.com> References: <171260575677.7.10531721947495332726.303927142@slmails.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19143"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Kepa To: Kepa via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 08 22:46:19 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rtvsh-0004lT-0c for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Apr 2024 22:46:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtvs7-0005AF-F7; Mon, 08 Apr 2024 16:45:43 -0400 Original-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 1rtvs5-000595-CE for help-gnu-emacs@gnu.org; Mon, 08 Apr 2024 16:45:41 -0400 Original-Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtvrp-0007v3-Ss for help-gnu-emacs@gnu.org; Mon, 08 Apr 2024 16:45:41 -0400 Original-Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-4345f35daa7so12859911cf.0 for ; Mon, 08 Apr 2024 13:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712609124; x=1713213924; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pP4zy+Dj+5VjbeYKseW+R8BOsLgGn50OH8S4igHWPME=; b=Yd0iiPpPNHhuyvKzsmRqmIslWHdusOYct9oR9rD/b/NWdRvBw8IY1NIRyssY7NKIdx O5/dcqeMvl6S9TtFBVJRR0+8aNvHAU2v/nT8Ip+G+uEHVBpLaWm8MLKwgQ+AtmKIFEZd 4z4BZS+pHTfW7jn72x1g2O0pekfyX3sqnhJcLoB1Uy7Hs8V7+i3a+oQdK6a6xqi2eNrg Pg9ELAXw1vt0VnnULYwzxRGgHsrjrh+K8u4elbaLZcnz7b0kZ8YaDnDgnUgPF8f71IHJ iL359W0lCYJYfOUqrj1yU1DRyIY/bQrrui21egwgzwb/Fvz8xOrJANWIbN9R71MvFY+x GvrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712609124; x=1713213924; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pP4zy+Dj+5VjbeYKseW+R8BOsLgGn50OH8S4igHWPME=; b=E8PfDv8QfdJoUAhOXnbV0/b6/+Au5zYUB+KOo4bDW64C3elE9lnbDxN3XF2PzfrTdt H6CH1nFKH2xK6xHopo3XmduJL8oD1M1DNUXKfMKsauDaqjNLmgog3XRXUOS3Yzq2+x8Y ueQ+42X9CK6JKmcmFrQBNr7IJa6zpYwlbr+I0Lj+fz7LsLEAoFJNm58ZTlAwGtLU8zyx fWCwo+ioqCJShdF41pf0HqZUyiEAP8cgGWnEMeFsuiIDrOaTxEQ4hnl5RU9WWdhrJTHJ ZEzOK22QdYHWsyoEZOijYFOi8v7Cp2mBzrX2FqpYuDSsAtjIjwnJ86vfkvPc12fFs7RC dv2w== X-Gm-Message-State: AOJu0YwiwSzGsltZoo/GxuDqDnwONZT7dbsdXT7nYh1JKx/cqWQcf++a jxyT7LH4OWyP/cVi+bhY+T+fUY8c8HTqgaIWaqShxANPBn880sFp X-Google-Smtp-Source: AGHT+IFPOPrkQgSyxV8NV3u3Z6HgJ7+1pGtqbEurzzomhwXqukbtt6JtoFXHzC9uFlFJJVZ+flY+7g== X-Received: by 2002:a05:620a:21da:b0:78d:647f:c525 with SMTP id h26-20020a05620a21da00b0078d647fc525mr4075912qka.55.1712609123964; Mon, 08 Apr 2024 13:45:23 -0700 (PDT) Original-Received: from t530.local ([2600:8806:a821:2b00::dfe5]) by smtp.gmail.com with ESMTPSA id t2-20020a05620a034200b0078d6bf63710sm200732qkm.55.2024.04.08.13.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 13:45:23 -0700 (PDT) In-Reply-To: <171260575677.7.10531721947495332726.303927142@slmails.com> (Kepa via Users list for the's message of "Mon, 8 Apr 2024 21:49:11 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=tpeplt@gmail.com; helo=mail-qt1-x82b.google.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, FREEMAIL_FROM=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146274 Archived-At: Kepa via Users list for the GNU Emacs text editor writes: > Hi > > Today I have tried to customize and use the world clock. > > Funny, the default world clocks are ok, but I can't customize it to > add new zones. > > > Default list and clocks: > > =C2=A0'(zoneinfo-style-world-list > =C2=A0=C2=A0 '(("America/Los_Angeles" "Seattle") > =C2=A0=C2=A0=C2=A0=C2=A0 ("America/New_York" "New York") > =C2=A0=C2=A0=C2=A0=C2=A0 ("Europe/London" "London") > =C2=A0=C2=A0=C2=A0=C2=A0 ("Europe/Paris" "Paris") > =C2=A0=C2=A0=C2=A0=C2=A0 ("Asia/Calcutta" "Bangalore") > =C2=A0=C2=A0=C2=A0=C2=A0 ("Asia/Tokyo" "Tokyo")))) > > Seattle=C2=A0=C2=A0 lunes 08 abril 12:42 PDT > New York=C2=A0 lunes 08 abril 15:42 EDT > London=C2=A0=C2=A0=C2=A0 lunes 08 abril 20:42 BST > Paris=C2=A0=C2=A0=C2=A0=C2=A0 lunes 08 abril 21:42 CDT > Bangalore martes 09 abril 01:12 IST > Tokyo=C2=A0=C2=A0=C2=A0=C2=A0 martes 09 abril 04:42 JST > > > I add a new one (Europe/Berlin): > > =C2=A0'(zoneinfo-style-world-list > =C2=A0=C2=A0 '(("America/Los_Angeles" "Seattle") > =C2=A0=C2=A0=C2=A0=C2=A0 ("America/New_York" "New York") > =C2=A0=C2=A0=C2=A0=C2=A0 ("Europe/London" "London") > =C2=A0=C2=A0=C2=A0=C2=A0 ("Europe/Paris" "Paris") > =C2=A0=C2=A0=C2=A0=C2=A0 ("Asia/Calcutta" "Bangalore") > =C2=A0=C2=A0=C2=A0=C2=A0 ("Asia/Tokyo" "Tokyo") > =C2=A0=C2=A0=C2=A0=C2=A0 ("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") 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=20 M-x world-clock RET 3. Evaluate the following expression in the *scratch* buffer: (cl-pushnew '("Europe/Berlin" "Berlin") zoneinfo-style-world-list) 4. Try =E2=80=98world-clock=E2=80=99 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 5. If you want to make this permanent, one way to do that is to use =E2=80=98customize-option=E2=80=99: M-x customize-option RET a. At the "Customize variable: " prompt, type zoneinfo-style-world-list = RET b. In the customize buffer, click on an INS (insert) button at a location where you want your new entry to appear (top, middle, or bot= tom) c. In the first String: field, enter the text (no quotes) Europe/Berlin In the second String: field, enter the text (no quotes) Berlin d. Click on the Apply button. It will turn dim once it has been accepte= d. e. Check to see that the new value works: M-x world-clock RET f. If it doesn=E2=80=99t, then you might want to confirm that the =E2=80= =98Apply=E2=80=99 button has been dimmed and click it again if it hasn=E2=80=99t. If =E2=80=98world-clock=E2=80=99 works as expected, then click on the = =E2=80=98Apply and Save=E2=80=99 button to save the new setting to your Emacs initialization file. --=20 The lyf so short, the craft so long to lerne. - Geoffrey Chaucer, The Parliament of Birds.