From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 cIi6Cwf/ZGIVIwAAbAwnHQ (envelope-from ) for ; Sun, 24 Apr 2022 09:40:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ECXoCgf/ZGLMlgAAG6o9tA (envelope-from ) for ; Sun, 24 Apr 2022 09:40:55 +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 C2563A31D for ; Sun, 24 Apr 2022 09:40:54 +0200 (CEST) Received: from localhost ([::1]:38758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niWrV-0004LJ-Rp for larch@yhetil.org; Sun, 24 Apr 2022 03:40:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niWqV-0004L7-8a for emacs-orgmode@gnu.org; Sun, 24 Apr 2022 03:39:51 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:42667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niWqT-0004iP-HM for emacs-orgmode@gnu.org; Sun, 24 Apr 2022 03:39:50 -0400 Received: by mail-pl1-x634.google.com with SMTP id s17so20300367plg.9 for ; Sun, 24 Apr 2022 00:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=GHvQzMEqR15E2mUMkdsPaZsHw/2gKx+ZfAngovRdAKo=; b=XQaRogty0KkxBHzy/A/4PpYEN1SM+L4btRksTVEArSdlKfJ179tEhlicQxxBZKVERA 1gnkf9XuKPS7CZc8jF02rhrmBNF1n1TjHc+MGkRIi+SJwyuoJ/KN+5A6mMaRbq3TXd6r SfeSYMjZ8ARCVVvLH+Bx7ADUDWfJTAxKQvvkNBvbLx5ZkxzfPnIBTfXToFhtb/qJJ6KC MMwy+UqaGm0uw4RtjJ5IYWa1JOIngZfBYEPUX0jR9XqanoveMMtRQxWNWLhhmFOqGe7X NgwmfchAp37byVv2EPiNKj5q1+VmUQd2o/f5hpyMDjxycdFWZ+B8QpHi1nwMqM8ocI0W R6TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=GHvQzMEqR15E2mUMkdsPaZsHw/2gKx+ZfAngovRdAKo=; b=LyqKPBj+B6GeiemWKpnqoh7mFTKD0UrE9fmts7XuQERZHBs8Fz488vtTlAtRjkYKKP g+QE3AEzwF8T9qHIgug6Ljg6LjEhvH+JFM11g81s71xvXQgmigSskGvJuypY/7sJOGN+ qVFseq+dhfvHsVB4DoR/B13uGbHkhmzqhIq/sa0bItl9Ayx0o5jl7Ko5DkodvwS6Wrpx q4iTTC9A8YfL/Az8ZdOSo7riZAOCNDmu84ZX9fzDiHyQN6c2X606nO8sj02XfAoLF/W9 uAPDeYiukU2IE+v5uVr7Z0sQtp4qhxFXNiAzLfZX0g1+EUM5VtllYwktWp4uOwkEJSYi bqlg== X-Gm-Message-State: AOAM533CHE+igjXXSF3Vv6G4TEc6YVFZ8HhQygwXnqXzJi9Hg/r+pmdY OEk4fEHm4o3mPFUmjOA0o8Q= X-Google-Smtp-Source: ABdhPJy+UPF/UhnOrrF5PLFgR7QCXQI31JWfdH+H4VTu6WobjAtOENFAODMePqNiS0uud/8uqw5f7w== X-Received: by 2002:a17:90a:aa8a:b0:1c9:bfd8:9a90 with SMTP id l10-20020a17090aaa8a00b001c9bfd89a90mr14371778pjq.118.1650785988108; Sun, 24 Apr 2022 00:39:48 -0700 (PDT) Received: from localhost ([211.22.184.184]) by smtp.gmail.com with ESMTPSA id b11-20020a62a10b000000b0050d20983876sm3745901pff.166.2022.04.24.00.39.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 00:39:47 -0700 (PDT) From: Ihor Radchenko To: Ignacio Casso 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/)] In-Reply-To: References: Date: Sun, 24 Apr 2022 15:40:35 +0800 Message-ID: <87y1zvlyj0.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=yantar92@gmail.com; helo=mail-pl1-x634.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, 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, 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=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650786054; 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=GHvQzMEqR15E2mUMkdsPaZsHw/2gKx+ZfAngovRdAKo=; b=Zcl9Jns0Z+OM7LYHy1fmhJHHvf/KApb6QOCrS04EkUNUt6Kr31JCw32UN/tsi5S4P5ofab Dft2nUFdFtg7oaOXjHMNDiROfDlZdSmJE9Ha/cFJY1P9J2cjDHKFD2x7NOgOf8PmtfOcr+ dvSLkswitAs9IjAuEZq/Lf3o6QWJsL1naLaWjGSFC2HahUNGceZ0sGJ0shR2bzutsRaNSA VIEBi9Qt1tf+hQYdg+6xuby14FZ1t36x+I0mG9RvUQwDN7oqTSU4vp9wkU7T8HIu5lxYWY HHUtci1F0uCb7uvse7omiGzIPr9mdBIYvPIFwtSrwckjNC+R+9MvLkoeyAgJiQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650786054; a=rsa-sha256; cv=none; b=AC9y5KjzugOz9AswYVA0Y+K0t5tUE4RaXNkjPgEP10Gl93GBFqZXNiAWIsKHlHZjUK8muB V91Zbu0m2IrV94UhXdmN2VZFgHdB7rOgAGGsA/YqAo5k1WSXSMi9nkETAXMJKGRxmitI8m 8/v9NxcYyQrquI5XStXV3NpKyXh71078Pde9O3ucXQA/yffDOveWTPS0Z0x9gu5nPsfNvQ 8QhC7A/3q1KK+BjfezOG0/YIHvnlSrTBgxZMokbELc2bpf7PcEFDNfb024CTqX12bwCBmv u78msoVmmVAPkuvmsft5gNsmOVQnhfUtvhqlt5SwbtArPfvaJGuXPeN2bd1yHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XQaRogty; 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.52 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XQaRogty; 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: C2563A31D X-Spam-Score: -3.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: IQs0IeGho1MB Ignacio Casso writes: > Link abbreviations do not work inside property drawers and are instead > confused with internal links. The following org file illustrates this > behavior. This is to be expected. org-open-at-point does the following: ;; No valid link at point. For convenience, look if something ;; looks like a link under point in some specific places. ((memq type '(comment comment-block node-property keyword)) (call-interactively #'org-open-at-point-global)) That is, links are only partially recognised inside comments, node properties, and keywords. > I know that there is discussion of whether timestamps and links should > work or not inside property drawers, but since they currently work, I > think link abbreviations should be supported too. Let me know if you > agree and I'll debug the issue and send a patch with a fix proposal. I do not think that it is an easy problem to solve properly. In the discussion you referenced [1] Nicolas raised the problem that we cannot modify org-element parser to support links in more contexts as it may create various issues (e.g. in exporter). Without modifying the parser, supporting abbreviations will require code duplication or referring to internal org-element functions - a fragile approach. I am currently tinkering with an idea to implement several parser contexts, similar to optional argument in org-at-timestamp-p. Basically, org-element parser could allow using multiple named org-element-object-restrictions: 'agenda, 'export, 'lax, etc. This is not ideal, as Org syntax will be more complex. However, multiple interpretations of Org syntax are already implemented de facto (e.g. org-at-timestamp-p). So, centralising the parsing into org-element could be beneficial. Probably, the contexts might be defined by let-bound org-element-parser-context value. Best, Ihor [1] https://orgmode.org/list/877d8llha9.fsf@nicolasgoaziou.fr