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

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

[nongnu] elpa/org-journal c84f1a7719: fix: do not error out on timestamp


From: ELPA Syncer
Subject: [nongnu] elpa/org-journal c84f1a7719: fix: do not error out on timestamps with extra components (#407)
Date: Mon, 9 Jan 2023 08:01:08 -0500 (EST)

branch: elpa/org-journal
commit c84f1a771933d662695c20b73832a6415b7d3603
Author: Janek <27jf@pm.me>
Commit: GitHub <noreply@github.com>

    fix: do not error out on timestamps with extra components (#407)
    
    fix https://github.com/bastibe/org-journal/issues/397
---
 org-journal.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/org-journal.el b/org-journal.el
index 81af272788..f175439c54 100644
--- a/org-journal.el
+++ b/org-journal.el
@@ -505,7 +505,8 @@ before it will be deposed."
     initially (setq format (regexp-quote (replace-regexp-in-string "%F" 
"%Y-%m-%d" format t)))
     for (fmt . rx) in org-journal--format-rx-alist
     do (setq format (replace-regexp-in-string fmt rx format t))
-    finally return format))
+    ;; Ignore extra timestamp elements rather than erroring out
+    finally return (replace-regexp-in-string "[]>]$" "[A-z0-9: ]*\\&" format)))
 
 (defvar org-journal--created-re "^ *:CREATED: +.*$"  "Regex to find created 
property.")
 



reply via email to

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