emacs-orgmode
[Top][All Lists]
Advanced

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

Re:[PATCH] The align of time is not beautiful as 9.4 when I update to or


From: tumashu
Subject: Re:[PATCH] The align of time is not beautiful as 9.4 when I update to org 9.5.
Date: Mon, 4 Oct 2021 18:55:28 +0800 (CST)
















At 2021-10-04 15:48:49, "Ihor Radchenko" <yantar92@gmail.com> wrote:
>tumashu <tumashu@163.com> writes:
>
>> Hello:
>>
>>
>> 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.

If change s1, I think s2 should be deal with too, by the way, what about change 
the below function?

```
(defun org-agenda-time-of-day-to-ampm-maybe (time)
  "Conditionally convert TIME to AM/PM format.
This is based on `org-agenda-timegrid-use-ampm'."
  (if org-agenda-timegrid-use-ampm
      (org-agenda-time-of-day-to-ampm time)
    time))
    ^^^
```

Another way is creating a new function for the below code, so user can advice 
it to full control time string format.

```
(cond (s2 (concat
                              (org-agenda-time-of-day-to-ampm-maybe s1)
                              "-" (org-agenda-time-of-day-to-ampm-maybe s2)
                              (when org-agenda-timegrid-use-ampm " ")))
                         (s1 (concat
                              (org-agenda-time-of-day-to-ampm-maybe s1)
                              (if org-agenda-timegrid-use-ampm
                                  (concat time-grid-trailing-characters " ")
                                time-grid-trailing-characters)))
                         (t ""))

```


>
>Best,
>Ihor
>

reply via email to

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