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 uEOVMtKZMWPOAwEAbAwnHQ (envelope-from ) for ; Mon, 26 Sep 2022 14:23:46 +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 yL2cMtKZMWM+cAAA9RJhRA (envelope-from ) for ; Mon, 26 Sep 2022 14:23:46 +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 7E7BC35AA9 for ; Mon, 26 Sep 2022 14:23:46 +0200 (CEST) Received: from localhost ([::1]:36324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocn9F-0002Aw-Ip for larch@yhetil.org; Mon, 26 Sep 2022 08:23:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocmxR-00052I-PO for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 08:11:33 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:33747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocmxQ-0008WA-0W for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 08:11:33 -0400 Received: by mail-pg1-x52e.google.com with SMTP id f193so6419640pgc.0 for ; Mon, 26 Sep 2022 05:11:31 -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=wM9TbC9EDv/OsKv/D4SA77gEcqPytx3KMgcrJmTs9os=; b=QLNb1KtIDPb5X3KpGX9pTcVWdh5xx7CdCOTWHqKTIGJ/kms/jsaQQfw2Pca1qLe+js I/UGw3ELGEBUxFQm3OL8is07QszvLZBuCFW69/Lx7Bizb8sdzLTXJ65ilBHSFapAJT8g rWA4/apwa1Ch00K44h6guFnAhiDsxYcfp3yksIs/Xq4BcKFPULKdSFPebU7GZ4u3b0j9 ikDjrktD7jSHIQJEWTMp5zU3Ldql0xp9hFpq0aZr9AQ3UATVhFX4TUEqSWo305unFwp/ NKzYFiSXhkZ+r61U0COAXmrpf79DQ5/uNO3MO33Rex7itXoY3T4eMqxue6z2lS+Gzslh Q72A== 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=wM9TbC9EDv/OsKv/D4SA77gEcqPytx3KMgcrJmTs9os=; b=WcV3XBQYwlDoHdwBXLoyf4VTY2dgtBHzTZcaa7Oa3xE1ib7U3JiqvIqoVYs8QQ+Gak 0arZsaMUSvfga7Nw+cqDxZTgs+wEkZJHxVQ5sebjq8QkNZXM1XQSA/cGr9egRk9I1Dpn zc9BiauSN6Z0JcLe0M5OeQ61GiY+ErNX1NUe17+Wz8HDwmyDUzu002gKRMz+zFv1WvLQ xWnSBLMCP4TXk98eW7lfsEVP7Tu8cD/rafAdYIG+N/VN+qJkU38GTZ59k5C5K59hpS2V unpGtALYAIWDSEGEHgo0skoENYTrcIFAC+EmvWlTaqM3Ek3x+e1wfVyTkxHJduMqGA1P IXiQ== X-Gm-Message-State: ACrzQf1U8+kDMKOvYRyEzmpYDV4RY4+UZ8+lVzdRwdVNJler/DK1kitF RI2U275D4AG4rx2IGMA4sBg= X-Google-Smtp-Source: AMsMyM6LwvThM1/rbR2TO+mtdQUDXCJqDbMoV0wusCjCCG7W8jV2ocicHEIForSV3WXRKT6x5aESqg== X-Received: by 2002:a63:4507:0:b0:43c:9cf4:f1d6 with SMTP id s7-20020a634507000000b0043c9cf4f1d6mr7872663pga.316.1664194290430; Mon, 26 Sep 2022 05:11:30 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id u9-20020a1709026e0900b00176953f7997sm8953339plk.158.2022.09.26.05.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 05:11:28 -0700 (PDT) From: Ihor Radchenko To: Magnus Therning 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/)] In-Reply-To: <878rm7s61r.fsf@therning.org> References: <878rm7s61r.fsf@therning.org> Date: Mon, 26 Sep 2022 20:12:15 +0800 Message-ID: <87k05qjpwg.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52e.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-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=1664195026; 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=wM9TbC9EDv/OsKv/D4SA77gEcqPytx3KMgcrJmTs9os=; b=DbhmKNlNo5VTb/f4Yx66EmwWHMxvEOgatY40WZnVNaJSkLDyXw95K9UlYkECOKhWcoNRNn fcEWlybrgSU3DESm1PeEh+ihpSXTQ5UDII4NvaK3M9YV2B9fr4TC7nHHFpUyFR0z53Ej9b Kacy1aaLbMhpf8Rn0Baf9oxy26gWEgjJc1VkeSgp1eotzNi2hg3w5NqhIwLrEoZ2Ix1PNG S8rFNIS0RBz7U5uyPWP4Q2PuR/3rb88fl+cODXhB7ra9O8c1YbeljwGYKnuNmthldkcE0+ ffRP06MWEo1dnnUTRB+UOK1lzdv+i2ZRXSwudDipGXlFcR7KibJd7km3yS+FxA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664195026; a=rsa-sha256; cv=none; b=iNqKF5JthRDR5OKfdVQRHy0rlW/2+N0FkxgKn/5hngrXG/RRIgKArBnJvLVixQsGV2ozAZ T/O5g339Q56xmbO0HEbYzHeiFUwKOwQb4A4NtjqysPGEkRhbvHqhVDbnn/29/rdDTFFKg/ xYId/WNruNGqkBlYnPC9BvEr7hx9RJHVpzl70gTigd68GW/GooyfG0h0xaQtEXFL1DYjeV u5jsl8vbGqw72jdfR6ZgK95P8QEl1ePuZqnCrdhLS1uurFUA/tvYz7v+/8ZZsG8rGLo+vy L6Dt3MDIL9E2ZyuBs7byHRYwSMaFBqV8dlEiEWg5sytch0C0W4AX5KlVzF9rLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QLNb1KtI; 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: -1.84 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QLNb1KtI; 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: 7E7BC35AA9 X-Spam-Score: -1.84 X-Migadu-Scanner: scn1.migadu.com X-TUID: lDiRY8s0iX6j 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. > > For some more info look at > https://www.reddit.com/r/orgmode/comments/xmvtsy/orgcreatefilesearchfunctions_and_description/ Thanks for reporting! Confirmed. This is a regression after we switched to lexical binding, and 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 to create a top-level defvar in ol.el, which is not nice since `description' variable name is a bad name to define. Interestingly, this issue has not been noticed for a long time 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 unintuitive global variables. WDYT? -- 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