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 CKD+EqPraGKOWwAAbAwnHQ (envelope-from ) for ; Wed, 27 Apr 2022 09:07:15 +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 IIgrE6PraGJy2gAA9RJhRA (envelope-from ) for ; Wed, 27 Apr 2022 09:07:15 +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 CC835D0DE for ; Wed, 27 Apr 2022 09:07:14 +0200 (CEST) Received: from localhost ([::1]:49878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njblZ-0006qi-HS for larch@yhetil.org; Wed, 27 Apr 2022 03:07:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njbiM-00060m-S8 for emacs-orgmode@gnu.org; Wed, 27 Apr 2022 03:03:55 -0400 Received: from mail-am6eur05olkn2092.outbound.protection.outlook.com ([40.92.91.92]:31456 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njbiK-0001XD-Qq for emacs-orgmode@gnu.org; Wed, 27 Apr 2022 03:03:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbZ95Kz69oCuG0oCRVNF8QOO30PhkHQ0c+I40tBE+PQvxgFvKmHFnhaD0xl6oMp9Kvx7Cvp2kcsHwfycd9z9bIFBLiDullHFNWJ/r9JE7AZ0WGA6xdR3PCipZgx8Q/xusYAgznk/8WOk7cRCxi7JrWcq89iath28dOuZQk5obqMWbdiLMt6cepcnJ+060hIYd12vPNjaUvKN+aWhRnvDJT0SUqy/AwDitjBN+7fkLqzgnKZc2RqpUF+wMGfZ3Al4dj+N75amAhPFUK4YwvJjLNERkptkgHLW8k21UjW/dcF3xmaQd91to9/xULceXEbeskxYuFTIo2Rq24KA5Uhneg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8/H+FNzt1IolNoP9iSsM17TFLKBiQ8/IqKUGqH5Qez0=; b=Z1juyJU8Ij8Y9R3Nq4hP3klBc6uPAUxNRQf7sshLWgNzYuyyjZHRVyMwX075ymwugAgXBY59nqG+ZMHSki6uVjCTqk7EO5lHO2OIDo8QI0n+r5ZvzLYzM/D5oaAf3gk0MK20xFhYlyVPUGPIay1YzbwztJQAgmH0Lo5TmxBi3MMA782Hed1AZb0Qpk93kT5ae6iZyacQSFmzjGSVChEKYkuDtd7Owgdopv9eS8w+GSN8dZc16S3ye30zCJuLooh5jtQU7A2Nf/JUbLnvMglnoC1xZVT0VDxD+nbJPm5B6cM8PHcwjECpfIs+m2qiEwSgF6i5pKqtJuGNV755HaPbIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8/H+FNzt1IolNoP9iSsM17TFLKBiQ8/IqKUGqH5Qez0=; b=B691Kz8EVaqTMTZGC53QqXyxyraMUJbyYiUZVYAUWwNGECNrZH2F6Vv8l29RsMoLv74KfDM/Ec8gedlrYGi2fqFejEkHuFIm1OJ1jkOfoAOFyZ2B+yweLXrdH/X1xrmd5uIlp/9P/vL/VLMuyUgy7cybwMkBDTzh+zG8CP3wVLOVqCr7CavF/0FmqKez+W8DukeJkqqcKD3LVeK/T9Afui0B4PGNxDPWlqwoeFCb6rUVxrXeIcFuIhCjK0BMydmW1TetHYdUkkfV6izA7qXy+mnkDVBie3tiOiRFnufHapPm7v3daQ7EsHUrHyHjIGD57fSxqgFL7aSNwkL1B6Fehw== Received: from PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) by DB7PR06MB5321.eurprd06.prod.outlook.com (2603:10a6:10:76::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.17; Wed, 27 Apr 2022 07:03:50 +0000 Received: from PAXPR06MB7760.eurprd06.prod.outlook.com ([fe80::3d50:522e:f03c:6225]) by PAXPR06MB7760.eurprd06.prod.outlook.com ([fe80::3d50:522e:f03c:6225%7]) with mapi id 15.20.5186.021; Wed, 27 Apr 2022 07:03:49 +0000 References: <87y1zvlyj0.fsf@localhost> <878rrsut3o.fsf@localhost> <8735i0vtn7.fsf@localhost> <87wnfbup8x.fsf@localhost> User-agent: mu4e 1.6.10; emacs 27.2 From: Ignacio Casso To: Ihor Radchenko Subject: Re: [BUG] link abbreviations do not work inside property drawers [9.5.2 (release_9.5.2-38-g682ccd @ /home/ignacio/repos/emacs/lisp/org/)] Date: Wed, 27 Apr 2022 08:46:42 +0200 In-reply-to: <87wnfbup8x.fsf@localhost> Message-ID: Content-Type: text/plain X-TMN: [ubDA9NlSDcHw5DzXb6pth2qBQ9rrfPLZ] X-ClientProxiedBy: MR1P264CA0117.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:50::10) To PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) X-Microsoft-Original-Message-ID: <87o80nvwhc.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52d68eb6-4c66-4639-6506-08da281c1488 X-MS-TrafficTypeDiagnostic: DB7PR06MB5321:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +KBwvo8kkrl5B3vaJUuwwdergYlhh5m+s9IzmfC6RGZwNuO34iub3OtODodr4o7MzTAUF2/lsrMv3vBT3QqZkjybnHAnyGfWCJUfkmIVPW8CoPpFsO4wgeBOqFMVHxRNgogaP1xMU7o+D3PMbUnst03b1MqjeZb4/J5IRjugdCnZtT1uHigCN/ZFoEyaMCHF3f5xRcIXRFYvBbILPqIteik9DfnIkLvppMWaibiyBSq/gKqjfB4suqaLF6t9wFrIle8ZrTUDLSrThwg1gtIfGxATsxQyadQOwQ6B+CX6VCYt30j00sxHT98Qoh9sGSX5ZS+AiSZjd66kufvNoQCdt68PBZPYjbRmvTGIi5Z0X7BLC9xvnYqYzE8Up0HeRM2d4jyPk633QDgOp6R/4jAnlzmlg9iY4N81ZwYXopkLo0719h1mEvFffW3dVmKE2q17b2AjamvMbXtacVwt8ZMBk+uneiIgyUOD2iihOrxmoqhXGK7VNFvMVBWgPGalbwCz3RDaeu47G9KmEERRNyfF8//M7GlXXAYoHquJSzAIgwVKjz3Smh6/jNYIx1cJgmrpcx+8ABTGp7+w1csjYFtr5g== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?dG5guER/pz2hx0GE5Kh2WtQ+5kvwrxkqtSrPzzIKoNiqefzItxhBCklFJumR?= =?us-ascii?Q?BoJAuE+Ppcp6MHCJzif4Wgvdw0Dk/IZt7apT3FPpCHOm0Jh3m2bqWWNAzen/?= =?us-ascii?Q?HfFT3VK2qbTAaVk8u7U+Egfczv+vTdPax96vFO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0bwJnFnLucyRH8lwpvCu+Tq0sO0mm7VSY7FS6PoWChHjXmeoPN?= =?us-ascii?Q?p6Lr9guAVWqkCSmtjf3vjQlQdxFPXZLMMe49IT0Br79WOrqRnPhTAylmvgHn?= =?us-ascii?Q?Qm2To919WBJFx/8CWTOB4pXOLFzJs3Y0e/A+5392lfB2KhEFCTI0mmYirbUZ?= =?us-ascii?Q?5T/1rUs+j1YYIHKnfOBUXhpLFVN23M5rj+I/YD6eNbr805peH7OUNEwp7mtt?= =?us-ascii?Q?YyQbUusq5aFMyvNBvlQOnvu0gU4uS+LiGRkUeIjJzAghXvg7OYGJe4amvRaP?= =?us-ascii?Q?FfGt9zgWVFA5IBIbF5vjzlKsN1G6ihiEfCDowmMDNDXxA7EzLuRt33fI9nCp?= =?us-ascii?Q?y9Zj/JtipHnqoYCr9qg8EW9EveOcqqpESelqUALsAPxUZMmLki+faQ/0XuNS?= =?us-ascii?Q?89+riUgl8Ws=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-6e454.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 52d68eb6-4c66-4639-6506-08da281c1488 X-MS-Exchange-CrossTenant-AuthSource: PAXPR06MB7760.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2022 07:03:49.8943 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR06MB5321 Received-SPF: pass client-ip=40.92.91.92; envelope-from=ignaciocasso@hotmail.com; helo=EUR05-AM6-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: emacs-orgmode@gnu.org 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651043234; 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=8/H+FNzt1IolNoP9iSsM17TFLKBiQ8/IqKUGqH5Qez0=; b=E02ldXLrO86qB/GiAYwvMJoFLfGqSuogPZ4/BhFwNtavr3WO+QNNpbdVvJsSsOa3XKC76g VoKvDdeC8yakUhR66QczjnY63fEYnqP6Jrp7Tvt6B1HtztcsfLGpJrqC1Ta4swgznm3gUR 7uSyy5+3l1XlSv+C9wZI1PkZCwQFtNpxfLCPKNOWTm6c1A6P3k3TKRLosCRFY3PI6YAa48 R5M8jqoopj/7+ejEvHtIS0foSxCjX5sEbL7Du2bibCpxPzdKeKFZl/3WRGdA9dj+k3ZZOA pyZmEh4UABg6Mt0Z1RbBAURYntxfpCcSoajh5ZE28y+LfnzvI3MZRaAloI24hA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1651043234; a=rsa-sha256; cv=pass; b=g7ov+4NSylPIWqOqhntTofkzIW60qtISH87Sod4yrbbdrwwPUDNuynQXpHC4gsEf2zHnYK mthp6baf1XPHldIV4PElMx7viITVUTTHMYb/e9zu4HAZhh41+qq0P7d65ADvgWtPicTW9F eEUPzhBBmDJHUPpGw8cvtVeXHag5VpGxKl4hVZIXnsH6VfHJtVo6Do3ipgB/YKiTFAodWE BLT0gy2kHTy/6FlFXgangacGrtQLVc0+RaUlXNSD/I3vlUvmy4bsOVPjNkojI6CgESWZuk xzKcf59lna93RIsctpQTDHRVysrtc4VEk/3MB/jVJ2ce38wj38u/wN/D1wDLAQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=hotmail.com header.s=selector1 header.b=B691Kz8E; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.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: -5.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=hotmail.com header.s=selector1 header.b=B691Kz8E; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.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: CC835D0DE X-Spam-Score: -5.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: h0lO0tJO/v/S Ihor Radchenko writes: > Ignacio Casso writes: > >>> A better approach could be using org-link-expand-abbrev. It is an API >>> function and should be forward-compatible. >> >> Do you mean something like this? >> >> (defun org-open-at-point-global () >> ... >> (cond ((org-in-regexp org-link-any-re) >> (org-link-open-from-string >> (org-link-expand-abbrev (match-string-no-properties 0)))) >> ...)) >> >> Right now that is not enough because `org-link-expand-abbrev' only works >> for links without square brackets, like "abbrev:suffix", and >> `org-link-any-re' matches links with square brackets, like >> "[[abbrev:suffix]]". That could be easily worked around in >> `org-open-at-point-global' but maybe it would be better to change >> `org-link-expand-abbrev' to work with both forms. > > Fair point. Then, the most future-proof way would be calling > org-element-link-parser. It should take care about abbrev expansion and > other edge cases. Then, you just need to use :raw-link property of the > parsed link element. > > Best, > Ihor And then we come full circle, since that is what is being done already but in a temporal buffer (so without access to `org-link-abbrev-alist-local'), and your original concerns in your first reply apply: doing it inside `org-open-at-point' would duplicate a lot of code. So I guess the issue is not as orthogonal as I though with the one of the parser and it would be complicated to fix it properly, as you said in your first email. If no one else has reported this problem or replied to this thread, I guess that probably the best thing to do is fixing this in my own config and move on for now: I'll copy here the advice that fixes it, in case anyone needs to add it to their config too: (defun my-advice (orig-fun &rest args) (let ((org-link-abbrev-alist (append org-link-abbrev-alist org-link-abbrev-alist-local))) (apply orig-fun args))) (advice-add 'org-open-at-point-global :around 'my-advice) Best regards, and thanks for taking a look at this, --Ignacio