From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id jP/LE7WxfWVRSQAAkFu2QA (envelope-from ) for ; Sat, 16 Dec 2023 15:18:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uMF2CrWxfWXyfwEAe85BDQ (envelope-from ) for ; Sat, 16 Dec 2023 15:18:29 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="N7/IA9Aa"; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702736308; 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=SmTvhLvNUacf633n9samxtle1f+VQ/s+ORS1u7XwAMY=; b=orEUWofoJ49voIq4eRIxqw4AzCMrurjtdY5bZyX4aC4miZd3qmBUHfv3hDhc/O6sCngU1D 1vMvWrO5oSlb9RWgRmZ0u0STkNpOqhW9vfGSjEqWKdI66/J2jXBR3yJ35AgqCTXMFvy/CL hhE8n3+Oaol4y02kNWKALXytVoIL1OlScJTKZRv91GA7PKqOq/8xAGdYJNr/uVqnMrwRIY s1caa2qqaKOK9DzHBi3MSJdKXod+ixYPNE9c36O/paGQoW2n0LAHqIgZVHVMuhiY6u8+CP og9RuQKYLjOctatjjxTw8Z+pJT+mHpfIQBy0GAC8qpB5tLI+IsJ37UnKmw6Y2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702736308; a=rsa-sha256; cv=none; b=MpULRge7P6K8KQpnRfQMr9EraNX2XnEWzxXYQwlqc4tvBV5a+WYv929NjhBQk3wG+386C3 G+mzcq+nlaWGc2fZ+Kf8CnvoLKcxQVj76+vNLLl09gSpr31gRMkBfohA4/AZkIXbpR/eTb XrypaYg2zoX8zxg9v7oBpPMyA2mQL+Let1xx7UKdOQOxAjECjYWhdxFNWKfqWsWHHzfuHf EVgb57Y3a/e0ihU+COSsQXIHpDKfEDQzhLi5KyMW8sqDnENejkYjCXANRqpY90yApmobaG SW7dxEB6VdTLkQgThQLz58cQKnOjQlnHq02DwLnH2SaRIZABEtDPSVohMVSdog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="N7/IA9Aa"; 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"; dmarc=pass (policy=none) header.from=posteo.net 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 B89C4510EB for ; Sat, 16 Dec 2023 15:18:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEVTt-0000vj-VA; Sat, 16 Dec 2023 09:17:31 -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 1rEVTm-0000vG-9I for emacs-orgmode@gnu.org; Sat, 16 Dec 2023 09:17:23 -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 1rEVTi-00051h-RG for emacs-orgmode@gnu.org; Sat, 16 Dec 2023 09:17:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4EC0D240101 for ; Sat, 16 Dec 2023 15:17:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702736235; bh=dAYf1RG9sw1TaX0JDySwrP8E/f/bGqPpMVNwsq8rLoc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=N7/IA9AauKXPF17f3mbFV9j1z1DjxeOhixu2+sgdALpvHcRMyCQAHSBrcMPZG9ncH 9YhLnnbsIDfP19CDgKWvvjerghpkhoxXN6Z9C9uk9499kzF2m1aKN74q/9ToESMfoj nYpLsfBd9bnxbFtiBOINE3QAYKphABopXGfnsPnASyyXCxf6KJ34T8RZfrzKqpCZgc OyRCr6a29VBQ33J8pzG9NLUv6ZkpBGGRuA07ryqo8WDQBANmR6uzGIK7oe4bk7m/G9 4MEpZ6r/XaFkgbM7txbi47lQqglSyUqbrl+Vifuwmqfziu5+MjLmRQdfZtFhoW3Y00 NEhGQZSORIGMw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Ssp7Z48R0z6tw7; Sat, 16 Dec 2023 15:17:14 +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: <3c5737c8-f489-4144-a27f-c0e0527c79c0@app.fastmail.com> References: <118435e8-0b20-46fd-af6a-88de8e19fac6@app.fastmail.com> <87edkwsafe.fsf@localhost> <87cywh2ad6.fsf@localhost> <87jzpmqiy0.fsf@localhost> <2cdfefbf-e9e3-4aeb-a410-1ff3a9d6168e@app.fastmail.com> <87zfybzkul.fsf@localhost> <3c5737c8-f489-4144-a27f-c0e0527c79c0@app.fastmail.com> Date: Sat, 16 Dec 2023 14:20:24 +0000 Message-ID: <87bkaqcjpz.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-Spam-Score: -6.39 X-Spam-Score: -6.39 X-Migadu-Queue-Id: B89C4510EB X-Migadu-Scanner: mx11.migadu.com X-TUID: It82NOWzwFeG "Rick Lupton" writes: > Thanks for the example and explanation. Yes that does make sense, mostly. I assume this would look like this in org-store-link: > > (let ((org-link-context-for-files (org-xor org-link-context-for-files (equal arg '(4)))) > (...call store link functions...)) Yes. > The meaning of `org-link-context-for-files' is then shifting from being "should file: links include search strings (and how much should be included when the region is active)" from "should any link that supports search strings include them (and how much should be included when the region is active)". Is it necessary to rename it to reflect this? (e.g. to `org-link-use-context' or similar). I do not think so - with your addition, we are still linking to files. May simply update the docstring for `org-link-context-for-files' and `org-store-link'. > It's also then less clear what the role of `org-id-link-use-context' is and how it interacts with `org-link-context-for-files'. I had included `org-id-link-use-context' to give a way to opt out of the new behaviour (i.e. using the update discussed above, a search string is added if (and org-link-context-for-files org-id-link-use-context) ). But perhaps this is also unnecessarily complicated, and `org-id-link-use-context' could be removed again completely? I do not think so - it is important to keep an option for users to return to previous behaviour. We might, in theory, modify `org-link-context-for-files' to allow per-link type customization (then, people could set things back to "context just for file: links"), but it would be more complicated IMHO. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at