From: Katsumi Yamaoka <yamaoka@jpl.org>
To: 25091@debbugs.gnu.org
Cc: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Subject: bug#25091: 26.0.50; shr-map hides gnus-article keys
Date: Fri, 02 Dec 2016 18:08:39 +0900 [thread overview]
Message-ID: <b4ma8cebsvc.fsf@jpl.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
Hi,
Jidanni mailed me that TAB doesn't move point to attachments
existing in the bottom of an html article of Gnus like this:
,---- html part
|......
| ...link...
| ......
| ...link...
| ......
`----
[2. application/pdf; foo.pdf]...
[3. application/octet-stream; bar.txt]...
An example is attached.
Each link has `shr-map' that overrides `gnus-article-mode-map'
of which the parent is `widget-keymap'. TAB on a link invokes
`shr-next-link', not `widget-forward', so performing it on the
last link doesn't move point to the attachment, whereas TAB on
the html part other than links, i.e., `widget-forward', moves
point to the next link. I think the behavior should be the same
as that of non-html articles.
I'm not quite sure if it is the right way, but tried fixing it
as follows:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1248 bytes --]
--- shr.el~ 2016-11-29 10:20:10.401598400 +0000
+++ shr.el 2016-12-02 09:04:23.642006900 +0000
@@ -344,8 +344,13 @@
((or (eobp)
(not (setq skip (text-property-not-all (point) (point-max)
'shr-url nil))))
- (goto-char start)
- (message "No next link"))
+ (let ((command (lookup-key (current-local-map) (this-command-keys))))
+ (unless (and command
+ (condition-case nil
+ (progn (call-interactively command) t)
+ (error nil)))
+ (goto-char start)
+ (message "No next link"))))
(t
(goto-char skip)
(message "%s" (get-text-property (point) 'help-echo))))))
@@ -364,9 +369,13 @@
(not (setq found (get-text-property (point) 'help-echo))))
(forward-char -1))
(if (not found)
- (progn
- (message "No previous link")
- (goto-char start))
+ (let ((command (lookup-key (current-local-map) (this-command-keys))))
+ (unless (and command
+ (condition-case nil
+ (progn (call-interactively command) t)
+ (error nil)))
+ (message "No previous link")
+ (goto-char start)))
;; Put point at the start of the link.
(while (and (not (bobp))
(get-text-property (point) 'help-echo))
[-- Attachment #3: html+attachments.gz --]
[-- Type: application/x-gunzip, Size: 76029 bytes --]
next reply other threads:[~2016-12-02 9:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 9:08 Katsumi Yamaoka [this message]
2016-12-03 2:26 ` bug#25091: 26.0.50; shr-map hides gnus-article keys npostavs
2016-12-05 6:57 ` Katsumi Yamaoka
2016-12-05 14:06 ` npostavs
2016-12-05 22:59 ` Katsumi Yamaoka
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=b4ma8cebsvc.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=25091@debbugs.gnu.org \
--cc=jidanni@jidanni.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.