[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] link abbreviations do not work inside property drawers [9.5.2
From: |
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/)] |
Date: |
Tue, 26 Apr 2022 16:46:31 +0200 |
User-agent: |
mu4e 1.6.10; emacs 27.2 |
>> (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.
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.
Let me know if you want me to send a patch implementing any of those
options or any other that you see fit. Otherwise, I know enough now to
fix the issue in my own config, so we can leave at that.
Regards,
--Ignacio
- [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/23
- 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/)], Ihor Radchenko, 2022/04/24
- 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/)], Ignacio Casso, 2022/04/24
- 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/)], Ihor Radchenko, 2022/04/26
- 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/)], Ignacio Casso, 2022/04/26
- 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/)], Ihor Radchenko, 2022/04/26
- 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/)],
Ignacio Casso <=
- 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/)], Ihor Radchenko, 2022/04/27
- 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/)], Ignacio Casso, 2022/04/27
- 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/)], tony aldon, 2022/04/27