Gnus development mailing list
 help / color / mirror / Atom feed
* gnus & (windmove-default-keybindings)
@ 2015-12-05  8:31 Dave
  2015-12-05  8:44 ` Dave
  0 siblings, 1 reply; 4+ messages in thread
From: Dave @ 2015-12-05  8:31 UTC (permalink / raw)
  To: ding

I've turned on:

(windmove-default-keybindings 'meta)

which allows sane keys for moving between windows (M-<up>, M-<dn>,
M-<rt>, M-<lft>).  All works well, except for the article summary buffer
in Gnus, which treats M-<up> and M-<dn> as <up> and <dn>.  (Though
M-<rt> and M-<lft> behave properly.)

Can anyone give me some pointers of how to proceed?

Thanks,
Dave.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gnus & (windmove-default-keybindings)
  2015-12-05  8:31 gnus & (windmove-default-keybindings) Dave
@ 2015-12-05  8:44 ` Dave
  2015-12-05 13:38   ` Eric S Fraga
  0 siblings, 1 reply; 4+ messages in thread
From: Dave @ 2015-12-05  8:44 UTC (permalink / raw)
  To: ding

> I've turned on:
> 
> (windmove-default-keybindings 'meta)
> 
> which allows sane keys for moving between windows (M-<up>, M-<dn>,
> M-<rt>, M-<lft>).  All works well, except for the article summary buffer
> in Gnus, which treats M-<up> and M-<dn> as <up> and <dn>.  (Though
> M-<rt> and M-<lft> behave properly.)

I should add that the command (windmove-down) works fine.  It's just the
bound key that fails.  Additionally, using global-set-key to
specifically set the binding also fails.

> Can anyone give me some pointers of how to proceed?
> 
> Thanks,
> Dave.

Dave.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gnus & (windmove-default-keybindings)
  2015-12-05  8:44 ` Dave
@ 2015-12-05 13:38   ` Eric S Fraga
  2015-12-10  8:40     ` Dave
  0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2015-12-05 13:38 UTC (permalink / raw)
  To: ding

On Saturday,  5 Dec 2015 at 00:44, Dave wrote:
>> I've turned on:
>> 
>
>> (windmove-default-keybindings 'meta)
>> 
>> which allows sane keys for moving between windows (M-<up>, M-<dn>,
>> M-<rt>, M-<lft>).  All works well, except for the article summary buffer
>> in Gnus, which treats M-<up> and M-<dn> as <up> and <dn>.  (Though
>> M-<rt> and M-<lft> behave properly.)
>
> I should add that the command (windmove-down) works fine.  It's just the
> bound key that fails.  Additionally, using global-set-key to
> specifically set the binding also fails.
>
>> Can anyone give me some pointers of how to proceed?

You could set up a hook for the individual gnus views (group, summary)
to bind M-<up> and M-<down> to the corresponding windmove commands,
along the lines of


#+begin_src emacs-lisp
  ;; From: pmlists@free.fr (Peter Münster)
  ;; Newsgroups: gnu.emacs.gnus
  ;; Message-ID: <87lj1wkv2q.fsf@micropit.couberia.bzh>
  (defun esf/alter-summary-map ()
    (local-set-key ":" 'bbdb-mua-display-records)
    (local-set-key "d" 'gnus-summary-delete-article)
    (local-set-key "e" 'gnus-summary-mark-as-expirable)
    (local-set-key "u" 'gnus-summary-put-mark-as-unread) ;-next-unread
    (local-set-key "w" 'gnus-article-fill-long-lines)
    )
  (add-hook 'gnus-summary-mode-hook 'esf/alter-summary-map)
#+end_src

HTH,
eric

-- 
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 25.0.50.2 + Ma Gnus v0.14 + evil-git-ff74cfb
: BBDB version 3.1.2 (2014-04-28 23:20:47+00:00)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gnus & (windmove-default-keybindings)
  2015-12-05 13:38   ` Eric S Fraga
@ 2015-12-10  8:40     ` Dave
  0 siblings, 0 replies; 4+ messages in thread
From: Dave @ 2015-12-10  8:40 UTC (permalink / raw)
  To: ding

On 12/05/2015 05:38 AM, Eric S Fraga wrote:
> On Saturday,  5 Dec 2015 at 00:44, Dave wrote:
>>> I've turned on:
>>> (windmove-default-keybindings 'meta)
>>>
>>> which allows sane keys for moving between windows (M-<up>, M-<dn>,
>>> M-<rt>, M-<lft>).  All works well, except for the article summary buffer
>>> in Gnus, which treats M-<up> and M-<dn> as <up> and <dn>.  (Though
>>> M-<rt> and M-<lft> behave properly.)
>>
>> I should add that the command (windmove-down) works fine.  It's just the
>> bound key that fails.  Additionally, using global-set-key to
>> specifically set the binding also fails.
>>
>>> Can anyone give me some pointers of how to proceed?
> 
> You could set up a hook for the individual gnus views (group, summary)
> to bind M-<up> and M-<down> to the corresponding windmove commands,
> along the lines of
> 
> #+begin_src emacs-lisp
>   ;; From: pmlists@free.fr (Peter Münster)
>   ;; Newsgroups: gnu.emacs.gnus
>   ;; Message-ID: <87lj1wkv2q.fsf@micropit.couberia.bzh>
>   (defun esf/alter-summary-map ()
>     (local-set-key ":" 'bbdb-mua-display-records)
>     (local-set-key "d" 'gnus-summary-delete-article)
>     (local-set-key "e" 'gnus-summary-mark-as-expirable)
>     (local-set-key "u" 'gnus-summary-put-mark-as-unread) ;-next-unread
>     (local-set-key "w" 'gnus-article-fill-long-lines)
>     )
>   (add-hook 'gnus-summary-mode-hook 'esf/alter-summary-map)
> #+end_src
> 
> HTH,
> eric

Much appreciated, Eric.  This works:

(defun windmove-summary-map ()
  (local-set-key [(meta up)] 'windmove-up)
  (local-set-key [(meta down)] 'windmove-down)
  )
(add-hook 'gnus-summary-mode-hook 'windmove-summary-map)

I guess there must be something in the local key map that was overriding
the global-set-key

Dave.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-10  8:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-05  8:31 gnus & (windmove-default-keybindings) Dave
2015-12-05  8:44 ` Dave
2015-12-05 13:38   ` Eric S Fraga
2015-12-10  8:40     ` Dave

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 NNTP newsgroup(s).