GNU bug report logs -
#21024
help-xref-button in header line doesn't work (PATCH attached)
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
1. Copy this snippet to scratch buffer and eval it.
(define-button-type 'hello-world
:supertype 'help-xref
'help-function (lambda ()
(message "Hello World")))
(setq header-line-format
(make-text-button "Hello World" nil 'type 'hello-world))
2. Click on the header buton
3. Note the following stack trace
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
(#("Hello World" 0 11 (button (t) category hello-world-button)) . 10))
button-start((#("Hello World" 0 11 (button (t) category
hello-world-button)) . 10))
help-button-action((#("Hello World" 0 11 (button (t) category
hello-world-button)) . 10))
button-activate((#("Hello World" 0 11 (button (t) category
hello-world-button)) . 10) t)
push-button((mouse-2 (#<window 18 on *Backtrace*> header-line (103 .
14) 11071944 (#("Hello World" 0 11 (button (t) category
hello-world-button)) . 10) nil (10 . -1) nil (3 . 14) (10 . 18))))
funcall-interactively(push-button (mouse-2 (#<window 18 on
*Backtrace*> header-line (103 . 14) 11071944 (#("Hello World" 0 11
(button (t) category hello-world-button)) . 10) nil (10 . -1) nil (3 .
14) (10 . 18))))
call-interactively(push-button nil nil)
command-execute(push-button)
----------------------------------------------------------------
This bug is related to bug#12817: 24.2; The button library does not
work on the header line. The sole difference here is that button is a
help-xref button.
See http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-12/msg00203.html
The related commit is 24fc948039
----------------------------------------------------------------
Without getting in to nitty gritties of the "area buttons", the fix is
fairly simple once you notice that `help-do-xref' doesn't use the
first argument.
See the attached patch.
----------------------------------------------------------------
(I am working on a dictionary client for Emacs. I will circulate the
module -- I call it edictc.el -- in another week. The package uses
xref links in header line, FWIW.)
[help-mode.diff (text/x-patch, attachment)]
This bug report was last modified 8 years and 170 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.