emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Gustavo Barros <gusbrs.2016@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: org-mode list <emacs-orgmode@gnu.org>
Subject: Re: [BUG] org-element-context doesn't recognize link inside property drawer [9.6.6 (release_9.6.6 @ /usr/local/share/emacs/29.1/lisp/org/)]
Date: Sat, 23 Sep 2023 07:19:36 -0300	[thread overview]
Message-ID: <CAM9ALR85aB6bs-KdwfHZ2a0yUKvByCtBXrVS4WPE0Zrz3t5wog@mail.gmail.com> (raw)
In-Reply-To: <87ttrl2syk.fsf@localhost>

Hi Ihor,

On Sat, 23 Sept 2023 at 05:28, Ihor Radchenko <yantar92@posteo.net> wrote:
>
> Gustavo Barros <gusbrs.2016@gmail.com> writes:
>
> > When a link is placed as a property value, `org-element-context' does
> > not recognize it as a link.
>
> It is expected and intentional: https://list.orgmode.org/orgmode/877d8llha9.fsf@nicolasgoaziou.fr/.
>
> > In particular, the "link" element is not present, as would be the case
> > if the exact same link were not inside the property drawer. On the
> > other hand, the link is active (fontified, works, etc.). Thus,
> > `org-element.el` and `ol.el` seem to disagree as to what that part of
> > the buffer actually is.
>
> This is intentional. org-agenda and fontification deliberately recognize
> links in more contexts compared to org-element and export. Same for
> timestamps. For example, see `org-at-timestamp-p'.
>
> For ol.el, the links are open inside property drawer for convenience.
> Below is a code responsible for this case from `org-open-at-point':
>
>        ;; 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))

I didn't know that. Thanks for the detailed answer.

Best,
Gustavo.


      reply	other threads:[~2023-09-23 10:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 18:11 [BUG] org-element-context doesn't recognize link inside property drawer [9.6.6 (release_9.6.6 @ /usr/local/share/emacs/29.1/lisp/org/)] Gustavo Barros
2023-09-22 18:48 ` Gustavo Barros
2023-09-23  8:29 ` Ihor Radchenko
2023-09-23 10:19   ` Gustavo Barros [this message]

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=CAM9ALR85aB6bs-KdwfHZ2a0yUKvByCtBXrVS4WPE0Zrz3t5wog@mail.gmail.com \
    --to=gusbrs.2016@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).