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 kP9tLzJTMmNmdAAAbAwnHQ (envelope-from ) for ; Tue, 27 Sep 2022 03:34: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 S1BzLzJTMmOThwAAauVa8A (envelope-from ) for ; Tue, 27 Sep 2022 03:34: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 7B4E1175E6 for ; Tue, 27 Sep 2022 03:34:42 +0200 (CEST) Received: from localhost ([::1]:33202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oczUf-0007sk-JW for larch@yhetil.org; Mon, 26 Sep 2022 21:34:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oczUG-0007sb-Qn for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 21:34:16 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:35808) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oczUF-0004ba-43 for emacs-orgmode@gnu.org; Mon, 26 Sep 2022 21:34:16 -0400 Received: by mail-pl1-x636.google.com with SMTP id t3so7810736ply.2 for ; Mon, 26 Sep 2022 18:34:14 -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=c7aX0JqD6LGtjZN5atkTHww98pNKx8MrMDBpw/UmxhY=; b=pv3IQqWOqtncR/g59IHBV9e06KCnhbab8W+00DWTqN+jL2pVxrXqhH3CKZ8TtMV1nQ kmsG4lwJxkMwaOqlGf97Exb5cvpkmdr2kVeTzMn5GvPcltj2i9mzDIWcqibMhIx0o/DI +wRz3Xi3cvZUcrvQkzTEv7huCu5UDnYrYdHk7RJ1sVZc9eBOBCQbMt7DC5Q4ZaEtm8u9 zRJexPsweT3CyVIHSbrDmFmM8fpdRK6oU3q+HhdMl98dKQpX3ru192nrUAOiqRprSvBa pt+N6qEuzK/79g1oLTUccJ3qYBItKfZGSu7968wJIAYRW8CnjaLQRVAjJI7HBC+AAfgg 5wyQ== 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=c7aX0JqD6LGtjZN5atkTHww98pNKx8MrMDBpw/UmxhY=; b=bk0eYeKw4iMy++lAw/RewURm4HoXwnjG7/on/w4Xw4tdRzsterF9DJ86H1qtFsPnKq vi6F8/+csCO3ZO5shalTv8jErmKCtnQo4XiwVnBOcYNjTrDCLRTPuD0cgTBE/WkIrqcd BhhybDuLODdSxiww/K93vBqW9jOW9GdilL5hupJasUPJ146OGRY96Yazjlm0P/X1h+we IIRaiygPUUeb0UTfkCyRL6MZK9ZH8JtJNq3bJYxfjfhCqnRl8igop+bVJ6lfyp2fSTCL jR8Mp7zO5FpTRqv2ZR8N/KFXmNoQwQAuQU4U+TADKTuViAGiEvwwy35iAxfgSJ2gyyzq CIcw== X-Gm-Message-State: ACrzQf1I8LtUeeQNbYEFO8OAd2mBSqjA8mex2HtNmRk34X3Y/KMJdeaI 7vg8FOtLCk122W9x8jSz/v0= X-Google-Smtp-Source: AMsMyM7aF8NnnDKJ/00b8DjYvk0H5qBxX/4H2YrnWSF/as45kpX/o0LudOjXsW54XZiX6wnn2MJ4IQ== X-Received: by 2002:a17:90b:3e89:b0:202:ab9f:6ee5 with SMTP id rj9-20020a17090b3e8900b00202ab9f6ee5mr1775991pjb.112.1664242453518; Mon, 26 Sep 2022 18:34:13 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id ik12-20020a170902ab0c00b0017515e598c5sm116467plb.40.2022.09.26.18.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 18:34:12 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: Magnus Therning , 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: References: <878rm7s61r.fsf@therning.org> <87k05qjpwg.fsf@localhost> Date: Tue, 27 Sep 2022 09:35:06 +0800 Message-ID: <87wn9pppkl.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=yantar92@gmail.com; helo=mail-pl1-x636.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=1664242482; 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=c7aX0JqD6LGtjZN5atkTHww98pNKx8MrMDBpw/UmxhY=; b=Rx7JIv7aC97Wgl18Z2gaxr2+Hpt36uXgJ97F+3ha9d8a0XvPEQESUAdWMBViveqbhQjll5 7+iY3mbYs+I3lOs4FpN6g8yZN56nPyj7bewzbQX0W8h2iYPo3JaToo+r/OVKaDMPJFtiEy otoP0dzoloHXCmF/Wy5h11lYBx/hvknsoHLx+Ny9qCRNG/b9UNwg0/+HhX/lg9USrYTMbK dBBtTgJqcmidy7Pq+1G3NLK3rXYpXq8xGFp0D0hk1bLJ/MBKrxJpnm1xvQu7pzlbn0gmqW TevHCCzrAl9g14fP5JdolJD1cN/hHXeeu/7A9tDd7zLBr/KQmvPZdXhmFKbayw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664242482; a=rsa-sha256; cv=none; b=Kc1pz7Tl/QwW6v9hCgSxWIUynOpUn4CTHkt53bMHdWnVm546fXyK/6gPRc0xALwlz9VY1h O3P1ZYvGCWfTCGqQVnniXC0sC9uLvsIXmOK1ukKlpDuncPtTiKLU2+TORGCQCrVUUxW4Wj gZSzvo7xifyJ/bToYI5R6UobzDrJWW6OBTru4mtOrAjYzDUIYgAqiyVomfMVTnx8Kz3bJm eBSs2uuq+O1KompkbNcT9BnUeyNf94r39ZtDgaw/NBu+/ltDtz7zoU5X0xhPdwsB2XjTQ7 YVlw0zBprhJIecFwgQCGwJgmX1VuE8MSEaX+LbvSf5DVg/SfoTEFzmWk0xRKGw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pv3IQqWO; 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.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pv3IQqWO; 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: 7B4E1175E6 X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: diGPK3hiFWOi Max Nikulin writes: >> 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. This makes sense. Instead of making `org-create-file-search-functions' return a cons cell, we can use the same scheme as in `org-store-link-functions' where the functions can call `org-link-store-props' inside to set e.g. the description. -- 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