[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)
- [elpa] scratch/org-contacts-rebased 38f7b80 100/118: org-contacts.el: Only use org-id-store-link if org-id is loaded, (continued)
- [elpa] scratch/org-contacts-rebased 38f7b80 100/118: org-contacts.el: Only use org-id-store-link if org-id is loaded, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 3d068b7 104/118: org-contacts.el: Display contacts buffer result., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased fd660ce 111/118: Tidy up whitespace, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7b87e73 106/118: Prefer HTTPS to HTTP in most links, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 03dc64d 110/118: Change how completion is done, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 18ba907 114/118: Try to support different type of AVATAR property., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 45bc95a 083/118: org-contacts: Fix org-contacts-matcher for BIRTHDAYs, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 49dd482 089/118: Use `string-match-p' instead of `org-string-match-p', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 124cc7a 098/118: org-contacts.el: Add usage comments, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased b2837af 109/118: simplify logic, remove unused variables, switch to lexical binding, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 5174678 116/118: Fix AVATAR property value not exist problem,
Stefan Monnier <=
- [elpa] scratch/org-contacts-rebased 1be8aa9 069/118: Merge branch 'maint', Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 9c233be 070/118: Revert "Update copyright years.", Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased fc25530 074/118: contrib/lisp/org-contacts.el: Add a hook to allow users to plug completion functions, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased d3509e4 076/118: contrib/lisp/org-contacts.el: Complete contacts using tags and properties, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 6bcb093 079/118: contrib: Fix error messages., Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 44968ec 084/118: Make `org-make-tags-matcher' lexical binding friendly, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 034be20 093/118: org-contacts.el: Add new link type "contact:", Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 7161351 094/118: contrib/lisp/org-contacts.el: Add stardiviner as the maintainer, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 3beb906 057/118: org-contacts: Use progress-reporter for cache update message, Stefan Monnier, 2021/11/12
- [elpa] scratch/org-contacts-rebased 0c439a4 102/118: org-contacts.el: Fix store link function does not return link., Stefan Monnier, 2021/11/12