GNU bug report logs -
#23964
25.1.50; `+' no longer works on images in Gnus article buffers
Previous Next
Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Wed, 13 Jul 2016 06:53:01 UTC
Severity: normal
Found in version 25.1.50
Fixed in version 25.2
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23964 in the body.
You can then email your comments to 23964 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Wed, 13 Jul 2016 06:53:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lars Ingebrigtsen <larsi <at> gnus.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 13 Jul 2016 06:53:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This started after commit ea512a7c2cd30206dd509b193c9faaba25640180 with
the changes in mm-convert-shr-links, but I haven't examined what's going
on.
In GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
of 2016-07-12 built on stories
Repository revision: df7774be39af76d3072a0278ef815a47bf50dfe9
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description: Debian GNU/Linux 8.5 (jessie)
Recent messages:
/home/larsi/src/emacs/trunk/lisp/gnus/mm-decode.el seems up-to-date. Revert anyway? (y or n) y
Finding changes in /home/larsi/src/emacs/trunk/lisp/gnus/mm-decode.el...
No changes between working revision and workfile
Reverting /home/larsi/src/emacs/trunk/lisp/gnus/mm-decode.el...done
(No changes need to be saved)
Finding changes in /home/larsi/src/emacs/trunk/lisp/gnus/mm-decode.el...
No changes between working revision and workfile
o is undefined
Mark set
Making completion list...
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Git-Log-View
Minor modes in effect:
diff-auto-refine-mode: t
global-whitespace-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-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
buffer-read-only: t
line-number-mode: t
Load-path shadows:
/home/larsi/src/cddb.el/expect hides /home/larsi/lisp/expect
/home/larsi/src/cddb.el/captitle hides /home/larsi/lisp/captitle
/home/larsi/src/clock.el/clock hides /home/larsi/lisp/clock
~/pgnus/contrib/vcard hides /home/larsi/lisp/vcard
/home/larsi/src/pvr.el/pvr hides /home/larsi/lisp/pvr
~/lisp/zenirc-2.112/src/zenirc-example hides /home/larsi/lisp/zenirc-example
~/pgnus/contrib/compface hides /home/larsi/src/emacs/trunk/lisp/image/compface
Features:
(shadow emacsbug log-view pcvs-util vc vc-dispatcher vc-git diff-mode
map eieio-opt speedbar sb-image ezimage dframe find-func thingatpt etags
flow-fill xref project ring pp sh-script smie executable misearch
multi-isearch eww mailalias smtpmail sendmail ecomplete gnus-html
url-queue help-fns radix-tree url-cache shr-color color mm-archive sort
smiley ansi-color gnus-cite gnus-async gnus-dup qp gnus-ml gmane
spam-gmane dns mm-url disp-table copyright vc-cvs gnus-fun gnus-mdrtn
gnus-topic pop3 nndoc nnmbox utf-7 nnml nnfolder network-stream starttls
nnir spam-report spam spam-stat gnus-uu yenc gnus-delay gnus-draft
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum
nndraft nnmh gnus-group gnus-undo gnus-start gnus-cloud nnimap utf7
netrc nnoo parse-time gnus-spec gnus-win nnmail gnus-int gnus-range
mail-source message format-spec rfc822 mml mml-sec epa epg mailabbrev
gmm-utils mailheader gnus nnheader gnus-util rmail rmail-loaddefs
mail-utils whitespace movie mkv shr svg imdb dom pvr debug debbugs-gnu
easy-mmode derived debbugs soap-client mm-decode mm-bodies mm-encode
url-http tls gnutls url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm puny url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap warnings rng-xsd rng-dt rng-util xsd-regexp xml ido flyspell
ispell benchmark w3m browse-url doc-view subr-x dired dired-loaddefs
image-mode timezone w3m-hist w3m-fb w3m-ems wid-edit w3m-ccl ccl
w3m-favicon w3m-image w3m-proc w3m-util add-log mail-extr jka-compr cl
finder-inf package epg-config url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq
byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv
cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)
Memory information:
((conses 16 1233450 110298)
(symbols 48 172606 205)
(miscs 40 293 1193)
(strings 32 264070 10714)
(string-bytes 1 24323386)
(vectors 16 43931)
(vector-slots 8 1801005 216852)
(floats 8 7154 1257)
(intervals 56 105894 986)
(buffers 976 84)
(heap 1024 189423 116274))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Thu, 14 Jul 2016 02:10:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 23964 <at> debbugs.gnu.org (full text, mbox):
On Wed, 13 Jul 2016 08:52:25 +0200, Lars Ingebrigtsen wrote:
> This started after commit ea512a7c2cd30206dd509b193c9faaba25640180 with
> the changes in mm-convert-shr-links, but I haven't examined what's going
> on.
Because the change was done first in emacs-25[1], in which shr-map
(not shr-image-map) was used, and then merged into master[2].
[1] <http://lists.gnu.org/archive/html/emacs-diffs/2016-06/msg00173.html>
[2] <http://lists.gnu.org/archive/html/emacs-diffs/2016-06/msg00203.html>
I'll fix it in master.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Wed, 20 Jul 2016 12:48:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 23964 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
> On Wed, 13 Jul 2016 08:52:25 +0200, Lars Ingebrigtsen wrote:
>> This started after commit ea512a7c2cd30206dd509b193c9faaba25640180 with
>> the changes in mm-convert-shr-links, but I haven't examined what's going
>> on.
>
> Because the change was done first in emacs-25[1], in which shr-map
> (not shr-image-map) was used, and then merged into master[2].
>
> [1] <http://lists.gnu.org/archive/html/emacs-diffs/2016-06/msg00173.html>
> [2] <http://lists.gnu.org/archive/html/emacs-diffs/2016-06/msg00203.html>
>
> I'll fix it in master.
Hm... it still doesn't quite seem to work. It works for plain <img>
things, but if it's <a href=...><img></a> then `+' from image-map
doesn't work, and `a' from `shr-map' doesn't work, either (in a Gnus
article buffer).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Thu, 21 Jul 2016 08:47:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 23964 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, 20 Jul 2016 14:47:38 +0200, Lars Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
>> I'll fix it in master.
> Hm... it still doesn't quite seem to work. It works for plain <img>
> things, but if it's <a href=...><img></a> then `+' from image-map
> doesn't work, and `a' from `shr-map' doesn't work, either (in a Gnus
> article buffer).
I realized `+' works for some html mails but doesn't for others.
In a mail in which `+' works, the keymap is put on an image.
However, the keymap is put on the right hand neighbour character
(usually a LF character) of the image in a mail where `+' doesn't
work. I'll work it for more...
Here are two examples:
[Message part 2 (application/octet-stream, attachment)]
[Message part 3 (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Fri, 22 Jul 2016 11:09:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 23964 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 21 Jul 2016 17:46:18 +0900, Katsumi Yamaoka wrote:
> I realized `+' works for some html mails but doesn't for others.
I'm not quite sure this is the right approach, but I seem to have
found the cause and the solution. `shr-image-fetched', that
`shr-tag-img' calls, overrides the keymap text property on an
image with the value that was there before inserting the image,
that is, nil. Could you please test this patch?
[Message part 2 (text/x-patch, inline)]
--- shr.el~ 2016-07-21 08:35:17.668496000 +0000
+++ shr.el 2016-07-22 11:05:56.349491100 +0000
@@ -937,7 +937,7 @@
(while properties
(let ((type (pop properties))
(value (pop properties)))
- (unless (memq type '(display image-size))
+ (unless (memq type '(display image-size keymap))
(put-text-property start (point) type value))))))))))
(kill-buffer image-buffer)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Fri, 22 Jul 2016 11:12:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 23964 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
> I'm not quite sure this is the right approach, but I seem to have
> found the cause and the solution. `shr-image-fetched', that
> `shr-tag-img' calls, overrides the keymap text property on an
> image with the value that was there before inserting the image,
> that is, nil. Could you please test this patch?
>
> --- shr.el~ 2016-07-21 08:35:17.668496000 +0000
> +++ shr.el 2016-07-22 11:05:56.349491100 +0000
> @@ -937,7 +937,7 @@
> (while properties
> (let ((type (pop properties))
> (value (pop properties)))
> - (unless (memq type '(display image-size))
> + (unless (memq type '(display image-size keymap))
Yes, this seems to fix the problem. Thanks!
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Sun, 24 Jul 2016 08:29:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 23964 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
> I'm not quite sure this is the right approach, but I seem to have
> found the cause and the solution. `shr-image-fetched', that
> `shr-tag-img' calls, overrides the keymap text property on an
> image with the value that was there before inserting the image,
> that is, nil. Could you please test this patch?
It works for `+', but commands like `a' and `RET' no still doesn't work
on <a><img></a> links. :-)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Sun, 24 Jul 2016 22:54:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 23964 <at> debbugs.gnu.org (full text, mbox):
On Sun, 24 Jul 2016 10:27:51 +0200, Lars Ingebrigtsen wrote:
> It works for `+', but commands like `a' and `RET' no still doesn't work
> on <a><img></a> links. :-)
I was confused about what key bindings should be there. :-) But
this would probably be the right way:
--8<---------------cut here---------------start------------->8---
--- mm-decode.el~ 2016-07-14 02:18:17.358607500 +0000
+++ mm-decode.el 2016-07-24 22:48:23.134292500 +0000
@@ -1853,8 +1853,6 @@
:help-echo (get-text-property start 'help-echo)
:keymap (setq keymap (copy-keymap shr-image-map))
(get-text-property start 'shr-url))
- ;; Remove keymap that `shr-urlify' adds.
- (put-text-property start end 'keymap nil)
;; Mask keys that launch `widget-button-click'.
;; Those bindings are provided by `widget-keymap'
;; that is a parent of `gnus-article-mode-map'.
--8<---------------cut here---------------end--------------->8---
(Don't apply my last patch to shr.el.)
How about it?
This used to be making `local-map', not `keymap', void:
<http://article.gmane.org/gmane.emacs.diffs/136052>
The reason I did it was there's no code using `local-map', and
so it was never effective. So, the patch above only restores
the old behavior. :-)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Mon, 25 Jul 2016 18:45:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 23964 <at> debbugs.gnu.org (full text, mbox):
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
> - ;; Remove keymap that `shr-urlify' adds.
> - (put-text-property start end 'keymap nil)
Yes, with this patch all they keys seem to be there...
> This used to be making `local-map', not `keymap', void:
> <http://article.gmane.org/gmane.emacs.diffs/136052>
> The reason I did it was there's no code using `local-map', and
> so it was never effective. So, the patch above only restores
> the old behavior. :-)
Ah, I see.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23964
; Package
emacs
.
(Mon, 25 Jul 2016 23:51:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 23964 <at> debbugs.gnu.org (full text, mbox):
On Mon, 25 Jul 2016 20:44:27 +0200, Lars Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
>> - ;; Remove keymap that `shr-urlify' adds.
>> - (put-text-property start end 'keymap nil)
> Yes, with this patch all they keys seem to be there...
Thank you for the verification. I'v committed it in master.
And I asked emacs-devel if I can backport it to emacs-25.
Regards,
bug marked as fixed in version 25.2, send any further explanations to
23964 <at> debbugs.gnu.org and Lars Ingebrigtsen <larsi <at> gnus.org>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:34:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 01 Jan 2017 12:24:20 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 168 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.