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

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

[elpa] scratch/org-contacts-rebased 5174678 116/118: Fix AVATAR property


From: Stefan Monnier
Subject: [elpa] scratch/org-contacts-rebased 5174678 116/118: Fix AVATAR property value not exist problem
Date: Fri, 12 Nov 2021 15:37:15 -0500 (EST)

branch: scratch/org-contacts-rebased
commit 5174678e3a19cd52993439daa2821124866c04ea
Author: stardiviner <numbchild@gmail.com>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Fix AVATAR property value not exist problem
---
 org-contacts.el | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index f7644f8..d924204 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -898,17 +898,17 @@ address."
   (setq pom (or pom (point)))
   (catch 'icon
     ;; Use `org-contacts-icon-property'
-    (let ((image-path (let ((avatar (org-entry-get pom 
org-contacts-icon-property))
-                            (link-matcher-regexp 
"\\[\\[\\([^]]*\\)\\]\\(\\[\\(.*\\)\\]\\)?\\]"))
-                        (cond
-                         ;; [[file:dir/filename.png]]
-                         ((string-match-p "\\[\\[.*\\]\\]" avatar)
-                          (when (string-match link-matcher-regexp avatar)
-                            (expand-file-name (substring 
(match-string-no-properties 1 avatar) 5 nil)
-                                              (file-name-directory (first 
org-contacts-files)))))
-                         ;; "" (empty string)
-                         ((string-empty-p avatar) nil)
-                         (t (expand-file-name avatar (file-name-directory 
(first org-contacts-files))))))))
+    (let ((image-path (if-let ((avatar (org-entry-get pom 
org-contacts-icon-property))
+                               (link-matcher-regexp 
"\\[\\[\\([^]]*\\)\\]\\(\\[\\(.*\\)\\]\\)?\\]"))
+                          (cond
+                           ;; [[file:dir/filename.png]]
+                           ((string-match-p "\\[\\[.*\\]\\]" avatar)
+                            (when (string-match link-matcher-regexp avatar)
+                              (expand-file-name (substring 
(match-string-no-properties 1 avatar) 5 nil)
+                                                (file-name-directory (first 
org-contacts-files)))))
+                           ;; "" (empty string)
+                           ((string-empty-p avatar) nil)
+                           (t (expand-file-name avatar (file-name-directory 
(first org-contacts-files))))))))
       (when image-path
         (throw 'icon
                (if (featurep 'imagemagick)



reply via email to

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