From: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
To: 21024@debbugs.gnu.org
Subject: bug#21024: help-xref-button in header line doesn't work (PATCH attached)
Date: Thu, 09 Jul 2015 23:04:07 +0530 [thread overview]
Message-ID: <559EB08F.1080507@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]
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 #2: help-mode.diff --]
[-- Type: text/x-patch, Size: 393 bytes --]
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index e1fc9fd..ac74e03 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -107,7 +107,7 @@ The format is (FUNCTION ARGS...).")
(defun help-button-action (button)
"Call BUTTON's help function."
- (help-do-xref (button-start button)
+ (help-do-xref nil
(button-get button 'help-function)
(button-get button 'help-args)))
next reply other threads:[~2015-07-09 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 17:34 Vaidheeswaran C [this message]
2016-02-23 9:46 ` bug#21024: help-xref-button in header line doesn't work (PATCH attached) Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=559EB08F.1080507@gmail.com \
--to=vaidheeswaran.chinnaraju@gmail.com \
--cc=21024@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.