emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-open-at-point fails on internal links
@ 2017-10-07  8:44 Scott Otterson
  2017-10-07 15:01 ` Kyle Meyer
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Otterson @ 2017-10-07  8:44 UTC (permalink / raw)
  To: Emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

When I click on an internal link to an anchor, I get the error message:

"Wrong type argument: number-or-marker-p"

The same happens if I type C-c C-o on the link.  This is mapped
to org-open-at-point, which should handle internal links.

However, if I type C-c o on the link, then the cursor goes to the anchor.
This is mapped to org-open-at-point-global, which the org info help says is
undefined on internal links.

This behavior is new, I believe since the last org package update.  I'm
currently on org mode version 9.1.2.

------ Example Org File -----------

* headline 1
  <<Anchor 1>>
* headline 2
*** [[Anchor 1]]  CLICK ON THIS

[-- Attachment #2: Type: text/html, Size: 879 bytes --]

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

* Re: org-open-at-point fails on internal links
  2017-10-07  8:44 org-open-at-point fails on internal links Scott Otterson
@ 2017-10-07 15:01 ` Kyle Meyer
  2017-10-07 15:04   ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2017-10-07 15:01 UTC (permalink / raw)
  To: Scott Otterson, Emacs-orgmode@gnu.org

Hello,

Scott Otterson <scotto@sharpleaf.org> writes:

> When I click on an internal link to an anchor, I get the error message:
>
> "Wrong type argument: number-or-marker-p"
>
> The same happens if I type C-c C-o on the link.  This is mapped
> to org-open-at-point, which should handle internal links.

[...]

> This behavior is new, I believe since the last org package update.  I'm
> currently on org mode version 9.1.2.
>
> ------ Example Org File -----------
>
> * headline 1
>   <<Anchor 1>>
> * headline 2
> *** [[Anchor 1]]  CLICK ON THIS

FWIW I'm not able to reproduce this with 9.1.2.

-- 
Kyle

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

* Re: org-open-at-point fails on internal links
  2017-10-07 15:01 ` Kyle Meyer
@ 2017-10-07 15:04   ` Nicolas Goaziou
  2017-10-09 16:08     ` Scott Otterson
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2017-10-07 15:04 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: Emacs-orgmode@gnu.org, Scott Otterson

Hello,

Kyle Meyer <kyle@kyleam.com> writes:

> Hello,
>
> Scott Otterson <scotto@sharpleaf.org> writes:
>
>> When I click on an internal link to an anchor, I get the error message:
>>
>> "Wrong type argument: number-or-marker-p"
>>
>> The same happens if I type C-c C-o on the link.  This is mapped
>> to org-open-at-point, which should handle internal links.
>
> [...]
>
>> This behavior is new, I believe since the last org package update.  I'm
>> currently on org mode version 9.1.2.
>>
>> ------ Example Org File -----------
>>
>> * headline 1
>>   <<Anchor 1>>
>> * headline 2
>> *** [[Anchor 1]]  CLICK ON THIS
>
> FWIW I'm not able to reproduce this with 9.1.2.

Ditto. Maybe a backtrace would help.

Regards,

-- 
Nicolas Goaziou

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

* Re: org-open-at-point fails on internal links
  2017-10-07 15:04   ` Nicolas Goaziou
@ 2017-10-09 16:08     ` Scott Otterson
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Otterson @ 2017-10-09 16:08 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1599 bytes --]

> Scott Otterson <scotto@sharpleaf.org> writes:
>
>> When I click on an internal link to an anchor, I get the error message:
>>
>> "Wrong type argument: number-or-marker-p"

The problem has something do do with org-mouse.el --  if I go to Emacs
customize "Org Modules" and uncheck:

"mouse:   Additional mouse support"

then links work and there's no error message.

Things seem to go wrong at org-mouse.el, which adds code to org-mode-hook,
and that code adds advice to org-open-at-point; the advice calls
org-footnote-at-reference-p, where the problem starts.

I don't know if the call to org-footnote-at-reference-p should be removed
from the advice, or if org-footnote-at-reference-p should be fixed.

Scott

On Sat, Oct 7, 2017 at 5:04 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Kyle Meyer <kyle@kyleam.com> writes:
>
> > Hello,
> >
> > Scott Otterson <scotto@sharpleaf.org> writes:
> >
> >> When I click on an internal link to an anchor, I get the error message:
> >>
> >> "Wrong type argument: number-or-marker-p"
> >>
> >> The same happens if I type C-c C-o on the link.  This is mapped
> >> to org-open-at-point, which should handle internal links.
> >
> > [...]
> >
> >> This behavior is new, I believe since the last org package update.  I'm
> >> currently on org mode version 9.1.2.
> >>
> >> ------ Example Org File -----------
> >>
> >> * headline 1
> >>   <<Anchor 1>>
> >> * headline 2
> >> *** [[Anchor 1]]  CLICK ON THIS
> >
> > FWIW I'm not able to reproduce this with 9.1.2.
>
> Ditto. Maybe a backtrace would help.
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 3462 bytes --]

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

* Re: org-open-at-point fails on internal links
  2017-10-09 18:38 Fwd: " Kyle Meyer
@ 2017-10-10  7:04 ` Scott Otterson
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Otterson @ 2017-10-10  7:04 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: Emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]

This morning, I updated my packages (Options -> Manage Emacs Packages -> U
->X) and now, internal links work perfectly.

For the record, the updated packages were:

dash-20171009.105
flycheck-20171009-1145
helm-20171009.221
kaolin-theme-20171009.1130
org-20171009
org-plus-contrib-20171009
org-ref-20171009.2019
python mode-20171005.1620


I'll let you know if the error returns.

Scott




On Mon, Oct 9, 2017 at 8:38 PM, Kyle Meyer <kyle@kyleam.com> wrote:

> [Forwarding because the list was dropped earlier in the thread but I
>  didn't notice.  Scott, please don't drop the list in your replies.]
>
>
>
> ---------- Forwarded message ----------
> From: Kyle Meyer <kyle@kyleam.com>
> To: Scott Otterson <scotto@sharpleaf.org>, Nicolas Goaziou <
> mail@nicolasgoaziou.fr>
> Cc:
> Bcc:
> Date: Mon, 09 Oct 2017 14:32:00 -0400
> Subject: Re: org-open-at-point fails on internal links
> Scott Otterson <scotto@sharpleaf.org> writes:
>
> >   org-backward-paragraph()
> >   org-inside-LaTeX-fragment-p()
> >   org-footnote-in-valid-context-p()
> >   org-footnote-at-reference-p()
> >   ad-Advice-org-open-at-point
>
> [...]
>
> > org-mouse.el  (line 907) adds code to org-mode-hook, and that code adds
> > advice to org-open-at-point, and that advice calls
> > org-footnote-at-reference-p
>
> Thanks for digging further.  Indeed org-mouse.el's advice would result
> in the org-footnote-at-reference-p path being executed.
>
> After loading org-mouse and using your example, I'm still not able to
> trigger the error.  Could you debug org-backward-paragraph to find out
> where the error is occurring?  You can do that by calling C-u C-M-x on
> org-backward-paragraph or by evaluating
>
>     (edebug-instrument-function 'org-backward-paragraph)
>
> --
> Kyle
>
>

[-- Attachment #2: Type: text/html, Size: 2707 bytes --]

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

end of thread, other threads:[~2017-10-10  7:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-07  8:44 org-open-at-point fails on internal links Scott Otterson
2017-10-07 15:01 ` Kyle Meyer
2017-10-07 15:04   ` Nicolas Goaziou
2017-10-09 16:08     ` Scott Otterson
  -- strict thread matches above, loose matches on Subject: below --
2017-10-09 18:38 Fwd: " Kyle Meyer
2017-10-10  7:04 ` Scott Otterson

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