[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] org-contacts.el: Use `bound-and-true-p' to check (unbound) v
From: |
miles christopher |
Subject: |
Re: [PATCH] org-contacts.el: Use `bound-and-true-p' to check (unbound) var |
Date: |
Tue, 5 Jan 2021 11:33:36 +0000 |
Applied, I think this should be the final version.
I also fixed a problem in org-contacts-store-link.
David Florness <david@florness.com> writes:
> * org-contacts.el (org-contacts-link-store): Use `bound-and-true-p' to
> check the truthiness of org-id-link-to-org-use-id, which may or may
> not be bound depending on whether org-id has been loaded. This
> simplifies the code.
> ---
> Thank you, Kyle. This patch should do the trick. I'm always happy to
> send another revision so feel free to nitpick.
>
> contrib/lisp/org-contacts.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
> index 7ad425519..3df1b52dd 100644
> --- a/contrib/lisp/org-contacts.el
> +++ b/contrib/lisp/org-contacts.el
> @@ -1166,7 +1166,7 @@ are effectively trimmed). If nil, all zero-length
> substrings are retained."
> "Store the contact in `org-contacts-files' with a link."
> (when (and (eq major-mode 'org-mode)
> (member (buffer-file-name) (mapcar 'expand-file-name
> org-contacts-files)))
> - (if (and (featurep 'org-id) org-id-link-to-org-use-id)
> + (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
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
[PATCH v2] org-contacts.el: Only use org-id-store-link if org-id is loaded, David Florness, 2021/01/04