From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 4G5YNbv/TWWMegEAauVa8A:P1 (envelope-from ) for ; Fri, 10 Nov 2023 11:02:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4G5YNbv/TWWMegEAauVa8A (envelope-from ) for ; Fri, 10 Nov 2023 11:02:35 +0100 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 88D375B40D for ; Fri, 10 Nov 2023 11:02:35 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OnVQp4oa; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699610555; a=rsa-sha256; cv=none; b=iPMxu+ZfiHFO+Pokf73d/TNgBOXfSouxbjXWI9YjrpRq+7eV52H+MOc2LkmBMiwQIM/vJZ NHwLe93OQi5x1Mso4VDGN+5hpKcZXTlA+E8Lv/oJgEdWDCjYt9/YKa/s0qZid7LceqgkMY JtAL/hAf9xu6ODvRll1C5PH0ic/KIs3qvjtKhiNj5AvlfRwmR5kouz6xdLRgVQ2oJyqUSp wC9MhdWarCcbQApbHkcS9xIx22xUcsso/Rf3GNwt7vT1x8LUuAmCSujlHI9NlrbE3KL2O2 RqItVtKvyqMeQusHrwyNkzPrdgG+4EuveJbWVxA5URHs4TcakaGwOIJcc4AK8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699610555; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kRk7jOrX9GI+Prikt6BTCb2epK3DWjxS4UFaSypSElI=; b=AeGZsGmOG/3BfH579xgBxcLw2DDNdxfnQMixPrd4NKM83qvXnc4In5mh3m007N2gAxqUdX SKv/C/adAPCQ+rTNL+7PuXadN1f5vNVmPV0EQqhXAiUWYvEG2usGHfixMDZNrfSt7+2Nlo Ewvhr745T61jHZz3hAHnRmJTUwWZwSKsElDO8zitUGinG9kl3IKlhb+PrWMhAsAFWLA95p E+T2lxOYBS7XDM9pJUyC+x08bneadzu375Y2fRzRRnk8BNN7eLdFbr1XgtmcYwEdwhFWUf NSiKGhg9spndnBQU4RK6KadGBtcNkHupwPd6pzB1u4ZbGnghbaEv/3FFB0qGbg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OnVQp4oa; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1OKk-0007rG-Kw; Fri, 10 Nov 2023 05:01:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1OKh-0007pM-9u for emacs-orgmode@gnu.org; Fri, 10 Nov 2023 05:01:47 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1OKe-0003R4-Pk for emacs-orgmode@gnu.org; Fri, 10 Nov 2023 05:01:47 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D5C7A240101 for ; Fri, 10 Nov 2023 11:01:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1699610501; bh=fj4Xwt91IYNUqooFhySuHvG9esE/uIQAADV87IJx/6s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=OnVQp4oaBo31w+5oUr1vIAmVyTfBzUVpOQwuDbYdpxH8g+wVFu43TZ7YZ+Mcg9Szi mzqrSsO5Y/18Q8Qp8JK7ZNSfCQeKwd4vp3hTd8soSpeM3Fc3TGeRgwxSgx2DRPtd68 5SooE6gno2G+AfryawfcANNrZUOuxJzPwGdYzNZeNtl+5TWAWzHyCYAuwkWVJjSUNz HDVIJ0d/Ky1QH3Wpyz3AdGe4+WMECqkTWhHajN3vhZUitXXsvC+2ItuK/GTxe7Ysqy lxPU0AE4VfllB5KeJFuFRPRHGeUAX9UwBddUgkSLcdZEM2qO/Y54OJfHUS9LUJhTHE 8rYDe9qZ6ohzw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SRZ9K1j70z9rxG; Fri, 10 Nov 2023 11:01:41 +0100 (CET) From: Ihor Radchenko To: Rick Lupton Cc: "Y. E." Subject: Re: [PATCH] org-id: allow using parent's existing id in links to headlines In-Reply-To: References: <118435e8-0b20-46fd-af6a-88de8e19fac6@app.fastmail.com> <87edkwsafe.fsf@localhost> Date: Fri, 10 Nov 2023 10:03:49 +0000 Message-ID: <87cywh2ad6.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -9.31 X-Migadu-Queue-Id: 88D375B40D X-Migadu-Spam-Score: -9.31 X-TUID: 6Zf/5K+Y+7Gx "Rick Lupton" writes: > On Tue, 25 Jul 2023, at 8:43 AM, Ihor Radchenko wrote: >> Ideally, we should have all the necessary logic to store the link within >> `org-id-store-link' and then use `org-link-set-parameters' to configure >> id links. > > I agree this would be neater, but looking at how this would work, I have a question: > > Behaviour in `org-store-link` currently depends on the `interactive?` argument, e.g. in this logic > > (and interactive? > (or (eq org-id-link-to-org-use-id 'create-if-interactive) > (and (eq org-id-link-to-org-use-id > 'create-if-interactive-and-no-custom-id) > (not custom-id)))) > > To move this logic to `org-id-store-link`, is there a way that `org-id-store-link` can tell whether `org-store-link` was called (a) interactively, or (b) with the `interactive?` argument true? I think that we need to make a change in the rules for :store functions. `interactive?' may be passed as the argument to these functions. In order to not cause breakage, we need something like (condition-case nil (funcall protocol path desc backend info) ;; XXX: The function used (< Org 9.4) to accept only ;; three mandatory arguments. Type-specific `:export' ;; functions in the wild may not handle current ;; signature. Provide backward compatibility support ;; for them. (wrong-number-of-arguments (funcall protocol path desc backend))) to keep the old :store functions that accept 0 arguments working. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at