abo-abo/ace-link

Doesn't work in tldr mode

Closed this issue · 4 comments

When ace-link-help called in tldr-mode , following error will be raised:

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  text-property-not-all(nil 265 button nil)
  ace-link--help-collect()
  ace-link-help()
  funcall-interactively(ace-link-help)
  call-interactively(ace-link-help record nil)
  command-execute(ace-link-help record)
  #[257 "\304\305!\203\f

If I eval:

(text-property-any
               (window-start) (window-end) 'button nil)

in the same tldr buffer, the result is:

1 (#o1, #x1, ?\C-a)

I guess it works different than help-mode. PR welcome.

I have no idea why it doesn't work and my elisp-fu is weak. Do you have any suggestions where I should start?

See if it's possible to navigate buttons via tab and ret. Look at the source if needed.

Thanks! Both tab and ret works, but I have some trouble in understanding the source.

If I understand correctly, the skip in this line shouldn't be nil.
https://github.com/abo-abo/ace-link/blob/master/ace-link.el#L144

Actually, If I eval:

(text-property-any
               (window-start) (window-end) 'button nil)

It is indeed non-nil. But how does it become nil when calling ace-link-help?