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 gCpgNm6cMWN4UgAAbAwnHQ (envelope-from ) for ; Mon, 26 Sep 2022 14:34:54 +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 eLRlNm6cMWMWyQAA9RJhRA (envelope-from ) for ; Mon, 26 Sep 2022 14:34:54 +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 2888B1B0F9 for ; Mon, 26 Sep 2022 14:34:54 +0200 (CEST) Received: from localhost ([::1]:37354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocnJz-0005eI-6E for larch@yhetil.org; Mon, 26 Sep 2022 08:34:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocn6D-0002h9-Or for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 08:20:52 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:34381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocn6A-0001aM-2P for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 08:20:36 -0400 Received: by mail-lj1-x231.google.com with SMTP id h3so7253750lja.1 for ; Mon, 26 Sep 2022 05:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=therning-org.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date; bh=pjGS8VRLY5zmEZRHt7eGZqSdUwo9XDmumxVEFt/9uHs=; b=QfmCY8H/0ivPzyexkzBP0bR0zBfHUAbl34hXYvF2+srbB0z/HY3KWK7N31ol9pKtw7 B5noA0L7/hsArMQBI3PyVjR4O/SI2ihZF8/odAnOW1ndJuTrdHrgMz6v53xOZ7j+PGgt YXxn+Gi0NPoiOZa+5UHIacI04UPiU+dmH2h30eGrXDDJGmnEtdQtl42fdNQLSKEJgsvy c0Xs+pyApQMTUarsMrN5fy9taLzfiy1PAq22K5TlBf2pw0hYe9bBC2Ncmj0CidxqjAYm 8o870qYsZq9r9EdQYTj1vNKgl2fzXP2IaF7PEJe26rIfETxyX5odsOEE7E2vSqm7kgB0 Amhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date; bh=pjGS8VRLY5zmEZRHt7eGZqSdUwo9XDmumxVEFt/9uHs=; b=MhMQ2unXIvz8m//MltExcKZur9xRw+NyB7BHZJN8r+6lVkMcLu2TLqVglhXtHZt4DS 1pd/F95lJecqcnHpxawK5o5IrGcKXgvMkAtlRAX2ff7wphqALs5TjH/NGTgoCh8n98/z 9iQTGJBCp1SNN6xCfxSX59AjJFuqSNeTvlAkgp1fPS0p0f3jWyey2A1ewRrYzq6o4yh1 052j0FYGDGaUYObvRXULbGGIuIiVydedL+mYNOF1PgE7m0pEFGpT/H9gVTM0TMm0bkln L7NaZa+iTFCc1SFA3EbS7G8gnmo49cyapWk5gTrM/pd1f5uuV+dKmdaiMi4dblsWyp8S Bv+A== X-Gm-Message-State: ACrzQf3YrRglZ9GwOA/FWvGrkqBAdGZXWoqMQVBFqgX38afBDj/4VLgU FboQ3WcKFfzB+gnTHhobOkpDfiKT+jaZgcTC X-Google-Smtp-Source: AMsMyM46h3Mj7cMOm6MzSQ7hBTg5JD7OFrzXCSHUV1fn0OfTXbMDF6gy0/88uxcA8EVvK3ww7PlSDQ== X-Received: by 2002:a05:651c:11cc:b0:26c:14c5:5b8f with SMTP id z12-20020a05651c11cc00b0026c14c55b8fmr7750220ljo.450.1664194832121; Mon, 26 Sep 2022 05:20:32 -0700 (PDT) Received: from marlinspike ([146.247.181.98]) by smtp.gmail.com with ESMTPSA id u17-20020a05651220d100b00497abfd49fbsm2513402lfr.249.2022.09.26.05.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 05:20:31 -0700 (PDT) References: <878rm7s61r.fsf@therning.org> <87k05qjpwg.fsf@localhost> User-agent: mu4e 1.8.9; emacs 29.0.50 From: Magnus Therning To: Ihor Radchenko Cc: emacs-orgmode@gnu.org 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/)] Date: Mon, 26 Sep 2022 14:15:47 +0200 In-reply-to: <87k05qjpwg.fsf@localhost> Message-ID: <871qryba4z.fsf@therning.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=2a00:1450:4864:20::231; envelope-from=magnus@therning.org; helo=mail-lj1-x231.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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=1664195694; 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=pjGS8VRLY5zmEZRHt7eGZqSdUwo9XDmumxVEFt/9uHs=; b=FMlSLDd/oC0xSy6a2HWzq7PhC1YOIxXBWhdLkEw+Ve/GJ41vlXWG0UdlWEQDVWsd4thoxy htlBujN+gFQL9TPadS7G0jRUBYpIt3+w/o7/vrnll5CRToFIy51FSP+5l6X4Vm61rIJjK1 ZKl/KaBxzqWciQUzk+U91+f5a7UNuPJKiJbiWGYL62sxvYaTe1MT/Ot86QKFSGTL/Bqj2q gC3ZqtiX+dZ4AIyDfe6hJttL1RmgGEjONfDhm//y4PYs2jIEvN5dmQCGUNAZyxs/y863rx /Q2J1vXiZyxYy13CA4xLCA32fRI9hpfy8/ZKNMVAJMfRhWAmhv3EaUqWGfhFAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664195694; a=rsa-sha256; cv=none; b=pOy/gpW66VugzCYlfuWkr5XAoU6DJIXiId+iQEskgJPYxJU4zjCot6gyeJptka64j9ZZxu 5jCy93kqJoGptDRYPHIgwL4Y1bnscMY7YhGSknbwW2z1hK27aVVSEaWgL2R+SOUtGIUJZh IJFaUYU4PAMpxUvxdcUE3wkAc82XB/QWfiTeRvSy70+s8HWOLaegr+udVCKG6IUSySWwQD fB8sXD9tVL46dFTbt9ah8SXw45c8WiU1B0XZ+0nk5h0GHIJhZGoSDsCgx1f4IIWYWG3aOi Ni5KGC6p1/w3W2XXlyv9lBFWMib0bNE348YKqBjXSQ6lDwxP/DgDwTxOCmyeeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=therning-org.20210112.gappssmtp.com header.s=20210112 header.b="QfmCY8H/"; dmarc=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: -3.94 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=therning-org.20210112.gappssmtp.com header.s=20210112 header.b="QfmCY8H/"; dmarc=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: 2888B1B0F9 X-Spam-Score: -3.94 X-Migadu-Scanner: scn1.migadu.com X-TUID: Y2Xe4vFln1Ti --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > Magnus Therning writes: > >> The documenation on org-create-file-search-functions contains=20 >> 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=20 >> to >> be used for this link when it gets inserted into an Org=20 >> buffer >> with org-insert-link. >> >> This doesn't seem to be true though. I really would love for=20 >> there >> to be a way to influence the link description, but no matter=20 >> what >> the documentation should be corrected. >> >> For some more info look at >> https://www.reddit.com/r/orgmode/comments/xmvtsy/orgcreatefilesearchfunc= tions_and_description/ > > Thanks for reporting! > Confirmed. > > This is a regression after we switched to lexical binding, and=20 > after we > removed the apparently uninitialized `description' variable from > let-binding in `org-store-link'. > > a85b4cc5c64b1eb6b97f5d7843dd54eb0632ef91 > Author: Stefan Monnier > AuthorDate: Thu Mar 11 13:07:37 2021 -0500 > Commit: Kyle Meyer > CommitDate: Sun Mar 14 17:54:17 2021 -0400 > > Backport commit 7d0dc3183 from Emacs > > ... > * lisp/ol.el (org-store-link): > Remove always-nil variable `description`. > > In order to make things work now with lexical binding, we need=20 > to create > a top-level defvar in ol.el, which is not nice since=20 > `description' > variable name is a bad name to define. > > Interestingly, this issue has not been noticed for a long time=20 > and not > many users are probably making use of it. > > 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=20 > unintuitive > global variables. > > WDYT? I think returning a cons cell would be a very nice solution. /M =2D- Magnus Therning OpenPGP: 0x927912051716CE39 email: magnus@therning.org @magthe@mastodon.technology http://magnus.therning.org/ Never argue with stupid people, they will drag you down to their=20 level and then beat you with experience. =E2=80=95 Mark Twain --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEKwgezhW98spw4aSSknkSBRcWzjkFAmMxmOwUHG1hZ251c0B0 aGVybmluZy5vcmcACgkQknkSBRcWzjm8JQ/+NxEMK1HVxLdt7OGkUtFVRIM1JiKL 99S0epaAE3bz9K4xhWVao0csfY1oCydEPiIVg+VkICvDKoWeogEiBpxGp34xHnXL HUz8GT2sJCnqZRCDcKowTAvwP03Z5wcJIGzKjpiP7DdEkLu2JQlUKrHeIpbOZ+s2 b1PSExossALWbw2OgKeCf5xkmvKw35/bAZL8SUcnPUmSV/ZldhgADZLgHWXpqn72 VAaTTDeQfKM9TD2nCoOMuN6PBMBC5rpSpJteLU8jtK1/rYwvFTeoKCg5+4L+BezS I5RpSFODi+whQ+uOWrVWA5fo0Vo60lUAafl1VDp6INrXt/+f+rYBlaG4lPha+N+X wuJbez6vTkMErbJolm0wTk47hv9h1aU3gYLeTq3/wnIgWdI4JJExkwyiX8XXQGPZ KRl/7OIhkoZYrZc5FsdigXCmG4PVXJGoLRqxPrgUmn2hguZid4qFED3YJBVtqj7G cUqMT2UpZDjX30l+sujQqhAY3+Tfy2SSiugVof3Mzye9KSQ/yPTJ+wVSRgystnQm YAFMaV0o1w6nilPTNJktTLWfeb+JsRw+6POfp7hus+bDxzzePMlMxY4iQ7P9Rra/ HkyEpfGlcgdlNeU8msfYHqEe8CgopdMLDfLsWw9xP6anXB8XZdiEjN27nXxAvrCr sMwEkJCXKUOm/8U= =1Qo4 -----END PGP SIGNATURE----- --=-=-=--