From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qGHUMEDI+GK5WgEAbAwnHQ (envelope-from ) for ; Sun, 14 Aug 2022 12:02:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8KLcMEDI+GIusAAA9RJhRA (envelope-from ) for ; Sun, 14 Aug 2022 12:02:40 +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 958291C9A1 for ; Sun, 14 Aug 2022 12:02:40 +0200 (CEST) Received: from localhost ([::1]:50384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNAS7-0003C4-C6 for larch@yhetil.org; Sun, 14 Aug 2022 06:02:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNAPd-0003BM-RV for emacs-orgmode@gnu.org; Sun, 14 Aug 2022 06:00:05 -0400 Received: from ciao.gmane.io ([116.202.254.214]:38182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNAPc-0004qT-7X for emacs-orgmode@gnu.org; Sun, 14 Aug 2022 06:00:05 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1oNAPZ-0006AR-VO for emacs-orgmode@gnu.org; Sun, 14 Aug 2022 12:00:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Bug: org-store-link uses CUSTOM_ID instead of target point [9.4.4 (release_9.4.4 @ /usr/share/emacs/27.2/lisp/org/)] Date: Sun, 14 Aug 2022 16:58:04 +0700 Message-ID: References: <87im3wqbk6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660471360; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=z5LdRaYx9bL4QplvYaEPbup5eKmqcvkuE0peuF9MQOg=; b=Ehe2g/ugQsuCQpJdogmxGimO+byNHXpMUg3Lx8Gf1s73EgiccOtFJMEZgCx2q7mrTUVyei Q1bfTxJwb9/8YjUVgD6etHcHtYlMJqWfNmxx33evuB140QFDIrIiddgRaTnool1GQWW2X2 hc9c4ZC45X7NqCGiSGkYfMHThkiTbyUcHpWsJwEwh8quzHaUq1div4A/ZP/ikfcfuvBllP g/YIL0Dt8dUaMP/OulWPBDDMqqPMe2HN2uMDAkgUks6RKGo1mWFzsK4I6tWtKDWAvx65u+ EosX+a4kRUrizWQSUqbUfx7KO4fhejN7wtPYO0bfhcZClwHvj5ETRzoag4SSig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660471360; a=rsa-sha256; cv=none; b=lM1f11I6rCaQMy/xHYbdrYT6DkwvbtdSftsnkzw99wjvVxTgckjYm4F0abjYeuQhU8YoEc rPRYI1DkgSirAgAq1nOV7L4nxFiX+0VUTAf+1evso9nTlYva73LPkr/klL9wnEYQZW61TR C67+CoQUHxg0+7kDHsRA/C/QR2memuDSqWSM8Oslrl7UWRRZP9naObNlsrbR2ql39qNGeg Fet27WR6JUoFj8AyZ6o/2NxVITPJxQ6Lo46NnGaVI7ZMlsoBUZwIDe4upQ6N05i+3NEhNY 7FMdQF93ZIr9rZt6N07Skxiyh1IXUX1mRrtu/vH2FQRWn6wD9UuJh/ncHy3g5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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-Spam-Score: 2.24 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 958291C9A1 X-Spam-Score: 2.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: uxU/15wl5OQ4 On 06/11/2021 19:51, Max Nikulin wrote: > On 06/05/2021 19:41, Bastien wrote: >> Fr Ml writes: >> >>> I have a problem with the function org-store-link it doesn't work as >>> described in the documentation: >>> https://orgmode.org/manual/Handling-Links.html >>> "For Org files, if there is a '<>' at point, the link points >>> to >>> the target." >> >> Fixed in maint, thanks a lot for reporting this and Ihor for >> confirming the bug. Another issue likely caused by this change: Carlos Pita to emacs-orgmode. Adding target and custom id links doesn't ask for description. Tue, 2 Aug 2022 14:44:58 -0300. https://list.orgmode.org/D99A712C-18D1-4A4F-8093-35A0BFB469C4@gmail.com > Bastien, unfortunately your fix caused duplication of stored links like > "file:~/org/file.org::#custom_id" when point is outside of <>. > Earlier #CUSTOM_ID link was stored in addition to > "file:~/org/file.org::*Heading" search link. My suggestion is to revert > your patch and to just reset custom-id variable when <> link is > stored. Another effect or your patch, that I consider unintentional, is > storing > [[file:~/org/file.org::#custom_id][file:~/org/file.org::#custom_id]] > instead of [[file:~/org/file.org::#custom_id][Heading]]. I prefer > "original" behavior. > > Third patch is intended to avoid links inserted as > [[target][file:~/org/file.org::target]] in the case of same file. I > suppose, just [[target]] is better. Current variant looks unbalanced and > misleading. Of course, you are free to skip last patch. > > I am confused by `org-insert-link' behavior. It inserts links like > [[file:~/org/file.org::#custom_id][file:~/org/file.org::#custom_id]] > without user prompt for description but > [[file:~/org/file.org::#custom_id][Heading]] requires to confirm > "Heading" description explicitly. I would expect that "raw" link is > subject to ask user for more friendly option. >