emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals-release/org 94837fc 2/2: agenda: Fix org-agenda-show-ne


From: ELPA Syncer
Subject: [elpa] externals-release/org 94837fc 2/2: agenda: Fix org-agenda-show-new-time on Emacs 24
Date: Sat, 1 May 2021 15:57:10 -0400 (EDT)

branch: externals-release/org
commit 94837fc6b5ca204962f3ed992e30cd998d66a9fe
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    agenda: Fix org-agenda-show-new-time on Emacs 24
    
    * lisp/org-agenda.el (org-agenda-show-new-time): Add fallback for when
    window-font-width isn't available.
    
    efbf96389 (org-agenda.el: Fix display of agenda new time, 2020-02-02)
    reworked the column calculation to use window-font-width, but that
    function isn't available until Emacs 25, and it's definition can't be
    easily ported to org-compat.
    
    Instead just use the old logic, which had been in place since v8.2.6,
    when window-font-width isn't available.
    
    Reported-by: Ihor Radchenko <yantar92@gmail.com>
    Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
---
 lisp/org-agenda.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ca5ae40..d5abfff 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9700,7 +9700,12 @@ Called with a universal prefix arg, show the priority 
instead of setting it."
                                  (line-end-position)
                                  '(display nil))
          (org-move-to-column
-          (- (/ (window-width nil t) (window-font-width)) (length stamp)) t)
+           (- (if (fboundp 'window-font-width)
+                  (/ (window-width nil t) (window-font-width))
+                ;; Fall back to pre-9.3.3 behavior on Emacs <25.
+                (window-width))
+              (length stamp))
+           t)
           (add-text-properties
           (1- (point)) (point-at-eol)
           (list 'display (org-add-props stamp nil



reply via email to

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