From: Ralf Angeli <angeli@caeruleus.net>
To: emacs-pretest-bug@gnu.org
Subject: 23.0.60; Image in before-string of overlay interferes with keymap
Date: Wed, 06 Feb 2008 22:30:17 +0100 [thread overview]
Message-ID: <87fxw593iu.fsf@photon.caeruleus.net> (raw)
As soon as an image is used in the before-string property of an overlay,
mouse clicks as defined in a keymap for the propertized string are not
recognized anymore.
In order to reproduce this, start Emacs with `emacs -Q', execute the
code snippet included below and click with mouse-1, mouse-2 or mouse-3
on the image in the new buffer. If the `display' property is omitted
from the code below, clicking on the letter "A" after executing the code
will show "Mouse-1", "Mouse-2" or "Mouse-3" in the echo area, depending
on which mouse button was used when clicking on it.
(progn
(pop-to-buffer "*foo*")
(insert "xxx")
(let ((ov (make-overlay 1 4))
(map (make-sparse-keymap)))
(define-key map [mouse-1] (lambda () (interactive) (message "Mouse-1")))
(define-key map [mouse-2] (lambda () (interactive) (message "Mouse-2")))
(define-key map [mouse-3] (lambda () (interactive) (message "Mouse-3")))
(overlay-put ov 'before-string
(propertize
"A"
'keymap map
'display `(image :type xpm
:file ,(concat data-directory
"/images/attach.xpm"))
'mouse-face 'highlight))))
In GNU Emacs 23.0.60.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.12.7)
of 2008-02-06 on photon
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure '--enable-font-backend''
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
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
<mouse-1> <down-mouse-2> <mouse-2> C-_ <down-mouse-3>
<mouse-3> C-x o C-p C-p C-p C-p C-f C-SPC C-n C-n C-n
C-p C-p C-p C-SPC C-SPC C-n C-n C-n M-; C-x 0 C-x k
<return> C-n C-b C-x C-e <down-mouse-1> <mouse-1> <down-mouse-2>
<mouse-2> <down-mouse-3> <mouse-3> C-x 1 M-x r e p
o r t - e m <tab> <return> C-g C-x k <return> 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-a C-SPC C-SPC C-n C-n C-n C-n M-w M-> <return> 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-n C-n C-n C-n C-n C-n C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-SPC C-SPC 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
M-w <return> C-y C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-p C-p C-p C-p C-p C-p C-p C-b <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> d i s p l a y 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-b C-x C-e <down-mouse-1>
<mouse-1> <down-mouse-2> <mouse-2> <down-mouse-3> <mouse-3>
C-x k <return> C-x 0 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-SPC C-SPC C-n C-n C-n M-; C-n C-n C-b C-x C-e <down-mouse-2>
<mouse-2> C-x k <return> C-x 0 C-n C-n C-n C-n C-n
C-n C-n C-n C-SPC M-> C-SPC C-SPC 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-p C-w
C-p C-p C-p C-p C-SPC C-SPC C-n C-n C-n M-; M-< C-SPC
C-M-f M-w M-x r e p o r t - e m a <tab> <return>
Recent messages:
Mouse-3
Mark set
Transient-mark-mode temporarily enabled
#("A" 0 1 (mouse-face highlight display (image :type xpm :file "/usr/src/emacs/etc//images/attach.xpm") keymap (keymap (mouse-3 lambda nil ... ...) (mouse-2 lambda nil ... ...) (mouse-1 lambda nil ... ...))))
Mouse-2
Mark set [3 times]
Transient-mark-mode temporarily enabled
Mark set
Transient-mark-mode temporarily enabled
Mark set [2 times]
--
Ralf
next reply other threads:[~2008-02-06 21:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 21:30 Ralf Angeli [this message]
2008-02-10 18:42 ` 23.0.60; Image in before-string of overlay interferes with keymap Richard Stallman
2008-02-25 18:07 ` Ralf Angeli
2008-02-28 19:03 ` Ralf Angeli
2008-02-29 10:06 ` YAMAMOTO Mitsuharu
2008-03-01 10:49 ` Ralf Angeli
2008-03-02 4:10 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fxw593iu.fsf@photon.caeruleus.net \
--to=angeli@caeruleus.net \
--cc=emacs-pretest-bug@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.