From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [ISSUE] links navigation not consistent behavior
Date: Thu, 04 Apr 2019 15:54:26 +0200 [thread overview]
Message-ID: <87tvfd7u5p.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87r2ajrr2r.fsf@alphaville.usersys.redhat.com> (Nick Dokos's message of "Wed, 03 Apr 2019 12:28:28 -0400")
Hello,
Nick Dokos <ndokos@gmail.com> writes:
> | I can reproduce this and traced it to this code:
> |
> | ,----
> | | (catch :found
> | | (while (funcall search-fun org-link-any-re nil t)
> | | (pcase (org-element-lineage (org-element-context) '(link) t) ;;; <<<<< HERE
> | | (`nil nil) (link
> | | (goto-char (org-element-property :begin link)) (when
> | | (org-invisible-p) (org-show-context)) (throw :found t))))
> | `----
> |
> | which is a rewrite of org-next-link in commit 4ff8947ea8.
> |
> | There is some asymmetry in how forward and backward searches behave:
> |
> | - in the forward case, the search ends up at the end of the first
> | link where `org-element-lineage' returns nil, so the loop repeats;
> | we then end up at the end of the second link where
> | `org-element-lineage' returns the link, we go to the beginning of
> | the link and return.
> |
> | - in the backward case, we end up at the beginning of each link in
> | turn, in which case `org-element-lineage' returns a link, so both
> | links are found.
> |
> | So it may be that `org-element-context' should return a structure with
> | the link included when called at the end of the first link or it may
> | be that the search should back up one char in the forward case, before
> | calling org-context.
> `----
>
> This may be wrong but I did not have time to continue with it: I hope it's
> useful.
Fixed. Thank you.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2019-04-04 13:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-27 23:36 [ISSUE] links navigation not consistent behavior stardiviner
2019-04-02 20:14 ` Nicolas Goaziou
2019-04-03 16:28 ` Nick Dokos
2019-04-04 13:54 ` Nicolas Goaziou [this message]
2019-04-08 0:32 ` stardiviner
2019-04-08 9:26 ` Nicolas Goaziou
2019-04-09 22:48 ` stardiviner
2019-04-10 13:34 ` Nicolas Goaziou
2019-04-11 23:10 ` stardiviner
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=87tvfd7u5p.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=ndokos@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).