From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MI2+M5LY81+WJQAA0tVLHw (envelope-from ) for ; Tue, 05 Jan 2021 03:10:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UX9/L5LY818SdAAAB5/wlQ (envelope-from ) for ; Tue, 05 Jan 2021 03:10:10 +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 608769404CD for ; Tue, 5 Jan 2021 03:10:09 +0000 (UTC) Received: from localhost ([::1]:54494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwcjW-0005aE-IJ for larch@yhetil.org; Mon, 04 Jan 2021 22:10:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwcii-0005Za-Lq for emacs-orgmode@gnu.org; Mon, 04 Jan 2021 22:09:16 -0500 Received: from florness.com ([50.116.27.230]:52052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwcig-0000oK-Sg for emacs-orgmode@gnu.org; Mon, 04 Jan 2021 22:09:16 -0500 Received: by florness.com (Postfix, from userid 103) id D08926D8EF; Mon, 4 Jan 2021 20:09:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=florness.com; s=mail; t=1609816152; bh=rClhFbgDUD8z9iXbuFlK3t9RGEUCBdHjiogLSin0TWw=; h=References:From:To:Cc:Subject:In-Reply-To:Date; b=p0MK/o/FRUwWqopBp97Df3Yt5HhFaSLv/oIIzhxqKgXj46kPywWyd4ZnFTy02jHpx roTLBsXeo18D8W5Yh+oFp8yIuIldqi7/f74i0m9lBlvr3F1wmyVPKZWlnr2jn4XE+T A9juOuO2QETRlECC0d1LZE5atWQf42h56IUyceeY= Received: from [127.0.0.1] (localhost [127.0.0.1]) by florness.com (Postfix) with ESMTPSA id 1001A6D8EC; Tue, 5 Jan 2021 03:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=florness.com; s=mail; t=1609816151; bh=rClhFbgDUD8z9iXbuFlK3t9RGEUCBdHjiogLSin0TWw=; h=References:From:To:Cc:Subject:In-Reply-To:Date; b=CoA+OTXcKd11WFGCKYG+rgL+vD9xqJxr/ecGd1PIRF7ERD54nn5RUQoTa+8r4TrYv eO5zvibvGkwcPGsKDsblggdJtcniBW0TXV3bSGyohNeedK8uzmtHoVlnQEH7QyQ/jt 1yz5xyq5NJvsRN57AUGtrD1nWWNkhEEPJ8ABHmK8= References: <874kjxpqht.fsf@florness.com> From: David Florness To: emacs-orgmode@gnu.org Subject: [PATCH v2] org-contacts.el: Only use org-id-store-link if org-id is loaded In-Reply-To: <874kjxpqht.fsf@florness.com> Date: Mon, 04 Jan 2021 22:09:10 -0500 Message-ID: <87eej0dqqx.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: Stefan Monnier Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.63 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=florness.com header.s=mail header.b=p0MK/o/F; dkim=pass header.d=florness.com header.s=mail header.b=CoA+OTXc; dmarc=pass (policy=quarantine) header.from=florness.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 608769404CD X-Spam-Score: -2.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: NhynRRtirTSY --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Fixes bug introduced in 6b83c6e4e that made org-contacts-anniversaries error if org-id was not loaded. =2D-- v1 -> v2: Stefan Monnier made a good suggestion to use bound-and-true-p instead here: https://lists.gnu.org/r/emacs-devel/2021-01/msg00257.html Alternatively, we could autoload org-id-link-to-org-use-id. If you all would prefer this, let me know and I can send a v3 patch. 6b83c6e4e was found using git-blame. 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 82881ecd0..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 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/z2FYTHGRhdmlkQGZs b3JuZXNzLmNvbQAKCRAGBXa3NSuN4z8lB/9Pj5/rGE7jB9C1CmOyifYEufWu7m59 Xg2mFMpWnnNmiCsNRa+1X4zjJBOlgGw7O0oP5RJXGXhYWBV+PGj0nNNOV3yJhLso c1opZ1DjP+c5/fdqJ2dzn6d67X1j6cfD/cc9H8kK0BtL+sau8jjGjC2FFJErkPHy 2YcUdmOLBDL13mm2u6G9OiMOKPq9oNJqH3Gj/eSrj0NpZdNSrsgdPq8kAXcIC7IS 1mVcRabPXJgLdl/t4A1I7tH+/dhKJu3/I2/cZsSeJqLUnOxUj63p4Ccqtqhc6zKb QUp97/XUH5HymgX0n6Y3lE9/e5Xc06BkBFdpj6L6Soyqw15KgmqLrESV =IZqJ -----END PGP SIGNATURE----- --=-=-=--