From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qNJOHWXUWmHKXwEAgWs5BA (envelope-from ) for ; Mon, 04 Oct 2021 12:16:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gFX4GGXUWmFMXAAAB5/wlQ (envelope-from ) for ; Mon, 04 Oct 2021 10:16:05 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 18FBB28AC9 for ; Mon, 4 Oct 2021 12:16:05 +0200 (CEST) Received: from localhost ([::1]:58974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXL0t-00066y-H9 for larch@yhetil.org; Mon, 04 Oct 2021 06:16:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXKyo-0004H3-Ga for emacs-orgmode@gnu.org; Mon, 04 Oct 2021 06:13:56 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:27253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXKyl-0003oC-3T for emacs-orgmode@gnu.org; Mon, 04 Oct 2021 06:13:54 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 31451240012; Mon, 4 Oct 2021 10:13:46 +0000 (UTC) From: Nicolas Goaziou To: Max Nikulin Subject: Re: [PATCH] The align of time is not beautiful as 9.4 when I update to org 9.5. References: <3afe1bba.2f48.17c350d0a41.Coremail.tumashu@163.com> <877detcjry.fsf@localhost> Date: Mon, 04 Oct 2021 12:13:46 +0200 In-Reply-To: (Max Nikulin's message of "Mon, 4 Oct 2021 16:52:45 +0700") Message-ID: <87fsthm71h.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.193; envelope-from=mail@nicolasgoaziou.fr; helo=relay1-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633342565; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=5nUIx/zBGfp8HCXLj/5cR/1vE9G0rvPVNYBOKL7CXLI=; b=OLedEPn0wYtlXerNx2EmP+dilshlF+4rupkp+VmV6oLw3lhZ3mXIJDDed91Rnnd22lGGap TddUjkEWudXIGvoWxxOc/VfiMjim2PQ/488l9BMqbC5rtjs9CKLP2VGAZE0LFvnAXvy5RD nmTSGRHc4ulzxNITzGiHxLq/aPVq1zrZJrb7JLJcU6+GSqKMX4ozV4nLed1vQNhzeZbjrS DBysLhRzhG0sKH8EwgJXz3C0ni1W7RUQQ3UuyVbhL+He9lXxa0uO5g+4lHOljM94TBviWg k16NAim6NdH7QQL2Qjjfq8417M7lpxJBA4bs8qnPqHTSF0/gfokD0kGc5e2uBQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633342565; a=rsa-sha256; cv=none; b=f9hHVvCNK5VL7+mR5o0m1RfHdSXDrtIPpFBRLHq7892yPgVE8G83oxL5g24mz/TVU685tA 4WlRSIW/QuT3Socu0VkeFoa7o0PZfsYskv5/PyJlB3HQBx7/XzJIZpt8uV1pHgCyCF09fH 63kcZDek/WKcI2een8AyZZSMUAxBbkUWyvnv+d2KWSjcFOuMMVWKxw2wtRY8GoKEr/PWav QlguALyBCdfSHgjCwVqJyLjF13pkR7e7KHsJg9bXBfid0Rn+S2GwxQd9mjV0qetzQ+/66E no7B9m0anfbRunDKv5qwU1WXh3U9nwf//QEuDD3P2YLXaw2FkqkPXexQWHh+Kg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 18FBB28AC9 X-Spam-Score: -2.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: lmAo1T6ILpZW Hello, Max Nikulin writes: > On 04/10/2021 14:48, Ihor Radchenko wrote: >> tumashu writes: >>> >>> When I update to org 9.5, I find that the align of time like "7:00" has been changed. >>> >>> I think the new style is not beautiful as old style. >>> 1. New style look like not align to the first char, for the >>> width of 9 looks like > 1 >>> 2. the old style is align ":" >> The attached patch should fix the issue. Please, test it though. >> I do >> not use time grid regularly. > >> - (when s1 (setq s1 (org-get-time-of-day s1 'overtime))) >> + (when s1 (setq s1 (format "%05s" (org-get-time-of-day s1 'overtime)))) > > I think, "%5s" is enough, flag "0" does not anything useful for > strings. Also, the fix belongs to `org-get-time-of-day', which is also responsible for formatting the output. Regards, -- Nicolas Goaziou