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

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

[elpa] externals-release/org 5bbb97f3df: org-fix-agenda-info: Fix Emacs


From: ELPA Syncer
Subject: [elpa] externals-release/org 5bbb97f3df: org-fix-agenda-info: Fix Emacs <28 compatibility
Date: Tue, 24 Jan 2023 04:57:58 -0500 (EST)

branch: externals-release/org
commit 5bbb97f3df9788646b8d48d60e8b8ea06566e05f
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    org-fix-agenda-info: Fix Emacs <28 compatibility
    
    * lisp/org-agenda.el (org-fix-agenda-info): Do not use `string-pad'
    that is only available since Emacs 28.  Instead, use the expression
    used as default value of `calendar-iso-date-display-form'.
    
    Reported-by: Aaron L. Zeng <me@bcc32.com>
    Link: https://orgmode.org/list/20230124025259.1301063-1-me@bcc32.com
---
 lisp/org-agenda.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 2d194ad341..3dee80cf4f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3474,7 +3474,9 @@ This ensures the export commands can easily use it."
     (when (setq tmp (plist-get props 'date))
       (when (integerp tmp) (setq tmp (calendar-gregorian-from-absolute tmp)))
       (let ((calendar-date-display-form
-             '(year "-" (string-pad month 2 ?0 'left) "-" (string-pad day 2 ?0 
'left))))
+             '((format "%s-%.2d-%.2d" year
+                       (string-to-number month)
+                       (string-to-number day)))))
        (setq tmp (calendar-date-string tmp)))
       (setq props (plist-put props 'date tmp)))
     (when (setq tmp (plist-get props 'day))



reply via email to

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