>From b4444ae5f46b6edbb9064d2f2be5c4e2e1851948 Mon Sep 17 00:00:00 2001 From: Felix Dietrich Date: Sat, 26 Mar 2022 13:58:03 +0100 Subject: [PATCH] org-contacts: Fix compilation warnings and erros --- lisp/org-contacts.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/org-contacts.el b/lisp/org-contacts.el index 94be38a..2866fff 100644 --- a/lisp/org-contacts.el +++ b/lisp/org-contacts.el @@ -62,6 +62,7 @@ ;;; Code: (require 'cl-lib) +(eval-when-compile (require 'cl)) ; for ‘lexical-let’ (require 'org) (require 'gnus-util) (require 'gnus-art) @@ -749,8 +750,8 @@ This function should be called from `gnus-article-prepare-hook'." (with-current-buffer (marker-buffer marker) (save-excursion (goto-char marker) - (let* ((org-email-link-description-format (or org-contacts-email-link-description-format - org-email-link-description-format)) + (let* ((org-link-email-description-format (or org-contacts-email-link-description-format + org-link-email-description-format)) (link (gnus-with-article-buffer (org-store-link nil)))) (org-set-property org-contacts-last-read-mail-property link))))))) @@ -1169,14 +1170,14 @@ are effectively trimmed). If nil, all zero-length substrings are retained." (member (buffer-file-name) (mapcar 'expand-file-name org-contacts-files))) (if (bound-and-true-p org-id-link-to-org-use-id) (org-id-store-link) - (let ((headline-str (substring-no-properties (org-get-heading t t t t)))) - (org-store-link-props + (let* ((headline-str (substring-no-properties (org-get-heading t t t t))) + (link (concat "org-contact:" headline-str))) + (org-link-store-props :type "org-contact" :link headline-str :description headline-str) - (setq desc headline-str) - (setq link (concat "org-contact:" headline-str)) - (org-add-link-props :link link :description desc) + (org-link-add-props :link link + :description headline-str) link)))) (defun org-contacts--all-contacts () -- 2.35.1