emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Gustavo Barros <gusbrs.2016@gmail.com>
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 08:29:23 +0000	[thread overview]
Message-ID: <87ttrl2syk.fsf@localhost> (raw)
In-Reply-To: <CAM9ALR-fMyiic9Yqw-Ebai5Ctb38iMHZQmUXrvg0aCT3AKUsOw@mail.gmail.com>

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))

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  parent reply	other threads:[~2023-09-23  8:29 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 [this message]
2023-09-23 10:19   ` Gustavo Barros

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=87ttrl2syk.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=gusbrs.2016@gmail.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).