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 0GZkBRtR9F/UTQAA0tVLHw (envelope-from ) for ; Tue, 05 Jan 2021 11:44:27 +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 GNpSARtR9F9NXQAAB5/wlQ (envelope-from ) for ; Tue, 05 Jan 2021 11:44:27 +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 7F8E39401C0 for ; Tue, 5 Jan 2021 11:44:26 +0000 (UTC) Received: from localhost ([::1]:50580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwklE-0001be-3o for larch@yhetil.org; Tue, 05 Jan 2021 06:44:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwkkq-0001bU-Jg for emacs-orgmode@gnu.org; Tue, 05 Jan 2021 06:44:00 -0500 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:45007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwkko-0007zy-Iz for emacs-orgmode@gnu.org; Tue, 05 Jan 2021 06:44:00 -0500 Received: by mail-ed1-x535.google.com with SMTP id p22so30713654edu.11 for ; Tue, 05 Jan 2021 03:43:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:thread-topic:thread-index:date:message-id :references:in-reply-to:reply-to:accept-language:content-language :content-transfer-encoding:mime-version; bh=Rn651KM+KIyQlewiqdWo2c+YGhqrCSt0u9IJNokG3LA=; b=j9uq637wswE5RGcuiUlTyG9y3BC6g8qg/l/I4itYfvq2gvGWjRCQi9ALRncFBEEmgG q/1vN/IbeNycZvaaQ83qbrGv7oCt1CydAmLLOkm6Y2I+djkAYi4B36GTpvppFd8bUPnG q9JN89/CdFUj4rMtyaqP/6yvYzHaTUbPuWhq3rrVJ1/hv3yrDdcvFaVZLy3fGXvaAW2F BgASdxcDh0gZU6yD06uzgrsWEl3Pca5/WqFmaut/M3gfr2fQ/Lyov4OUWWq2Nil0D6pG cslX0fEQrpcdR+suvOfpdXcZYQyheItKJDBhiZc37DjfaQB5+XIQlxl/OwKL2IDEP4Q8 ETag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:thread-topic:thread-index :date:message-id:references:in-reply-to:reply-to:accept-language :content-language:content-transfer-encoding:mime-version; bh=Rn651KM+KIyQlewiqdWo2c+YGhqrCSt0u9IJNokG3LA=; b=ohmUNLBPtUVORu4s8ozxPcsNoFEo4ju7HR/NG7Hl1ghVPSFgebFMs/+hT6JQ8hRZvH Pvy+BRGTvY3u1NPfcaNo3BsXzUog942o4QYxNNuhul8ssaAH377PFE1zeiJAhHh4v2vO uL6xPNIMqd652ohKMeluWgrxiBzWLnhnihOBvoQDZ33XeNjYnMy1M5fgqTQHDBju3pTJ j8T5F6oj+wyhQop2WFKTRGqV2mVjJAMLJV3WO5Y7uKJzZph0xxHcjDwOuxC4Gle9vnpU Om6OjaTZqJRbsKxB/+USN4ohqdTDkeYnCcl6bh4wLFI11/2YeoAJT2/BTSGUQD1mm2Od fm5w== X-Gm-Message-State: AOAM531KJXa/wFoxiZnXWA8VZPRMIM/YzbQUn/P2j69l5ldNa+WDLLBT uBLfZdsKxmh8lnSkB3VNJA== X-Google-Smtp-Source: ABdhPJzfJmwZne+3mfOSC05Kt4aiYsFvC/vuxxhJf0D/o/Z4gHGJpqvfwHr+cjpuDv7/FhJTeMWMNw== X-Received: by 2002:a05:6402:3c3:: with SMTP id t3mr76108893edw.86.1609847037235; Tue, 05 Jan 2021 03:43:57 -0800 (PST) Received: from VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM ([2603:1026:300:5a::5]) by smtp.gmail.com with ESMTPSA id f18sm44984072edt.60.2021.01.05.03.43.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2021 03:43:56 -0800 (PST) Received: from dark (183.246.146.135) by HK2PR02CA0191.apcprd02.prod.outlook.com (2603:1096:201:21::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.20 via Frontend Transport; Tue, 5 Jan 2021 11:33:34 +0000 From: miles christopher To: David Florness Subject: Re: [PATCH] org-contacts.el: Use `bound-and-true-p' to check (unbound) var Thread-Topic: [PATCH] org-contacts.el: Use `bound-and-true-p' to check (unbound) var Thread-Index: AQHW4x/UvbuU5omk9km1zQ3yotMFTaoY5sYA X-MS-Exchange-MessageSentRepresentingType: 1 Date: Tue, 5 Jan 2021 11:33:36 +0000 Message-ID: References: <87wnwsyr26.fsf@kyleam.com> <87ft3gdnfg.fsf@florness.com> In-Reply-To: <87ft3gdnfg.fsf@florness.com> Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Exchange-Organization-AuthAs: Internal X-MS-Exchange-Organization-AuthMechanism: 06 X-MS-Exchange-Organization-AuthSource: VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM X-MS-Has-Attach: X-MS-Exchange-Organization-Network-Message-Id: 50bdc27f-8dc7-4fe3-d875-08d8b16dbd70 X-MS-Exchange-Organization-SCL: -1 X-MS-TNEF-Correlator: X-MS-Exchange-Organization-RecordReviewCfmType: 0 x-clientproxiedby: HK2PR02CA0191.apcprd02.prod.outlook.com (2603:1096:201:21::27) To VI1PR1001MB1070.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:69::18) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=numbchild@gmail.com; helo=mail-ed1-x535.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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: , Reply-To: miles christopher Cc: Kyle Meyer , "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: -1.24 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=j9uq637w; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 7F8E39401C0 X-Spam-Score: -1.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: Rm8kYzL7aZGx Applied, I think this should be the final version. I also fixed a problem in org-contacts-store-link. David Florness 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 --=20 [ 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