From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 6OOYGELMMWNHygAAbAwnHQ (envelope-from ) for ; Mon, 26 Sep 2022 17:58:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mG2gGELMMWMD/QAA9RJhRA (envelope-from ) for ; Mon, 26 Sep 2022 17:58:58 +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 E3FC53D4A6 for ; Mon, 26 Sep 2022 17:58:57 +0200 (CEST) Received: from localhost ([::1]:38576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocqVU-0000Sj-VQ for larch@yhetil.org; Mon, 26 Sep 2022 11:58:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocpnU-0005z5-PR for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 11:13:31 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:46762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocpnS-0003CU-Vm for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 11:13:28 -0400 Received: by mail-lj1-x230.google.com with SMTP id p5so7769803ljc.13 for ; Mon, 26 Sep 2022 08:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date; bh=vZBou8gEkL3Xd82vNtxouLDiC6a1drl9ux+ikUg/hUQ=; b=YHEbgXpLumu9O01pjno9q5gKyfts2nnTY4hBCwwgI7WEMQtDH1xvNCdW/h2x5K5PEU 3M52FesZPkLph/bQZyDdcYqcymJ4kIrprSnKasvjFNoWrBqbnsYhzgQ/Lqyfbog/aRpT PGLIy9lo+OkWtqZafIETvLsp1m6emv+iTlaQnVS4zt1wREspliyWqcMbWlNMj+asmOQO M5dz/5P01iGfgYPPHqAiAgiNXEJ1tenkzoFJ/Of4S3kUQAMVY8n96v2oWipObELstE/t tHC/JcF6FZuKNd0pPpg8xJCC+/8E5ICgpuKWGPihskh23UxHvbVwEwpGtAzReXt6hkxd 3O3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date; bh=vZBou8gEkL3Xd82vNtxouLDiC6a1drl9ux+ikUg/hUQ=; b=ebpaxTxOWHSDeOnF2OeuyZtGHT5zLXvlWgGc2xZoqU8lrXNtWd709lcqIN4l2Lm1cQ GTDn03nToC+V3ZG4vr4Sh2QKidYPTksCwcM+36boLy8wM1vlxvjyX7WFd/3Am76rl36h 4Sq/xa2w6Yvtjaz9jMbbc7Z/hQoFqfrpAznd9GkqiAHlA3P4Yj6PXqi9lE2N8fWPI0Ub Ing4QZwyo/CXBaCorpiqBDTEN963DojYryyg4iVBPfE/uuSx8HxmDN29+kdvB+0Kix7y rXqBnzpkoKz34+m7MNK/KCrcnwubGUyr4rm9xCWeJ0DvrvK7f846YKNjRivgPf43IBda SsjA== X-Gm-Message-State: ACrzQf2BHg60IiSbIEnZ7DqTi+WOxNvHd06+mIHXPokClSQeUxP694Ao x8Hsq29WZCMlyTnXXZUA4iWnsExGONpbyQ== X-Google-Smtp-Source: AMsMyM78qOxZOufKOa8hjG4y97TDqV00ZWEgow7AHg1RzoKIgGxNE/PAhsO2VG0G83IaC+j0+/odKw== X-Received: by 2002:a2e:a884:0:b0:25d:d8a2:d18c with SMTP id m4-20020a2ea884000000b0025dd8a2d18cmr7299988ljq.305.1664205204315; Mon, 26 Sep 2022 08:13:24 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id n5-20020a05651203e500b004948b667d95sm2554897lfq.265.2022.09.26.08.13.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Sep 2022 08:13:18 -0700 (PDT) Message-ID: Date: Mon, 26 Sep 2022 22:13:16 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [BUG] org-create-file-search-functions and description [9.5.5 (release_9.5.5 @ /usr/share/emacs/29.0.50/lisp/org/)] Content-Language: en-US To: Ihor Radchenko , Magnus Therning Cc: emacs-orgmode@gnu.org References: <878rm7s61r.fsf@therning.org> <87k05qjpwg.fsf@localhost> From: Max Nikulin In-Reply-To: <87k05qjpwg.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=manikulin@gmail.com; helo=mail-lj1-x230.google.com 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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-2.319, 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-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=1664207937; 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=vZBou8gEkL3Xd82vNtxouLDiC6a1drl9ux+ikUg/hUQ=; b=HEx05TUG9IaFrqf5RHODfJxFZE6rkiE8VHxtE7ewCounEjn8OIqn1w4WYnRie1id0Pr4P5 79Eir1lMOvrymBYpVnLP94jEMlBFpe5JX4fQGQVAKkieBq0s1DE35zVox+77lebd9jAb7S MMM6U439J2j6FmdayJnas+sfWTNEOb7F01M6KUjm1nfIVFQTH4Cd0ZwqkicJ3vrNDTjCXe C98QnIg/hNKwrX5MjUeWxIeJIqNXsPdFgkjGoXTJUzcUWjbaE36RtFpm/4JrwjH5Gd+zGx OXAKQINrZTh7+7jDdxi55Bg2RrgOu3RpD4m8BnC1u8kvVCYzhpvsK4GeC6v6rg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664207937; a=rsa-sha256; cv=none; b=BBLrF4vc7GXxVkiiarLO8F2Sp7uJYiq4CnydCh3UtVQZlHK6QdZr0PKIZ3xyjjhOsiHg3a DCJIRblm2PgP1O2fGEAGDOoL8MrN4QJ+fYxeyYKoTKMYWXVPchI7AvgXBKqbs3Pl/NTfT8 SM56XpdXKAgmesoKPstBWj05s2phzhlW5NalfMDZuSUp2uEAIeO/rU8C+wCpzqCtSKeoWO KrnuR5Nzz8LdYtAnEsVTwNRRYCvXF8U1Fmg2JQTf0mQ5xRQm/lr1SMUaeozQEDITL7K2jK rs8CX9zDvaWiuu4vgjiCnPjFTOFMGmljRmZm4vFTVkizjLSe/tRfFi4RxfFf3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=YHEbgXpL; dmarc=fail reason="SPF not aligned (relaxed)" 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: 7.85 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=YHEbgXpL; dmarc=fail reason="SPF not aligned (relaxed)" 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: E3FC53D4A6 X-Spam-Score: 7.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: FfZREurSPJ0O On 26/09/2022 19:12, Ihor Radchenko wrote: > Magnus Therning writes: > >> The documenation on org-create-file-search-functions contains this >> piece of text >> >> A function in this hook may also use setq to set the variable >> description to provide a suggestion for the descriptive text to >> be used for this link when it gets inserted into an Org buffer >> with org-insert-link. >> >> This doesn't seem to be true though. I really would love for there >> to be a way to influence the link description, but no matter what >> the documentation should be corrected. > > Thus, we may as well take this opportunity and allow > `org-create-file-search-functions' to return a cons cell > ("search term" . "description"). This will not require unintuitive > global variables. There is the `org-store-link-plist' variable used by :store functions from `org-link-parameters' but not by the `org-create-file-search-functions' hook. Maybe it is enough to add (setq desc (plist-get org-store-link-plist :description)) after calling of the hook. For a while, I hope, it is possible to create a workaround using (org-link-set-parameters "file" :store ...)