bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21024: help-xref-button in header line doesn't work (PATCH attached)


From: Vaidheeswaran C
Subject: bug#21024: help-xref-button in header line doesn't work (PATCH attached)
Date: Thu, 09 Jul 2015 23:04:07 +0530
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0

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


Attachment: help-mode.diff
Description: Text Data


reply via email to

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