From: Eli Zaretskii <eliz@gnu.org>
To: pma <pma@rdorte.org>
Cc: 20508@debbugs.gnu.org
Subject: bug#20508: 24.4; image map properties not working as described
Date: Tue, 05 May 2015 19:32:01 +0300 [thread overview]
Message-ID: <83bnhzrnni.fsf@gnu.org> (raw)
In-Reply-To: <87pp6ffk5h.fsf@kamala.i-did-not-set--mail-host-address--so-tickle-me>
> From: pma <pma@rdorte.org>
> Date: Tue, 05 May 2015 11:28:26 +0200
>
>
> - emacs -Q
> - insert this function:
> (defun image-wipe-and-insert ()
> (interactive)
> (let ()
> (with-current-buffer (get-buffer-create "*an image area test buffer*")
> (switch-to-buffer (current-buffer))
> (erase-buffer)
> (insert-image (find-image '((:type png :file "/usr/share/emacs/24.4/etc/images/icons/hicolor/128x128/apps/emacs.png"
> :map '((rect . ((0 . 0) . (50 . 50))) anAreaID (:pointer hourglass :help-echo "You found an area!"))
> ;; :relief -20
> ;; :conversion laplace
> :margin (0 . 0)
> :pointer arrow)))))))
>
> - M-x image-wipe-and-insert
> - Point mouse into top left corner
> - results:
> - change of pointer, but not to hourglass;
> - no help-echo message.
It's a cockpit error: you should use 'pointer', not ':pointer' in the
first instance. IOW, this works for me (note the underlined part):
(defun image-wipe-and-insert ()
(interactive)
(let ()
(with-current-buffer (get-buffer-create "*an image area test buffer*")
(switch-to-buffer (current-buffer))
(erase-buffer)
(insert-image (find-image '((:type png :file "/usr/share/emacs/24.4/etc/images/icons/hicolor/128x128/apps/emacs.png"
:map '((rect . ((0 . 0) . (50 . 50))) anAreaID (pointer hourglass :help-echo "You found an area!"))
;; ^^^^^^^
;; :relief -20
;; :conversion laplace
:margin (0 . 0)
:pointer arrow)))))))
(Yes, it's confusing to have ':pointer' on the top level and 'pointer'
inside the value for ':map'. But the manual correctly says 'pointer'
in the latter case, so at least the documentation is consistent with
the code.)
next prev parent reply other threads:[~2015-05-05 16:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 9:28 bug#20508: 24.4; image map properties not working as described pma
2015-05-05 16:32 ` Eli Zaretskii [this message]
2015-05-05 17:27 ` patrick mc allister
2015-05-05 19:14 ` Eli Zaretskii
2015-05-06 7:15 ` patrick mc allister
2015-05-06 15:24 ` Eli Zaretskii
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=83bnhzrnni.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=20508@debbugs.gnu.org \
--cc=pma@rdorte.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).