emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Ignacio Casso <ignaciocasso@hotmail.com>
Cc: emacs-orgmode@gnu.org
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: Tue, 26 Apr 2022 21:52:44 +0800	[thread overview]
Message-ID: <8735i0vtn7.fsf@localhost> (raw)
In-Reply-To: <PAXPR06MB7760D4D87CBFB3823E8AFED2C6FB9@PAXPR06MB7760.eurprd06.prod.outlook.com>

Ignacio Casso <ignaciocasso@hotmail.com> writes:

> I agree that changing the current behavior of
> `org-link-open-from-string' may be problematic, however I don't think
> that it's worth to introduce the optional argument just for this
> "bug".

Makes sense. I am going ahead of what is currently on main. 

> (cond ((org-in-regexp org-link-any-re)
>        (let ((org-link-abbrev-alist
>               (append org-link-abbrev-alist org-link-abbrev-alist-local)))
> 	 (org-link-open-from-string (match-string-no-properties 0))))
>       ...)
> ...
> What do you think?

I do not like this idea. There is also org-link-abbrev-alist-local and
potentially other variables to be introduced in future. We should not
rely too much on internal workings of ol.el.

A better approach could be using org-link-expand-abbrev. It is an API
function and should be forward-compatible.

Best,
Ihor


  reply	other threads:[~2022-04-26 13:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-23  9:53 [BUG] link abbreviations do not work inside property drawers [9.5.2 (release_9.5.2-38-g682ccd @ /home/ignacio/repos/emacs/lisp/org/)] Ignacio Casso
2022-04-24  7:40 ` Ihor Radchenko
2022-04-24  9:45   ` Ignacio Casso
2022-04-26  8:49     ` Ihor Radchenko
2022-04-26  9:07       ` Ignacio Casso
2022-04-26 13:52         ` Ihor Radchenko [this message]
2022-04-26 14:46           ` Ignacio Casso
2022-04-27  4:25             ` Ihor Radchenko
2022-04-27  6:46               ` Ignacio Casso
2022-04-27  9:18                 ` tony aldon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735i0vtn7.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ignaciocasso@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).