* bug#30148: 26.0.91; EWW binding for `r'
@ 2018-01-17 19:45 Charles A. Roelli
2018-04-12 22:29 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Charles A. Roelli @ 2018-01-17 19:45 UTC (permalink / raw)
To: 30148
Normally `l' and `r' in "EWW" go back and forward through the buffer's
history. But when point is on an image (or, oddly, a link -- see
below), `r' instead runs `image-rotate'. Since there are quite some
keys left unbound in both eww-mode-map and in shr-image-map, one of
these bindings should budge.
Also, I do not understand why eww-link-keymap is a copy of
shr-image-map, when so many commands that could apply to images do not
apply to links:
(defvar eww-link-keymap
(let ((map (copy-keymap shr-image-map)))
(define-key map "\r" 'eww-follow-link)
map))
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#30148: 26.0.91; EWW binding for `r'
2018-01-17 19:45 bug#30148: 26.0.91; EWW binding for `r' Charles A. Roelli
@ 2018-04-12 22:29 ` Lars Ingebrigtsen
2018-04-13 22:17 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-12 22:29 UTC (permalink / raw)
To: Charles A. Roelli; +Cc: 30148
charles@aurox.ch (Charles A. Roelli) writes:
> Normally `l' and `r' in "EWW" go back and forward through the buffer's
> history. But when point is on an image (or, oddly, a link -- see
> below), `r' instead runs `image-rotate'. Since there are quite some
> keys left unbound in both eww-mode-map and in shr-image-map, one of
> these bindings should budge.
You can have images in other buffers, too, and the `r' for "rotate"
seems very natural. And `r' for "return" is a generally accepted
command in many Emacs modes, so I don't really know which one to change.
> Also, I do not understand why eww-link-keymap is a copy of
> shr-image-map, when so many commands that could apply to images do not
> apply to links:
>
> (defvar eww-link-keymap
> (let ((map (copy-keymap shr-image-map)))
> (define-key map "\r" 'eww-follow-link)
> map))
It's presumably to have the image commands not disappear if there's an
image in a link. Too bad Emacs doesn't have a way to add several local
keymaps using text properties...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#30148: 26.0.91; EWW binding for `r'
2018-04-12 22:29 ` Lars Ingebrigtsen
@ 2018-04-13 22:17 ` Lars Ingebrigtsen
0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-13 22:17 UTC (permalink / raw)
To: Charles A. Roelli; +Cc: 30148
Lars Ingebrigtsen <larsi@gnus.org> writes:
>> Also, I do not understand why eww-link-keymap is a copy of
>> shr-image-map, when so many commands that could apply to images do not
>> apply to links:
>>
>> (defvar eww-link-keymap
>> (let ((map (copy-keymap shr-image-map)))
>> (define-key map "\r" 'eww-follow-link)
>> map))
>
> It's presumably to have the image commands not disappear if there's an
> image in a link. Too bad Emacs doesn't have a way to add several local
> keymaps using text properties...
I've now tweaked this to make the image commands go away on non-image
links in eww.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-13 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17 19:45 bug#30148: 26.0.91; EWW binding for `r' Charles A. Roelli
2018-04-12 22:29 ` Lars Ingebrigtsen
2018-04-13 22:17 ` Lars Ingebrigtsen
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).