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 kDnLEE6zZ2JubQAAbAwnHQ (envelope-from ) for ; Tue, 26 Apr 2022 10:54:38 +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 wBjkEE6zZ2KNgAAA9RJhRA (envelope-from ) for ; Tue, 26 Apr 2022 10:54:38 +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 86DD63941C for ; Tue, 26 Apr 2022 10:54:37 +0200 (CEST) Received: from localhost ([::1]:57730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njGxw-0000AP-1q for larch@yhetil.org; Tue, 26 Apr 2022 04:54:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njGsU-000601-F8 for emacs-orgmode@gnu.org; Tue, 26 Apr 2022 04:48:58 -0400 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:35489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njGsT-0008JJ-0P for emacs-orgmode@gnu.org; Tue, 26 Apr 2022 04:48:58 -0400 Received: by mail-ot1-x334.google.com with SMTP id w27-20020a056830061b00b00604cde931a0so12605849oti.2 for ; Tue, 26 Apr 2022 01:48:56 -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=3kuGEcM5qz4fgJvupJ9FQ/CD+dJz1xgChFf/F3v/5Po=; b=g4ZgauMoMYsPmadXc1PfCDpW5v2d8CkMe/uh2suH9O6a8aP2Mm1zwqBAsls0gOvuo8 GursWgGVLgCqGIP7BNka9PCiPH3LmxQj2pLgkylnl86+DHROW41LI/StrvFwtDg0dfi5 7oxGJ2q2fAVB+A3UK5p3GsA2b1P/YD/JY8dlGI73WmD1PBFwgPeI5WpOF7qCO5l2I2dd 4m2spS5HDXW9bhIZTKU+bz8nFiKo7T/IEzgyU8vvjkQ6l8MHMIVlTzBea6PcKg39+/In FzuHpgCMxPLp6aMRwwBrBb4J7uqkPIXS90NEWJe2a+OVi2+PzH5gPQAdaKHMTNXCPtyu mXDQ== 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=3kuGEcM5qz4fgJvupJ9FQ/CD+dJz1xgChFf/F3v/5Po=; b=JVJb8Kt7iv34XvsjlG2v6bI5kx7hkLu6Mc/OSbuHs9XnhZxiwVKl9MiQbyZ+AmeQCp JyEfrW27KhFre2j3Xjr5e1MWaBeWDALReCPdUkY4wSJRJPf6g90uEW5BsxnGj8uWtYci m1bvqP7wldlh0Da0Kf7kTRo5C6tjPRO/0uu771HvubOFa87x9ebJxvR/LoKc8SMkaCGN WzkKItBXwJu9jhvkFW84+ZwC7RioZv+sKwvILlJN577MZcvDPcDGZdQGx8danz8Kq+Vq QA2HlM9M6K2gno5hYlBoJ7xfesEW3sqEeR/zY5sFjGQXTAbzvUBUkUtb2fJoPaycv9T0 KKIw== X-Gm-Message-State: AOAM533qfQAG7k7/cfRoTXVrThyU9tXbBwgZeA+/7lI3tpjYFSzNTdGo dn2D6qv4dLBnVXmlviFvFn0= X-Google-Smtp-Source: ABdhPJxWCas1PFeSBWlgebc2/LiWYn0AFJIln6lJxsQ4CWeW6kcf9IAVdDxhFdCnfID/Dr3rZ4x54g== X-Received: by 2002:a05:6830:10c6:b0:605:475c:a907 with SMTP id z6-20020a05683010c600b00605475ca907mr7875471oto.196.1650962935471; Tue, 26 Apr 2022 01:48:55 -0700 (PDT) Received: from localhost ([208.110.84.210]) by smtp.gmail.com with ESMTPSA id t28-20020a056808159c00b00325361c4fbesm1937051oiw.5.2022.04.26.01.48.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 01:48:54 -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: <87y1zvlyj0.fsf@localhost> Date: Tue, 26 Apr 2022 16:49:47 +0800 Message-ID: <878rrsut3o.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::334; envelope-from=yantar92@gmail.com; helo=mail-ot1-x334.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=1650963277; 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=3kuGEcM5qz4fgJvupJ9FQ/CD+dJz1xgChFf/F3v/5Po=; b=uwvbS7PKgIUqW6pXAtzn8Ksb+9WCllAyUfP9iI9jBh3KDxJ0YN6Mbi9hvIKITtAT6UetlR 6Q64EQa9wfa5YHO9iJ3A9ihc6PM846ddN0x1GSn3hPVvi5zTLStUhXyFkhCwa1KHx+d+nD OQdC2KGYPKEZ5ZIVVivlRhmAiv1qg6R+CCV9FZrksQMB+t2Y6vB4E7bExmbZfuuHLT7tPv YiP8F7llQK4J7cpAUaCtmjMPWjEhffgcATae1jw/3s87ZeuD3DIRhe1Ey2yMsiznOvpVXI 9donnwAe3J4IVIE1hw+6+Cyvpxn/EOZ2BCYQKD0GdBLX4lheLJrYmuskM1esRg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650963277; a=rsa-sha256; cv=none; b=Y6xOHLJnRsb/PuC7Q42RsMgjEBWR59vYCfxS8I5JzHR4uXSubonoISENS6Z4qE1nvbDndW HxT7FdLYslV34FHVVbilK+ucxZDPYH4eKEFRfwB/0pyiV+m1YXpmx+ayEhJ9fRDspdIXnm 2i032UN9P2GIrO4fPl52dtLO5KgDir8wzq877h2+xZ1oqZUMI3x2tNJKMFdNdcKlVKlDbi XMcAqUlPBDCtjXiCW6uoYlLAuQrFmaDQsRH4s3Wi6+sUckjfVWPLSn1BQZCJhJ4hXgBD9J jc3yOxfPWNkgG9/qE8JUCA+dMEWrnsTNIM9bFU8rh5k5S9rNb7zbSogN60eMLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=g4ZgauMo; 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.51 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=g4ZgauMo; 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: 86DD63941C X-Spam-Score: -3.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: IGYSOaUACbI1 Ignacio Casso writes: > Actually, I have investigated a little bit and I think the issue is more simple > than that: > > - Link abbreviations rely in the variables `org-link-abbrev-alist' for > global abbreviations and `org-link-abbrev-alist-local' for > abbreviations defined with #+LINK for a single org file. > > - `org-open-at-point-global' opens links with > `org-link-open-from-string' as opposed to `org-open-at-point', which > uses `org-link-open'. > > - `org-link-open-from-string' ends up using `org-link-open' too, but > inside a `with-temp-buffer' form: > ... > So a simple solution to this would be preserving the value of > `org-link-abbrev-alist-local' when switching to the temporal buffer. I > think this is orthogonal to the issue of the parser, and it's a bug on > its own, since as a user I would expect that evaluating > `org-link-open-from-string' would use my current buffer's local values > of variables. I am not sure if using current buffer in `org-link-open-from-string' is to be expected. This function is not tied to buffer, just to string. Imagine a situation when user function retrieves the link string from another buffer and then calls `org-link-org-from-string' in the context of current buffer. What you are proposing is going to change the current behaviour of `org-link-open-from-string' beyond the discussed problem. Instead of changing the default behaviour of `org-link-open-from-string', I would introduce an optional parameter holding the desired context. The parameter can be set to an Org buffer. That buffer's context will be used. > P.S. There is another variable defined with `defvar-local' in ol.el: > `org-target-link-regexp'. I don't know what it is used for but it could > potentially suffer from the same problem. A clean solution would do something similar to org-export--generate-copy-script. Best, Ihor