[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: key remapping
- From: Max <maxim.suraev@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 20 Mar 2014 16:05:02 +0100
- X-ml-name: emacs-w3m
- X-mail-count: 12298
- References: <53297D9D.4060505@xxxxxxxxxxxxxxxxxxx> <b4m1txxsu9z.fsf@xxxxxxx> <532AECE9.20504@xxxxxxxxxxxxxxxxxxx> <878us5558p.fsf@xxxxxx>
20.03.2014 15:12, Michael Heerdegen пишет:
> Hi,
>
> let me first say that you might regret redefining mouse keys this
> way. mouse-2 following links is a principle in the whole of Emacs (Info,
> dired, ...) You might not want to have inconsistent bindings in
> different modes.
I most certainly do - the convenience of using browser the way I'm already
comfortable with outweighs aesthetic displeasure from inconsistencies. It's more
likely that I'll change behavior of info mode :)
> BTW, to be honest, I don't like this behavior much,
> too.
>
> In w3m, the standard binding for opening a session in the background is
> shift mouse-2.
>
> If you nonetheless want what you described, I'd do it like this:
>
> --8<---------------cut here---------------start------------->8---
> (add-hook
> 'w3m-mode-hook
> (lambda ()
> (setq w3m-new-session-in-background t)
> (setq-local mouse-1-click-follows-link nil)
> (local-set-key [mouse-1] #'w3m-mouse-view-this-url)
> (local-set-key [mouse-2] #'w3m-mouse-view-this-url-new-session)))
> --8<---------------cut here---------------end--------------->8---
>
Thanks, that seems to work fine but I'm unable to combine it with previous advice:
how do I make use of backspace to go to previous page in the same buffer?
While I'm at it - which function in w3m responsible for switching tabs? I'd like to
bind it ctrl+tab
Also, could you help to clarify terminological confusion? I thought that "session" is
a collection of tabs currently opened (or stored somewhere) but the function to open
stuff in new tab called "...-url-new-session" - why so?
thank you,
Max.