emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: miles christopher <numbchild@gmail.com>
To: David Florness <david@florness.com>
Cc: Kyle Meyer <kyle@kyleam.com>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] org-contacts.el: Use `bound-and-true-p' to check (unbound) var
Date: Tue, 5 Jan 2021 11:33:36 +0000	[thread overview]
Message-ID: <VI1PR1001MB10705669C1FC4D3568BD16E9A3D10@VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <87ft3gdnfg.fsf@florness.com>


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


  parent reply	other threads:[~2021-01-05 11:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 23:09 [PATCH] org-contacts.el: Only use org-id-store-link if org-id is loaded David Florness
2021-01-04  3:44 ` miles christopher
2021-01-04  4:15   ` David Florness
2021-01-04 17:33     ` miles christopher
2021-01-04 18:13       ` David Florness
2021-01-04 18:21         ` David Florness
2021-01-05  3:09 ` [PATCH v2] " David Florness
2021-01-05  3:56   ` Kyle Meyer
2021-01-05  4:20     ` [PATCH] org-contacts.el: Use `bound-and-true-p' to check (unbound) var David Florness
2021-01-05  5:06       ` Kyle Meyer
2021-01-05 11:33       ` miles christopher [this message]
2021-04-25  3:41         ` Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR1001MB10705669C1FC4D3568BD16E9A3D10@VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM \
    --to=numbchild@gmail.com \
    --cc=david@florness.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).