emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* `org-next-link' skips links inside PROPERTIES drawer
@ 2020-01-17  0:25 Pedro Ribeiro Mendes Júnior
  0 siblings, 0 replies; 6+ messages in thread
From: Pedro Ribeiro Mendes Júnior @ 2020-01-17  0:25 UTC (permalink / raw)
  To: Emacs Org Mode mailing list

Hello,

I am testing Emacs 28 (Org 9.3) from the Git repository and I have
noticed that, compared to version 26.3 (Org 9.1.9), `org-next-link'
function is skipping links located inside the PROPERTIES drawer.  (I
have not tested version 27.)  The same does not happen for the links
outsize drawers or links inside a drawer other than PROPERTIES one,
e.g., LOGBOOK drawer.

As an example, consider the Org file between "=============" lines
below.  Set the cursor at the beginning of the file.  Then call
`org-next-link'.

=============
* Heading
  :PROPERTIES:
  :MYLINK:   https://orgmode.org/
  :END:
  Another link: https://duckduckgo.com/
=============

I would expect `org-next-link' to find the link inside the drawer (i.e.,
https://orgmode.org/) as in version 26.3.  Instead, it goes directly to
the second link (i.e., https://duckduckgo.com/).

Let me know if this is an intentional behavior for newer versions of Org
mode.  If so, I think it could receive a customization option for this
behavior.

Bests,
Pedro R.M. Júnior

^ permalink raw reply	[flat|nested] 6+ messages in thread

* `org-next-link' skips links inside PROPERTIES drawer
@ 2020-01-20 22:56 Pedro R.M. Júnior
  2020-01-20 23:31 ` Kyle Meyer
  0 siblings, 1 reply; 6+ messages in thread
From: Pedro R.M. Júnior @ 2020-01-20 22:56 UTC (permalink / raw)
  To: Emacs Org Mode mailing list

Hello,

I am testing Emacs 28 (Org 9.3) from the Git repository and I have
noticed that, compared to version 26.3 (Org 9.1.9), `org-next-link'
function is skipping links located inside the PROPERTIES drawer.  (I
have not tested version 27.)  The same does not happen for the links
outsize drawers or links inside a drawer other than PROPERTIES one,
e.g., LOGBOOK drawer.

As an example, consider the Org file between "=============" lines
below.  Set the cursor at the beginning of the file.  Then call
`org-next-link'.

=============
* Heading
  :PROPERTIES:
  :MYLINK:   https://orgmode.org/
  :END:
  Another link: https://duckduckgo.com/
=============

I would expect `org-next-link' to find the link inside the drawer (i.e.,
https://orgmode.org/) as in version 26.3.  Instead, it goes directly to
the second link (i.e., https://duckduckgo.com/).

The same happens with `org-previous-link'.

Let me know if this is an intentional behavior for newer versions of Org
mode.  If so, I think it could receive a customization option for this
behavior.

Bests,
Pedro R.M. Júnior

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: `org-next-link' skips links inside PROPERTIES drawer
  2020-01-20 22:56 Pedro R.M. Júnior
@ 2020-01-20 23:31 ` Kyle Meyer
  2020-01-21  0:02   ` Pedro R.M. Júnior
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle Meyer @ 2020-01-20 23:31 UTC (permalink / raw)
  To: Pedro R.M. Júnior, Emacs Org Mode mailing list

Hi Pedro,

Pedro R.M. Júnior <pedrormjunior@gmail.com> writes:

> I am testing Emacs 28 (Org 9.3) from the Git repository and I have
> noticed that, compared to version 26.3 (Org 9.1.9), `org-next-link'
> function is skipping links located inside the PROPERTIES drawer.
> [...]
> Let me know if this is an intentional behavior for newer versions of Org
> mode.  If so, I think it could receive a customization option for this
> behavior.

This behavior came up in a previous thread.  Quoting Nicolas:

,----[ https://lists.gnu.org/archive/html/emacs-orgmode/2019-04/msg00075.html ]
| This is expected.
| 
| The value in a properties drawer cannot be a link, even though
| `org-open-at-point' would normally open it, as is done for comments.
| 
| In addition to no being syntactically a valid link, I think it is
| undesirable for an interactive command to display hidden internal data.
| 
| If you want to reach it, just write a function calling
| 
|    (re-search-forward org-any-link-re nil t)
`----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: `org-next-link' skips links inside PROPERTIES drawer
  2020-01-20 23:31 ` Kyle Meyer
@ 2020-01-21  0:02   ` Pedro R.M. Júnior
  2020-01-21  2:19     ` Samuel Wales
  0 siblings, 1 reply; 6+ messages in thread
From: Pedro R.M. Júnior @ 2020-01-21  0:02 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: Emacs Org Mode mailing list

Hello Kyle,

> This behavior came up in a previous thread.  Quoting Nicolas:
>
> ,----[ https://lists.gnu.org/archive/html/emacs-orgmode/2019-04/msg00075.html ]
> | This is expected.
> |
> | The value in a properties drawer cannot be a link, even though
> | `org-open-at-point' would normally open it, as is done for comments.
> |
> | In addition to no being syntactically a valid link, I think it is
> | undesirable for an interactive command to display hidden internal data.
> |
> | If you want to reach it, just write a function calling
> |
> |    (re-search-forward org-any-link-re nil t)
> `----

In fact, this have passed unobserved to me.  Thanks for the
clarification and quoted suggestion.

Bests,
Pedro

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: `org-next-link' skips links inside PROPERTIES drawer
  2020-01-21  0:02   ` Pedro R.M. Júnior
@ 2020-01-21  2:19     ` Samuel Wales
  2020-01-21  3:07       ` Kyle Meyer
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2020-01-21  2:19 UTC (permalink / raw)
  To: Pedro R.M. Júnior; +Cc: Emacs Org Mode mailing list

thanks from here too!  interesting.


is isearch intended to be also affected?  or just org-next-link?  i
suppose isearch is a generic emacs thing, just as lgrep would be
generic, and most folk would want it to be generic and would get too
confused if it were not, but just want to make sure.

i have noticed a similar issue.  i wonder if it is related to the next
link issue, or completely different and related to text properties or
overlays or something?

namely, isearch will not find google in the following link:

[[http://google.com][go]]

is there a hack to make isearch find links?  even though they are
hidden?  and find everythign else that isearch does not find, if there
is anythign else?

in 9.1.14, a link like <http://whatever.com> will be found by
org-next-link, so perhaps it is more recent than that.

[now i wodner if whatever kludge i put someplace that makes links in
comments fontified or... clickable... or something... is not needed in
more recent org.]


On 1/20/20, Pedro R.M. Júnior <pedrormjunior@gmail.com> wrote:
> Thanks for the
> clarification and quoted suggestion.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: `org-next-link' skips links inside PROPERTIES drawer
  2020-01-21  2:19     ` Samuel Wales
@ 2020-01-21  3:07       ` Kyle Meyer
  0 siblings, 0 replies; 6+ messages in thread
From: Kyle Meyer @ 2020-01-21  3:07 UTC (permalink / raw)
  To: Samuel Wales, Pedro R.M. Júnior; +Cc: Emacs Org Mode mailing list

Samuel Wales <samologist@gmail.com> writes:

> is isearch intended to be also affected?  or just org-next-link?  i
> suppose isearch is a generic emacs thing, just as lgrep would be
> generic, and most folk would want it to be generic and would get too
> confused if it were not, but just want to make sure.

No, isearch isn't affected.

> i have noticed a similar issue.  i wonder if it is related to the next
> link issue, or completely different and related to text properties or
> overlays or something?
>
> namely, isearch will not find google in the following link:
>
> [[http://google.com][go]]
>
> is there a hack to make isearch find links?  even though they are
> hidden?

Here are two options:

  * Set search-invisible to t.  (The default value of `open' won't allow
    you to match links.)

  * Make the links visible with org-toggle-link-display before
    searching.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-21  3:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17  0:25 `org-next-link' skips links inside PROPERTIES drawer Pedro Ribeiro Mendes Júnior
  -- strict thread matches above, loose matches on Subject: below --
2020-01-20 22:56 Pedro R.M. Júnior
2020-01-20 23:31 ` Kyle Meyer
2020-01-21  0:02   ` Pedro R.M. Júnior
2020-01-21  2:19     ` Samuel Wales
2020-01-21  3:07       ` Kyle Meyer

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