From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qOoxNkksoWQNSAAASxT56A (envelope-from ) for ; Sun, 02 Jul 2023 09:50:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MAo2NUksoWQL2AAAG6o9tA (envelope-from ) for ; Sun, 02 Jul 2023 09:50:33 +0200 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 62CE539375 for ; Sun, 2 Jul 2023 09:50:33 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFrq2-0000dz-U1; Sun, 02 Jul 2023 03:49:42 -0400 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 1qFrpv-0000bB-Nu for emacs-orgmode@gnu.org; Sun, 02 Jul 2023 03:49:35 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFrpt-0004Iw-Bu for emacs-orgmode@gnu.org; Sun, 02 Jul 2023 03:49:35 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 20CE9240027 for ; Sun, 2 Jul 2023 09:49:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1688284170; bh=/8t396/p1Kj7rP8pH3PmxIIu2T3zpA+ujB3xlUKMQDE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=PITlE3di+GH9SEeU5lz7/OB+3bZWLyLJPDUSMPuiIV0HLmMmf1trvKwhQekHT01ZP RWx7cpiJRTk1HBDnrD0tiGVeUKC+D86dhsnmLLGGfdEziL34x6Gw5qN/AVwoY0RKJ3 629LZmWZzHwXgpWAv2LJBA39/FlkADQQ4DE8WvlTx74QL7OiTcs9w8UlclQy3fxbK2 xIWESXoz7kwQfJwRNGAGLwX7th5HeDYdTO8o6TYsTrAZeWVMrhnTB6tJoKA51SoRVP 0DSou0eN7c4tKXNVXRj5XZmD8npW9HNB9PYM31RQe6xBPL5uUHHVPldzHv4hODAhYH M12RsBXfCwVog== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qv1RF3Mh7z9rxD; Sun, 2 Jul 2023 09:49:29 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [Bug] org-insert-link removes on one link from 2 added by org-store-link In-Reply-To: References: Date: Sun, 02 Jul 2023 07:49:24 +0000 Message-ID: <871qhq69dn.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688284233; 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=njrCrvcql1oEid6drboGll1DLLnXLZdOAwiA73GkjbM=; b=m14BOUvS+gkGBVr0rIr9fg+qX+B+Hyezg/ob0FbVkz4/mOBzp2JfcrusKHncIsgG8EFXX+ 1w2uWUKBDACAWP85ulBEod0rUKGUOAEc7EwKDSL0euF/lfvbEk7YZhwKfK2YmAFHFLRxqQ ySgT3+1SLmjO6J0ALmBs0MslLwBApEESyzju8PZuJXD9uNgin+PgZvFqgQSMCSb/X5Bqcx TmcXDeUOdoY3hsDNl9Q5iratwV1xNUB1AObYG8kD2eQYCcBv9HUuuyuGLJSEzhat8inEuB QQfezw+mF3FLzmmXl+mgWM7I8sdbiv1IomHVp7J7lPR+HIZKEA8OsqXNpdmNPw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PITlE3di; 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=1688284233; a=rsa-sha256; cv=none; b=HKH2WZJyeCQrglJrvBXs5KwHI8kgUTExexLD1EUoL45aSqI69LBv0f42VFute5vhWevzIL CHghq/pq90u1JwTYrFrddzc7Po0p2VAlY2x6mKY2QOpjN1J59l+GuTNnJPIfTgdTnsuWgN 2KvQCAFVoe5aNfA0C7twTDx3KJK7sJjV0qOpq9KUeBwuvgC/J2DgI/goUDhnuHfBqfRrcl i4MNumycaPgmwrxfdVEwhdSXQE7SwKuqDiD5OjtFAMxR2HSbLZX/+CCGgzn64zXpjX0c3L AbUJoAq7bOFOmQhE0z/ZTXlD0zIb3s38visNzOG5GBvyTS0ffMO6qQ+WKxnUiA== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.73 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PITlE3di; 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" X-Migadu-Queue-Id: 62CE539375 X-Spam-Score: -4.73 X-TUID: s5nFbPVJtlrC Max Nikulin writes: > When some heading has the CUSTOM_ID property > > ---- 8< ---- > * title > :PROPERTIES: > :CUSTOM_ID: a-heading > :END: > ---- >8 ---- > > M-x org-store-link adds 2 entries: > - [[*title][title]] > - [[#a-heading][title]] > > however `org-insert-link' (C-c C-l) removes from the stored link only > one of them. As a result the number of unused stored links increases > during an Emacs session. Confirmed. Not Urgent. > My expectation is that > - either `org-store-links' adds a single option (my preference is > #custom_id) That could be a defcustom, maybe. > - or `org-insert-link' removes the whole group. > I have no idea how to implement second variant keeping backward > compatibility. We can, for example, group the links into sub-lists in org-stored-links. Or maintain a separate helper register that will keep track of the links to be removed together. That said, removing multiple lines by `org-insert-link' will most likely be unexpected for some users. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at