From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id lyUYIew7qmBBTAAAgWs5BA (envelope-from ) for ; Sun, 23 May 2021 13:26:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sMA7HOw7qmCwMQAA1q6Kng (envelope-from ) for ; Sun, 23 May 2021 11:26:36 +0000 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 B2F69C1D8 for ; Sun, 23 May 2021 13:26:35 +0200 (CEST) Received: from localhost ([::1]:39264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkmFd-0006GZ-BO for larch@yhetil.org; Sun, 23 May 2021 07:26:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkmEu-0006EI-Op for emacs-orgmode@gnu.org; Sun, 23 May 2021 07:25:49 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkmEs-0002ff-Fz for emacs-orgmode@gnu.org; Sun, 23 May 2021 07:25:48 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2654F2400FD for ; Sun, 23 May 2021 13:25:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1621769143; bh=nVVQXPgU3VowO2KQ93acRHbcE80qq/dZ5tsD5S5PsZE=; h=From:To:Cc:Subject:Date:From; b=oYunYIibFcWTvHUbtahJZcalMYUnJQY8lIwKOhRjzCZ2IQxG/F+mP6SrDM/Z4SFic 9mo70Efxn4wMmfZNNNdLllw4tbv1gMxtDgGE7IVnpOR+pcerSG0FC/EYtmrHr9ffSX jDYPyb3Rf806tmxMErWA2Y/rhfGJuCm3w/NtRuNaebXQU/79NyynR4cBptDwvrYzlp DIl+ZHpQPlNHGSYEr+vY+zhUUElOMaIgd48rpWCdQtegU85AeF0Mki5TaSbC+xSRRc EzpoOkvDazeIyNsYzpf2OFiEOAU1Rzeu0N3IrL8EwfkDU7ESM4JLH1ylrBmdnQFojk uBnQ3EVrK0+Ww== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Fnyh60KSZz6tm5; Sun, 23 May 2021 13:25:41 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Subject: Re: [PATCH] org.el: use only link descriptions in indirect buffer names References: <875yzac0xf.fsf@posteo.net> <87lf85u3yt.fsf@localhost> Date: Sun, 23 May 2021 11:25:40 +0000 In-Reply-To: <87lf85u3yt.fsf@localhost> (Ihor Radchenko's message of "Sun, 23 May 2021 18:41:46 +0800") Message-ID: <87im3966a3.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621769196; 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=Db7W8kitsakJWNohX/0nFwNQKn2JVwiSwCP4FUmOEFc=; b=ZF8kMTw3w9W/ijO3DRgQ86u5Grfh25M4EFXnJHIBrY6BwQvfnyeHuAlkcABhHuNOiQpJrX JsBmWjio5eP/A1eZGxLd+azPUhBoGEgW7VXIyT6t476FoxLvtOS48cYaXHKTHLXVXWq57x YS4VCC1eE0WPtQ3utzhcZ4e1/Ukqyf30CjssobZwpgIaEmIMn7k5oUDo/ugB/pIBKGfHPK pGs6g7SMR3ZRarPBe6SKFJZpNumbotIERha47jPj7t/5I+oEO5BLn9FXCQ26F4SvL5i1Mn Aje5X/QqQ1o1jXGL6FIzf2Fr6ImcHoRrSNjxZ2L7QlM2FXxn7nenWJMKktKZjg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621769196; a=rsa-sha256; cv=none; b=gd5E0j3/AKhI3x0BBMDCxDz5pI9HSV4+VS+NnAOhWiWLe6un974elToiwAgpm6srrc/E/q Jr6ORgbZ0n840FFhJ4bH25HvLjmM/KhKi7HESlBgj8C3xtS6yM8f3mTrwTrZRahONFaG9Y QpNfRVk+uM9fszhadvmltZP7uYHtQ7t13sJyAwaH/y7TKJUu5IO0YieakGL2n9YKkaAwvV gMI4pgFLTfzH1RfuLgW0pmePIAM9FT8try7TS180hXd3uBoO3wbJa72P03X9Xl7iRON4sZ oFW5i62LCMvatLXRJycHg5rlbaV85hEkGo6RsRs/0rC2XCUCVi5F7MRVpc4rEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=oYunYIib; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=oYunYIib; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: B2F69C1D8 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: R3TsIIPBlmHb --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > You can simply do (org-link-display-format (org-get-heading 'no-tags)) > > Best, > Ihor Oh!! I see that with my code I just reinvented the wheel :-D: --- org-link-display-format is a compiled Lisp function in =E2=80=98ol.el=E2=80= =99. (org-link-display-format S) Replace links in string S with their description. If there is no description, use the link target. --- Thank you very much for the suggestion, Ihor! (new patch attached) Best regards, Juan Manuel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-el-use-only-link-descriptions-in-indirect-buffer.patch >From b859f45abaa94e546e625b7b8c9f47ed64d6b4b4 Mon Sep 17 00:00:00 2001 From: Juan Manuel Macias Date: Sat, 22 May 2021 15:33:15 +0200 Subject: [PATCH] org.el: use only link descriptions in indirect buffer names * lisp/org.el (org-tree-to-indirect-buffer): If the variable `heading' contains a link with a description, it is replaced by the description string. --- lisp/org.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 1bd9e02eb..ca87cac67 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6895,8 +6895,7 @@ frame is not changed." (while (> (setq level (org-outline-level)) arg) (org-up-heading-safe))) (setq beg (point) - heading (org-get-heading 'no-tags)) + heading (org-link-display-format (org-get-heading 'no-tags))) (org-end-of-subtree t t) (when (org-at-heading-p) (backward-char 1)) (setq end (point))) -- 2.26.0 --=-=-=--