From: Damien Cassou <damien.cassou@gmail.com>
To: 12817@debbugs.gnu.org
Subject: bug#12817: 24.2; The button library does not work on the header line
Date: Tue, 06 Nov 2012 17:59:35 +0100 [thread overview]
Message-ID: <877gpyllag.fsf@luz3.i-did-not-set--mail-host-address--so-tickle-me> (raw)
Hi,
the button library does not work if a button is created on the
header-line:
(require 'button)
(defun my-button-action (button)
(message "HERE I AM"))
(define-button-type 'my-button-type
'action #'my-button-action
'follow-link t)
(setq test-button (copy-sequence "CLICK ME"))
(make-text-button test-button nil
'type 'my-button-type)
(setq header-line-format test-button)
After evaluating these lines, a button appear with the text "CLICK ME"
in blue and underlined. But clicking this button does nothing. I was
expecting that clicking the button would trigger 'my-button-action and
display the message "HERE I AM".
There is a library that makes 'button work on header-line:
https://raw.github.com/tarsius/header-button/master/header-button.el
Thank you
In GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.13)
of 2012-11-06 on dubnium, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
Configured using:
`configure '--build' 'i686-linux-gnu' '--build' 'i686-linux-gnu'
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
'--localstatedir=/var/lib' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2/site-lisp:/usr/share/emacs/site-lisp'
'--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes'
'--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=i686-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
'CPPFLAGS=-D_FORTIFY_SOURCE=2''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<help-echo> <down-mouse-1> <mouse-1> <down-mouse-4>
<mouse-4> <double-down-mouse-4> <double-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-M-x C-l C-l
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-M-x C-n
C-n C-n C-n C-n C-n C-n C-n C-M-x C-n C-l C-l C-n C-n
C-n C-n C-n C-a C-SPC M-> C-w C-y M-y C-p C-k C-M-x
C-y C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-l C-a C-SPC C-n C-n C-f C-f C-x r
k C-p C-p <tab> C-n <tab> C-n <tab> M-v M-v C-v C-v
C-l C-p C-p C-p C-e C-n C-a C-k C-n C-SPC C-n C-n C-f
C-f C-f C-x r k C-p <tab> C-n <tab> C-e C-x C-e q C-p
C-p C-p C-p C-x C-e C-n C-n C-n C-n C-e C-x C-e <help-echo>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <help-echo>
<down-mouse-1> <mouse-1> C-n C-n C-n C-n C-a C-SPC
C-n C-n C-n C-f C-f C-f C-x r k C-e C-x C-e <help-echo>
<help-echo> <help-echo> <down-mouse-1> <mouse-1> <help-echo>
<down-mouse-4> <mouse-4> <down-mouse-4> <mouse-4> <down-mouse-4>
<mouse-4> <down-mouse-4> <mouse-4> <down-mouse-4> <mouse-4>
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double-mouse-4>
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4>
<triple-mouse-4> <down-mouse-1> <mouse-movement> <drag-mouse-1>
C-x 1 <down-mouse-1> <mouse-movement> <mouse-1> <help-echo>
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-1>
<mouse-1> <help-echo> <down-mouse-1> <mouse-1> <help-echo>
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-1>
<mouse-1> <help-echo> <down-mouse-5> <mouse-5> <double-down-mouse-5>
<double-mouse-5> <triple-down-mouse-5> <triple-mouse-5>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> C-p
C-p C-SPC C-p C-p C-p C-p C-a C-w C-x C-o C-n C-SPC
M-> <f2> <f2> <f2> C-x 1 C-x 1 C-p C-p C-p <tab> C-n
<tab> C-n <tab> <down-mouse-1> <mouse-1> C-h k <f2>
<f2> C-x 1 <down-mouse-1> <mouse-1> C-l <down-mouse-1>
<mouse-movement> <drag-mouse-1> M-x r e p o r t - e
m a <tab> <tab> <return>
Recent messages:
This button labeled `No me!' belongs to category `my-header-button'
byte-code: Beginning of buffer
Mark set
This button labeled `Click me!' belongs to category `header-button' [2 times]
This button labeled `No me!' belongs to category `my-header-button'
Mark set [2 times]
Autoscrolling is on.
Type C-x 1 to delete the help window.
Mark set
Making completion list...
Load-path shadows:
/usr/share/emacs/24.2/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/24.2/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.2/lisp/textmodes/flyspell
/usr/share/emacs/24.2/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.2/lisp/textmodes/ispell
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils two-column debug rect help-mode view
help-fns find-func jka-compr info easymenu edmacro kmacro cl time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
next reply other threads:[~2012-11-06 16:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-06 16:59 Damien Cassou [this message]
2012-12-04 20:19 ` bug#12817: 24.2; The button library does not work on the header line Stefan Monnier
2012-12-05 20:39 ` Jonas Bernoulli
2012-12-06 7:38 ` Damien Cassou
2012-12-06 20:11 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877gpyllag.fsf@luz3.i-did-not-set--mail-host-address--so-tickle-me \
--to=damien.cassou@gmail.com \
--cc=12817@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.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).