From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UCjhBaqdM2NcOwEAbAwnHQ (envelope-from ) for ; Wed, 28 Sep 2022 03:04:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WAnfBaqdM2O+VwEAauVa8A (envelope-from ) for ; Wed, 28 Sep 2022 03:04:42 +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 CFEA138683 for ; Wed, 28 Sep 2022 03:04:41 +0200 (CEST) Received: from localhost ([::1]:54700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odLVA-0004d2-8e for larch@yhetil.org; Tue, 27 Sep 2022 21:04:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odLTi-0004cs-KV for emacs-orgmode@gnu.org; Tue, 27 Sep 2022 21:03:10 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:35812) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odLTg-0001cO-Tl for emacs-orgmode@gnu.org; Tue, 27 Sep 2022 21:03:10 -0400 Received: by mail-pf1-x42d.google.com with SMTP id i6so6983027pfb.2 for ; Tue, 27 Sep 2022 18:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=zgmBBWZKS2yY/4VbKAvZktQlnSGA3fTfyLNltYFEHMU=; b=iALGe/ZP5k/TI4Z6s1HHn1QHM6saAA7QiZd3fiFEFbgoXUSl1iJpiGI0YINV9OJQX7 A9yajeu43YMurLK4hI1VswRLP45hlC0lVPF0g270HJqPUNCYugCOG5urc+aWt5ua/kJV gCJauvbr7saxQwwp9U+k17v3z6lU5CqsRthgsrkPJIV8Kv1ySWxoB1IVWz7/4aZ+9iCl 7+a7D0d28h1TJEg5ZCrFrqPTtIvHrqcmJYJmZ3GiH1tX1+pjX7R7sxMVUehkBJy2celr P3e0rwsncqOhpPSDaFX0hKy1NIcPLa3tp4OobcDP2QEOnyF9eDBrnC0YaYZlfpfZYiVd duCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=zgmBBWZKS2yY/4VbKAvZktQlnSGA3fTfyLNltYFEHMU=; b=Puc9OjRTEfWllLfCgb3x2CDcxFFUu59NrjIzc3RmAbpk1msddZcB/FLbv07OvJIIwG +BSRZ1Jmpy6JKmU3BYyzW9++FXk0e2q6bVkEiE/bpqrkesIws/KzDDWfBJsSbQgOFsjV luTg0Y+1XJOp2c5798hrurF+XcrsecnXh8nPA/2uPDTlOgoGkGRVOm+2785NlAm2KAwQ YLmxJNdWRjNGZ0hH+WPVfAkQeqj6vIFgKsrN/uTE//6lFoJMyERWyIeP/k4QrJcxjo+J 8X8CCGY4qy+nccUriyAzFtrd7+ld6YMEwSRu3x/AptZ2Hhgnm35SR87Jcgm2EZGXbz5n PK8Q== X-Gm-Message-State: ACrzQf2AZkVqsVchYWBYlSZFszC21Le9MD5Sqy+260AvAMIaY8N7UVBC LfmBp4AlNPWqSvfoI0BMNI0= X-Google-Smtp-Source: AMsMyM7gJNTh/d2o3LeYK+YK3TqO7p/UC+s+3ZMv345rGEciu++7ql0vF/i+54HVU0VU1myQp7dyQw== X-Received: by 2002:aa7:84c7:0:b0:551:eeaa:9f55 with SMTP id x7-20020aa784c7000000b00551eeaa9f55mr31945840pfn.15.1664326987432; Tue, 27 Sep 2022 18:03:07 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id c17-20020a170903235100b001732a019dddsm2225315plh.174.2022.09.27.18.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 18:03:06 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-store-link-functions advertizes that the first non-nil return value is used, but it is not how org-store-link handles it In-Reply-To: References: <878rm7s61r.fsf@therning.org> <87k05qjpwg.fsf@localhost> <87tu4tppb6.fsf@localhost> Date: Wed, 28 Sep 2022 09:03:59 +0800 Message-ID: <87bkr0gvi8.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664327081; 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=zgmBBWZKS2yY/4VbKAvZktQlnSGA3fTfyLNltYFEHMU=; b=PfWitXZS0ag8zV0uIN5u1HmYd4/33QPPgEMIKnpmkQC9LMN95wthNPI5CuFL48Z8JkoAVd 66iZIv6vP2k4f3JRrqy2sD2+A5cHfm2qfEXHof2sKmIVFtFXWrWb+VHV3ecyu0dv6cQ2KY rmtRV84MMElNgeksAlnU5QehLj+bmsNdQjaW01oRhCnBgHBDuHMtuIAYXpUR83t7FEIX0q 7eAdIxEgSlxqtaYbKy2LCnopTEb+8lVFT9CnVoseGLX5dyF36gE5lPdXKnne4l0S0munvH HIgxv3TfmJu40+KW+6BfMNjcSrUxwLVHAcUGvJR6hkYsmrQEsCD8cjaojkukjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664327081; a=rsa-sha256; cv=none; b=d78yRoFma32dfXVscuTEugNQPVGEgRL29XJomCjw/U+uBv12nyyxRD0yqFKLcxAGX1gEhP PXWQXhVzF+fCOKm42TSHxzUTynv0m/d9jInmLIp2s382X2tUFU/jIu5Fw/+p8CfiMzSFGo l4EXll8RDdcpq1MQe92r7eLjjkNrKdKJPtEXPpXdYQqzmUQNCuLYHaZOkCwhoToscvC6v7 +SipM9TWnwRxjqXyo2mC6qJOdNptJ4NAICqn4Sh6iZVSHASyFVSdALkqcKnPA8WTXa7Otk vQs2gwZKOi0fAoe2MYvVxgy92KQ0u5qdc/uCUKVxv9hi54r488znLQPl4gJnug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="iALGe/ZP"; dmarc=pass (policy=none) header.from=gmail.com; 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: -3.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="iALGe/ZP"; dmarc=pass (policy=none) header.from=gmail.com; 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: CFEA138683 X-Spam-Score: -3.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: xWrP/HVGoOG+ Max Nikulin writes: > There are more inconsistencies. For a heading in an Org file 2 links may > be created: title search and #custom_id. Only one link is removed by > `org-insert-link'. Only one of them is checked if it has been stored > earlier. Usually after several store+insert actions I have a list of > stored links that I will never use. I am unsure what is better, to > prompt user when link is saved, or store all options with some group ID > and remain other links when one item from the group is inserted. Would you mind reporting this and MWE in a new thread? It will be easier to track then. > I suppose, `org-store-link' should be split into smaller building blocks > to allow experiments with alternative implementations and strategies to > select from several variants. +1 -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92