From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wC+hHkbp819hNAAA0tVLHw (envelope-from ) for ; Tue, 05 Jan 2021 04:21:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MJlYGkbp81+DPQAAbx9fmQ (envelope-from ) for ; Tue, 05 Jan 2021 04:21:26 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 519C89402A2 for ; Tue, 5 Jan 2021 04:21:26 +0000 (UTC) Received: from localhost ([::1]:33530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwdqV-0008Hf-Ht for larch@yhetil.org; Mon, 04 Jan 2021 23:21:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwdq6-0008HR-JJ for emacs-orgmode@gnu.org; Mon, 04 Jan 2021 23:20:58 -0500 Received: from florness.com ([50.116.27.230]:52428) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwdq4-0001rS-FS for emacs-orgmode@gnu.org; Mon, 04 Jan 2021 23:20:58 -0500 Received: by florness.com (Postfix, from userid 103) id 06F816D8F6; Mon, 4 Jan 2021 21:20:54 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=florness.com; s=mail; t=1609820454; bh=BiWwlxeFAzwW+eGhsxoNQMAJ48b9xPxX+Uo1apUEF/0=; h=References:From:To:Cc:Subject:In-Reply-To:Date; b=F/lAvN/nNTns9egW5vV4LQfeUgfcvsfkPdLvgy9AT/NziTWV6Xi8dxoa73uCFE2y0 OLDs4QLXI+2zRURul11smjBzyLo+2QsDM/yvQZYYL+xXT6P3wav9dBJsmnFUAn0862 8KVRDp4yh3FUxBq/dB/KwP06G+XeRCCp6htLtbBQ= Received: from [127.0.0.1] (localhost [127.0.0.1]) by florness.com (Postfix) with ESMTPSA id 8C8E66CEBE; Tue, 5 Jan 2021 04:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=florness.com; s=mail; t=1609820452; bh=BiWwlxeFAzwW+eGhsxoNQMAJ48b9xPxX+Uo1apUEF/0=; h=References:From:To:Cc:Subject:In-Reply-To:Date; b=fgFL9KNlTMpL/A6tZNGVnh6PuEcirMKmVjbCpcqbDJh99UppjNi8lrV2kdieR7wlk F9gn9ipasOW0DbeFKqj5nNiKkAxTbH+ppAZ8uMxqW46+888RV3EaOXW/pic+Z9IDKH YL8lhS4fgg253gLv3hldj43ArIyUqxWW0DPCcuWE= References: <87wnwsyr26.fsf@kyleam.com> From: David Florness To: Kyle Meyer , stardiviner Subject: [PATCH] org-contacts.el: Use `bound-and-true-p' to check (unbound) var In-Reply-To: <87wnwsyr26.fsf@kyleam.com> Date: Mon, 04 Jan 2021 23:20:51 -0500 Message-ID: <87ft3gdnfg.fsf@florness.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=50.116.27.230; envelope-from=david@florness.com; helo=florness.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: 519C89402A2 X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: k3lRB9Nh4Tp3 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * 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. =2D-- 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 =2D-- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -1166,7 +1166,7 @@ are effectively trimmed). If nil, all zero-length su= bstrings 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-fi= les))) =2D (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 =2D-=20 2.30.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFHBAEBCAAxFiEEwHk86n9BB8P+iE+GBgV2tzUrjeMFAl/z6SMTHGRhdmlkQGZs b3JuZXNzLmNvbQAKCRAGBXa3NSuN47n/CAC5kVb9uY6CPZhM3nmFV0EeLT0CR3w9 K+oyfMvagcAgI5BZvvnwNr7unLRgcaeuFIpXordgoV2ioUWtX+54E9KKbvy+MHa1 t0ns80Sj3SDaDxIgia6uTExgMUaydE4TUMbDDtTAJQN6F36OmVZvDrua4NdlkjF5 s8BUilgXoAJrZbgzEgROX+RDq43wUNAezKlMRkDFRxNq+X+iL2arkQwu5tijDdml yW6wBssOqK1wNlcAcUrQp9oNzYKHVYC6MgoMc+VvQ2Kg9ZQ2tKpSkfM65YKbHZfy T1CmoNyrs4fwPjUDqqJMvmOP8zrFRsaOOVHCR9M9Lnb6mbi/pTdwoFiC =xIvS -----END PGP SIGNATURE----- --=-=-=--