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

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

[elpa] externals/org-jami-bot 4403a1a2d4 11/22: fix time stamp format


From: ELPA Syncer
Subject: [elpa] externals/org-jami-bot 4403a1a2d4 11/22: fix time stamp format
Date: Sun, 4 Feb 2024 09:58:51 -0500 (EST)

branch: externals/org-jami-bot
commit 4403a1a2d4a770bae4f9fbb9e3fb2f2772c83982
Author: Hanno Perrey <hanno@hoowl.se>
Commit: Hanno Perrey <hanno@hoowl.se>

    fix time stamp format
    
    use org-time-stamp-format to derive format instead of manual string 
manipulation
---
 org-jami-bot.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/org-jami-bot.el b/org-jami-bot.el
index de52878710..4838b47913 100644
--- a/org-jami-bot.el
+++ b/org-jami-bot.el
@@ -83,7 +83,7 @@ message belongs to."
          (body (cadr (assoc-string "body" msg)))
          (lines (string-lines body))
          ;; use inactive timestamps
-         (timefmt (concat "[" (substring (cdr org-time-stamp-formats) 1 -1) 
"]")))
+         (timefmt (org-time-stamp-format 't 't)))
     (with-current-buffer (get-buffer-create buf)
       (insert (if continue
                   ;; multi message capture
@@ -121,7 +121,7 @@ by sending '!done'."
          (body (cadr (assoc-string "body" msg)))
          (lines (string-lines body))
          ;; use inactive timestamps
-         (timefmt (concat "[" (substring (cdr org-time-stamp-formats) 1 -1) 
"]")))
+         (timefmt (org-time-stamp-format 't 't)))
     (with-current-buffer (get-buffer-create buf)
       (insert (if (string-empty-p buf)
                   (format "* Multi-message note capture 
%s\n:PROPERTIES:\n:CREATED: %s\n:END:\n"
@@ -157,7 +157,7 @@ CONVERSATION for jami ACCOUNT."
          (continue (get-buffer buf))
          (displayname (cadr (assoc-string "displayName" msg)))
          ;; use inactive timestamps
-         (timefmt (concat "[" (substring (cdr org-time-stamp-formats) 1 -1) 
"]")))
+         (timefmt (org-time-stamp-format 't 't)))
     (with-current-buffer (get-buffer-create buf)
       (let ((link
              ;; link to downloaded file
@@ -205,8 +205,7 @@ CONVERSATION for jami ACCOUNT."
   (let* ((body (cadr (assoc-string "body" msg)))
          (lines (string-lines body))
          ;; use inactive timestamps
-         (timefmt (concat "[" (substring (cdr org-time-stamp-formats) 1 -1) 
"]")))
-
+         (timefmt (org-time-stamp-format 't 't)))
           (if (org-capture-string
                (format "* TODO %s\nSCHEDULED: %s\n:PROPERTIES:\n:CREATED: 
%s\n:END:\n%s"
                        (car lines)
@@ -229,7 +228,7 @@ confirmation. ACCOUNT and CONVERSATION are not used."
          (lines (string-lines body))
          (swhen (org-read-date nil nil (car lines)))
          ;; inactive timestamp
-         (timefmt (concat "[" (substring (cdr org-time-stamp-formats) 1 -1) 
"]")))
+                  (timefmt (org-time-stamp-format 't 't)))
     (if (org-capture-string
          (format "* TODO %s\nSCHEDULED: %s\n:PROPERTIES:\n:CREATED: 
%s\n:END:\n%s"
                  (cadr lines)



reply via email to

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