emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] 81c7a2dee8 misaligns time lines in agenda
@ 2021-07-25 23:00 Adam Porter
  2021-09-25 19:46 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Porter @ 2021-07-25 23:00 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

In the course of working on a PR for org-super-agenda [0], we found that
a recent change to Org, commit 81c7a2dee8 [1], causes a misalignment in
the way time lines in the agenda are displayed.  The org-super-agenda
test suite shows this change when results from Org 9.4 and 9.4.6 are
compared.  For example, in this diff of an agenda buffer:

#+BEGIN_EXAMPLE diff
 @@ -2,8 +2,8 @@
 Wednesday   5 July 2017
 
  Today
-  test:        7:02...... Sunrise (12:04 of daylight)
-               8:00...... ----------------
+  test:       7:02......  Sunrise (12:04 of daylight)
+              8:00......  ----------------
               10:00...... ----------------
               12:00...... now - - - - - - - - - - - - - - - - - - - - - - - - -
               12:00...... ----------------
#+END_EXAMPLE

The old lines, with single-digit hours, were properly aligned with the
lines with multi-digit hours, but the new lines are one character too
far to the left.

Since Bastien made this change, and it's very simple, I'm guessing he'll
know what the proper fix is.  :)

Thanks,
Adam

0: https://github.com/alphapapa/org-super-agenda/pull/167
1: https://code.orgmode.org/bzg/org-mode/commit/81c7a2dee8e6d0c5e58d0cb4ca97cfc9477ff660



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] 81c7a2dee8 misaligns time lines in agenda
  2021-07-25 23:00 [BUG] 81c7a2dee8 misaligns time lines in agenda Adam Porter
@ 2021-09-25 19:46 ` Bastien
  2021-09-26  2:53   ` Adam Porter
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2021-09-25 19:46 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode

Hi Adam,

Adam Porter <adam@alphapapa.net> writes:

> In the course of working on a PR for org-super-agenda [0], we found that
> a recent change to Org, commit 81c7a2dee8 [1], causes a misalignment in
> the way time lines in the agenda are displayed.  The org-super-agenda
> test suite shows this change when results from Org 9.4 and 9.4.6 are
> compared.  For example, in this diff of an agenda buffer:
>
> #+BEGIN_EXAMPLE diff
>  @@ -2,8 +2,8 @@
>  Wednesday   5 July 2017
>  
>   Today
> -  test:        7:02...... Sunrise (12:04 of daylight)
> -               8:00...... ----------------
> +  test:       7:02......  Sunrise (12:04 of daylight)
> +              8:00......  ----------------
>                10:00...... ----------------
>                12:00...... now - - - - - - - - - - - - - - - - - - - - - - - - -
>                12:00...... ----------------
> #+END_EXAMPLE
>
> The old lines, with single-digit hours, were properly aligned with the
> lines with multi-digit hours, but the new lines are one character too
> far to the left.
>
> Since Bastien made this change, and it's very simple, I'm guessing he'll
> know what the proper fix is.  :)

The change I made was superceded by Nicolas series of patches:

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/log/?qt=grep&q=fix+org-duration-to-minutes+error

I agree the new alignment looks wrong: the starting time should 
bit right-aligned with other time above/below, and the separating 
dash should not spaces for "HH:MM" time strings on the right, but
only for " H:MM".

Would you have time to prepare a patch for this?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] 81c7a2dee8 misaligns time lines in agenda
  2021-09-25 19:46 ` Bastien
@ 2021-09-26  2:53   ` Adam Porter
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Porter @ 2021-09-26  2:53 UTC (permalink / raw)
  To: Bastien; +Cc: orgmode list

Hi Bastien,

On Sat, Sep 25, 2021 at 2:46 PM Bastien <bzg@gnu.org> wrote:

> > Since Bastien made this change, and it's very simple, I'm guessing he'll
> > know what the proper fix is.  :)
>
> The change I made was superceded by Nicolas series of patches:
>
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/log/?qt=grep&q=fix+org-duration-to-minutes+error

Oops, thanks.  I found your commit by searching the log, but I should
have checked blame on the code to see if it had been changed since
then.

> I agree the new alignment looks wrong: the starting time should
> bit right-aligned with other time above/below, and the separating
> dash should not spaces for "HH:MM" time strings on the right, but
> only for " H:MM".
>
> Would you have time to prepare a patch for this?

Unfortunately, I'm unable to reproduce it on my system, even using Org
9.4.6 in a clean Emacs config.  For some reason, it only seems to
happen on the org-super-agenda repo's GitHub Actions CI (which tests
on Emacs 26.3, 27.1, and snapshot versions).  So I'm not sure what's
going on.  :(  Hopefully Nicolas's changes solve the problem for Org
9.5 (if the problem is really one after all).


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-26  2:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25 23:00 [BUG] 81c7a2dee8 misaligns time lines in agenda Adam Porter
2021-09-25 19:46 ` Bastien
2021-09-26  2:53   ` Adam Porter

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).