From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id YAzQIow2lGWoUAAAkFu2QA (envelope-from ) for ; Tue, 02 Jan 2024 17:15:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YFxAHIw2lGVHFgEAqHPOHw (envelope-from ) for ; Tue, 02 Jan 2024 17:15:08 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ricklupton.name header.s=fm1 header.b="J zn0Tpz"; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=WzDAefVE; 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=ricklupton.name ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704212108; 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=hSBraGATsYEWwE56u9XuOvJqrw4jJes/e3vOR2ZN6QE=; b=cJARRfSI/5yShpQ/KYKuTDEZcoc6uhwohy6WZaSo+cOQx0hqT8I4OYZ6kkdQiG8nzUk2h5 Aza8iDywlC7ErMY2+b3V7wrZK6dD8WGfzteHCiur+M/7EnG1+ltFSRLtZ7RkHw958YzsJD 2xmJjRO1Lucxtupx6f++p/GzQ5o1OHXXnoCPskzqIVLd9qb9QBPTEL4mArYM5mNeluTYCS zScBJwC01iwPp/sXhqB0d89Vb1uuSF45HezNmgxRZGLxkkSNhI0LluokwGByR7sPGyWEXg dkEVKqTLvWjuM6v4PbqlNGPqh5V8LTjJr4ffZqoCdhYuRVqkSFvPbYrIZh7Xiw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704212108; a=rsa-sha256; cv=none; b=B+wmqkj+bFjEJyoSRpRgCvOLT0J36xRwbsrGrICDBYgEAZhjukmWLN53qusiS1FzkH9AIB B5UVqlb8bjMwmr7rILKc7yiZCZ6II668lz909GxGOy3l5jZXmUquqTv1fRsCMlEYxnXKiG vHTJuJeHauMNEIbrv4KkCguDtxgniiCDxUJ+Hr7oIY6L9MBdnepYf3k3agmQH8TMXw2x/M OkKcq0Qi7xxu6yqTj+nenvF64ExU1D/NM5lI411l1dhpW0dZpAAeuNjN8BJUbgAlIMmPZT LO+AtQZZYO64JoCEG5K22614dwaNrnfck/nem/kkF3XXrHIVJoMTXeLRUViEDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=ricklupton.name header.s=fm1 header.b="J zn0Tpz"; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=WzDAefVE; 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=ricklupton.name 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 0F7251A806 for ; Tue, 2 Jan 2024 17:15:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKhP6-00045F-RK; Tue, 02 Jan 2024 11:14:08 -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 1rKhP5-00044i-Fh for emacs-orgmode@gnu.org; Tue, 02 Jan 2024 11:14:07 -0500 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKhP3-0003ze-Ga for emacs-orgmode@gnu.org; Tue, 02 Jan 2024 11:14:07 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 5F55532002E2; Tue, 2 Jan 2024 11:14:02 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute2.internal (MEProxy); Tue, 02 Jan 2024 11:14:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ricklupton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1704212041; x= 1704298441; bh=hSBraGATsYEWwE56u9XuOvJqrw4jJes/e3vOR2ZN6QE=; b=J zn0TpzzOG7Au6H4yWVsAy/NVyxLKFNIzc09je3F2LwYyf0kh4uYlopHR6De5YNkS GjdDarC4BT93k1RieGbwmV59clt6QJsOC0F8PgZUpglVoQwGcwgqHleWNBX8MOIs nEFPSHnPKL8NDNJzhn612o0LcDLUrh//pdNSyLIk7e+Z398nx5mSp9MAW7PTVkC/ 3K9bfLmULCSJu0kvLonKAWqaAIk94s49HT8IuZ8Eq3acpJaQH6jcESCcZKjcDIrq PFVWG1qPTSjnXa/FdxqIZJPGrnxtK10EMHf3MCD+Y5MFak8Kwz7TEdh4GLYvS3El 5uGVuZoVvhiX66dkFkmqA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704212041; x=1704298441; bh=hSBraGATsYEWwE56u9XuOvJqrw4j Jes/e3vOR2ZN6QE=; b=WzDAefVEJbjt6oJ+sq4O333lDDtmUVhtI03OqWEobjoj r0ts3D2u/CGz0OsDKm13tt9rxdTblsDdvlzHFgH9WOyovcLYNcIaoWfebJGRFaEF ObwDT7hEcXwv4NhEfFKOKd+sxyBPq7HhIe9IxPKsakogf2kRr4KluQHdZS4jKm0G 42h34QHZwIhADuvyrZa90xDHndIkv8a6sMRuIt8ngYQyHCVnrjR243rubuRMKaId HSl9HmxXElGKon+bcjXRxw3+mY2GtUFBG3a1usZXJIjTi8W8OQUnkpkIRs5k1Zsu rZdShu2qFRB5cTy2zlw3A4Qb9JFAMzKAyJDQ14jL8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdegfedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvvefutgesth dtredtreertdenucfhrhhomhepfdftihgtkhcunfhuphhtohhnfdcuoehmrghilhesrhhi tghklhhuphhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepffevhffhvdeuueeuue etuefgffejfeegleetjedvieeuteffjeffkeejveehgfeinecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrihhlsehrihgtkhhluhhpthhonh drnhgrmhgv X-ME-Proxy: Feedback-ID: i0143436f:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7B3FB1700093; Tue, 2 Jan 2024 11:14:01 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3 MIME-Version: 1.0 Message-Id: <78720555-7511-42cf-892a-4c508f512b39@app.fastmail.com> In-Reply-To: <87msu7r902.fsf@localhost> 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> <87bkaqcjpz.fsf@localhost> <87msu7r902.fsf@localhost> Date: Tue, 02 Jan 2024 16:13:20 +0000 From: "Rick Lupton" To: "Ihor Radchenko" Cc: "Y. E." Subject: Re: [PATCH v2] org-id: allow using parent's existing id in links to headlines Content-Type: text/plain Received-SPF: pass client-ip=64.147.123.20; envelope-from=mail@ricklupton.name; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: -9.86 X-Spam-Score: -9.86 X-Migadu-Queue-Id: 0F7251A806 X-Migadu-Scanner: mx12.migadu.com X-TUID: QSmYb8EYHBlB On Mon, 18 Dec 2023, at 12:27 PM, Ihor Radchenko wrote: > I played around with the patch a bit and found a couple of rough edges: > > 1. When I try to open a link to non-existing search target, like > , I get a query to create a new > heading. If I reply "yes", a new heading is created. However, the > heading is created at the end of the file and is always level 1, > regardless of the "some-id" parent context. > It would make more sense to create a new heading at the end of the > id:some-id subtree. Thanks for the comments. On this point, I'd like to modify `org-insert-heading' to allow for choosing the level of the newly inserted heading, but first wanted to check if you have a preference for how to change it. I think it would be simplest to change the current: (defun org-insert-heading (&optional arg invisible-ok top) "...When optional argument TOP is non-nil, insert a level 1 heading, unconditionally." to: (defun org-insert-heading (&optional arg invisible-ok level) "...When optional argument LEVEL is a number, insert a heading at that level. For backwards compatibility, when LEVEL is non-nil but not a number, insert a level-1 heading." but that is not totally backwards compatible -- is that ok? If it should be completely backwards compatible, alternatively could add an additional optional argument: (defun org-insert-heading (&optional arg invisible-ok top top-level) "...When optional argument TOP is non-nil, insert a top-level heading, unconditionally. When TOP-LEVEL is non-nil, use that level, otherwise level 1." Alternatively I could preserve the intention of TOP but add a special value to change what "top-level" means, so the docstring would become something like this: "When optional argument TOP is non-nil, insert a top-level heading, unconditionally. Specifically, when TOP is `relative', \"top-level\" means one level deeper than the outline level at minimum point position (respecting any narrowing of the buffer). Otherwise, \"top-level\" means level 1." (the motivation for this is that when the buffer is narrowed to the subtree with the matching ID, the new heading will be created at the appropriate level). Best Rick