From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AC/KHzwF0mTQ8gAASxT56A (envelope-from ) for ; Tue, 08 Aug 2023 11:05:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0IS9HzwF0mTedgAA9RJhRA (envelope-from ) for ; Tue, 08 Aug 2023 11:05:00 +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 D390E5930A for ; Tue, 8 Aug 2023 11:04:59 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gh3YUhPB; 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=1691485500; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=kiusKKxohEgEbIhJbmgXrA3/9ZNmYMRr1dYNf0twc4w=; b=ty5jk6AdT0k7n5CxQJeClVxjf+0BLNdcP0XjE9/p7cIGj9XmbKmEqxFFvKWyTHXPZ2ADpR VcjM8X4EhTwiD4ekTiZ85Tqcn4Uo/idFxTawG0cIdR4IJqCtrg+ecNVZrtV4p6yWT858zb pghradntKAgR6UZnn+exnQdqOv6bdArwViJmNlFoRnzdABYJnM3w3vd1eGA6NKQJeb139Y 20jJfL4YCbGeXxJtUD1mH+FLxxsM9Ycqruz6ga7Cxv7DJKiyK6d1wb4h6NBkG2+ZI3CnBw ++M92AyxJyBw+TcMFm1t0djUEyurO2yZkpbRCCSaI4p49Al8oqAis2OYWcSirQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691485500; a=rsa-sha256; cv=none; b=BXVcSFavu8Ly9iF8JpE/asY1JqZThdi3y63Wu5SK4dGvhWLTO0lRJLp2r7uvMVl0Lq6T2B f1xfhGekCZZRQF0NZIdWyKrG/8LkBYxZTCgT7WUyIEL1z+7eh6ktC/8bqWZ8cpuuRMQYE/ cs7ZYyznZzjkg1d36OyCpPzhb0wQrkFJVQOGVLHY5UzuOJrCNQfzyBV+43F3+qG38xnKoM Qqlso89Ygo/UEUbSu6E1xeR75YO9B3kMZP+MljLe+rFW9QLK5k7JoAPT3Inv8m+QsgojY1 cJtv9w4ZmP+hrKvkSiaV9Ul8RExXc+sF/M77/uumhMeytWc3WHdWsxkCTXdLQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gh3YUhPB; 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 localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTIdS-0000Qz-BK; Tue, 08 Aug 2023 05:04:14 -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 1qTIdP-0000Qj-HX for emacs-orgmode@gnu.org; Tue, 08 Aug 2023 05:04:11 -0400 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 1qTIdL-0001bU-E3 for emacs-orgmode@gnu.org; Tue, 08 Aug 2023 05:04:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 43D1E240103 for ; Tue, 8 Aug 2023 11:04:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1691485445; bh=fhi2JsykcA5roxrsDVjBwzSvE+myqrQE5jGFLhJccVE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=gh3YUhPBkaxM51eVByBBkTzkRQsbzSfyAMZj+uONmBOf32GwQzZWTu7RXgsqkxZO6 z1b4HCF9zRIIPs4jw3Lh9d5erz0yR/rFs/j/JdC410R1P6hUpunIcKoylVoI86ENUu DmxpgzpgilEK+PTPD8qYmnMrSKpeFShbCDMQblv1NnOqnF5em9zAK3d6ZausV/0fdO gJmfDIbYOUBAPvQxmDUniw3C6Bj+Ya1PethXhUUmwZSj0hp0EkuLp251LxX5WSgxFn PXwV3LLG66iSVjLr+eOwd09gg7YD1hcLFqBRA8Kuh7h0vq7UNL114Di55h9D68D7o0 QOiGKC1gtsQuQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RKnLD1xfNz6tsB; Tue, 8 Aug 2023 11:04:04 +0200 (CEST) From: Ihor Radchenko To: Bastien Cc: Anthony Carrico , emacs-orgmode@gnu.org Subject: Re: [PATCH] Re: what is the purpose of "This link has already been stored"? In-Reply-To: <874jlcovnw.fsf@gnu.org> References: <87ilb8vsns.fsf@localhost> <87mt0iwoii.fsf@localhost> <87h6qqwh23.fsf@localhost> <87fs62acea.fsf@localhost> <874jlcovnw.fsf@gnu.org> Date: Tue, 08 Aug 2023 09:04:33 +0000 Message-ID: <87leelrjku.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 autolearn=unavailable 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-Queue-Id: D390E5930A X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -5.35 X-Spam-Score: -5.35 X-TUID: aOr59F81iTJH Bastien writes: > Ihor Radchenko writes: > >> * lisp/ol.el (org-link-store-existing): New customization controlling >> how to deal with already stored links. >> (org-store-link): Respect the new customization, allowing duplicates >> to (1) be added anyway; (2) be ignored; (3) be moved to front of >> `org-stored-links'. The default is (3). >> * etc/ORG-NEWS (~org-store-link~ now moves an already stored link to >> front of the ~org-stored-links~): Document the breaking change. > > I'm not sure what is the real world use-case for allowing storing the > same link several times. Maybe one was provided, but I missed it. I added it mostly because it was easy to do. Also, I thought that one might do a sequence of M-x org-store-link as one is reading things in different buffers. Later, M-x org-insert-all-links would insert the stored links from history, even if reading involved back-and-forth switching of the same buffer. This is rather imaginary use case though. > I believe the new default behavior makes a lot of sense, thanks for > implementing this. > > I'm skeptical about the need for a new dedicated option, though. > > The current single universal prefix argument seems not that useful ("A > single `C-u' negates `org-context-in-file-links' for file links or > `org-gnus-prefer-web-links' for links to Usenet articles.") and we > could use it to force storing duplicates, which is more useful. This would be yet another breaking change... > Here is the suggested new behavior, also modifying other universal > prefix args: > > - M-x org-stored-links : don't store dups, move upfront if dup > - C-u M-x org-stored-links : force storing the link, even if dup > - [2 universal prefix arg] : negates =E2=80=98org-context-in-file-links= =E2=80=99, etc > - [3 universal prefix arg] : forces skipping storing functions > that are not part of Org core. > > The current behavior for 3 prefix args should be the default when the > region is active. > > WDYT? AFAIU, you suggest changing the meaning of C-u prefix argument and also remove the previous default behavior completely. As I said in the above, storing duplicates is rather imaginary case. I am not sure if it is strictly more useful compared to the current negation of `org-context-in-file-links'. For removing the previous default (do nothing when duplicate), Samuel previously expressed a concern: >>> if you move the recent one to top of list, that would work for my >>> mindless store/insert, but it might not work for a user who has >>> carefully cultivated a set of links that are all to be inserted, or >>> such. although idk if the mechanism supports. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at