emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH v2] org-agenda: Use `window-max-chars-per-line' to calculate


From: N. Jackson
Subject: Re: [PATCH v2] org-agenda: Use `window-max-chars-per-line' to calculate max text width
Date: Fri, 22 Apr 2022 11:46:24 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

At 17:27 +0800 on Friday 2022-04-22, Ihor Radchenko wrote:
>
> "N. Jackson" <nljlistbox2@gmail.com> writes:
>>
>> If Org needs to support versions of Emacs before 25.1 then I assume
>> you need the same guard on every instance of
>> window-max-chars-per-line -- because window-max-chars-per-line was
>> added to Emacs at the same time as window-font-width:
>
> We do not need to worry about this. Org supports the latest released
> Emacs version + 2 previous [1]. Now, it means Emacs >=26.
>
> [1] https://orgmode.org/worg/org-maintenance.html#emacs-compatibility

Ah, I didn't know that. Thanks.


I have tested with your v2 patch applied to Org 9.5.3:

1. It fixes the two bugs I reported in this thread (with one or both fringes
off, Agenda wraps `auto' (right) aligned tags unnecessarily and wraps the block
separator).

2. It also makes the Agenda display properly after the font size has been
altered with C-x +/-. This didn't work before, even with default fringes. [One
has to hit `g' to refresh the Agenda after changing the font size.]

3. As is to be expected, it doesn't help with an Agenda displayed with a
proportional font -- but it doesn't seem to make things any worse.


FWIW a summary of my testing of tags alignment, separator width, and new time
stamps for various fringe modes is shown below.

1. With my normal default font (-PfEd-DejaVu Sans
Mono-normal-normal-normal-*-11-*-*-*-m-0-iso10646-1):

|----------------+-------+-----------+-------+-----------+-------+-----------|
|                |   Tags alignment  |  Separator width  |    New time       |
|  Fringe mode   +-------+-----------+-------+-----------+-------+-----------|
|                | 9.5.3 | +v2 Patch | 9.5.3 | +v2 Patch | 9.5.3 | +v2 Patch |
|----------------+-------+-----------+-------+-----------+-------+-----------|
| Default (Both) | OK    | OK        | OK    | OK        | OK    | OK        |
| Minimal        | OK    | OK        | OK    | OK        | OK    | OK        |
| Left only      | FAIL  | OK        | FAIL  | OK        | OK    | OK        |
| Right only     | FAIL  | OK        | FAIL  | OK        | OK    | OK        |
| No fringes     | FAIL  | OK        | FAIL  | OK        | OK    | OK        |
|----------------+-------+-----------+-------+-----------+-------+-----------|


2. After `C-x + + +' and also `C-x - - -' (giving -PfEd-DejaVu Sans
Mono-normal-normal-normal-*-21-*-*-*-m-0-iso10646-1 and -PfEd-DejaVu Sans
Mono-normal-normal-normal-*-7-*-*-*-m-0-iso10646-1):

|----------------+-------+-----------+-------+-----------+-------+-----------|
|                |   Tags alignment  |  Separator width  |    New time       |
|  Fringe mode   +-------+-----------+-------+-----------+-------+-----------|
|                | 9.5.3 | +v2 Patch | 9.5.3 | +v2 Patch | 9.5.3 | +v2 Patch |
|----------------+-------+-----------+-------+-----------+-------+-----------|
| Default (Both) | FAIL  | OK        | FAIL  | OK        | OK    | OK        |
| Minimal        | FAIL  | OK        | FAIL  | OK        | OK    | OK        |
| Left only      | FAIL  | OK        | FAIL  | OK        | OK    | OK        |
| Right only     | FAIL  | OK        | FAIL  | OK        | OK    | OK        |
| No fringes     | FAIL  | OK        | FAIL  | OK        | OK    | OK        |
|----------------+-------+-----------+-------+-----------+-------+-----------|


3. With a proportional font (-1ASC-Liberation
Sans-normal-normal-normal-*-13-*-*-*-*-0-iso10646-1):

|----------------+-------+-----------+-------+-----------+-------+-----------|
|                |   Tags alignment  |  Separator width  |    New time       |
|  Fringe mode   +-------+-----------+-------+-----------+-------+-----------|
|                | 9.5.3 | +v2 Patch | 9.5.3 | +v2 Patch | 9.5.3 | +v2 Patch |
|----------------+-------+-----------+-------+-----------+-------+-----------|
| Default (both) | FAIL  | FAIL      | FAIL  | FAIL      | OK    | OK        |
| Minimal        | FAIL  | FAIL      | FAIL  | FAIL      | OK    | OK        |
| Left only      | FAIL  | FAIL      | FAIL  | FAIL      | OK    | OK        |
| Right only     | FAIL  | FAIL      | FAIL  | FAIL      | OK    | OK        |
| No fringes     | FAIL  | FAIL      | FAIL  | FAIL      | OK    | OK        |
|----------------+-------+-----------+-------+-----------+-------+-----------|

Note: My testing of the position of the new time stamps was only cursory. I
never pay attention to them in normal use. I just checked that they were
approximately right aligned. [I think, in fact, that both before and after your
patch the behaviour isn't quite correct -- the stamps appear to be one character
too far to the left. Of course that is barely noticeable and there are clearly
far far more important things in Org to be worked on.]

Regards,
N.




reply via email to

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