emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [ISSUE] links navigation not consistent behavior


From: Nicolas Goaziou
Subject: Re: [O] [ISSUE] links navigation not consistent behavior
Date: Thu, 04 Apr 2019 15:54:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Nick Dokos <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]