Gnus development mailing list
 help / color / mirror / Atom feed
* Re: remapping 'S' in summary-mode-map does not stick
       [not found] <m2tx4guh7e.fsf@polytechnique.org>
@ 2014-09-10  7:40 ` Eric S Fraga
  2014-09-10 12:21   ` Alan Schmitt
  0 siblings, 1 reply; 2+ messages in thread
From: Eric S Fraga @ 2014-09-10  7:40 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

On Wednesday, 10 Sep 2014 at 08:23, Alan Schmitt wrote:
> Hello,
>
> I remap several key bindings for gnus-summary-mode-map and most of them
> work, with one exception: binding 'S'.
>
> This is what I have for this binding in my .gnus.el:
>
> (define-key gnus-summary-mode-map (kbd "S") 'gnus-summary-next-article)
>
> I could set that binding in gnus-summary-mode-hook, but it bothers me to
> set is every time I enter summary mode and not once and for all.

The reality is that this is the only way to do it, as far as I
understand.  I remap my keys in mode hooks for summary and article
modes.  For instance:

#+begin_src emacs-lisp
  (defun esf/alter-summary-map ()
    (local-set-key "d" 'gnus-summary-delete-article)
    (local-set-key "d" 'gnus-summary-expand-window)
    (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

-- 
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 24.4.50.1 + Ma Gnus v0.12 + evil-git-7c4c180
: BBDB version 3.1.2 (2014-05-06 11:45:08 -0500)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]

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

* Re: remapping 'S' in summary-mode-map does not stick
  2014-09-10  7:40 ` remapping 'S' in summary-mode-map does not stick Eric S Fraga
@ 2014-09-10 12:21   ` Alan Schmitt
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Schmitt @ 2014-09-10 12:21 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

On 2014-09-10 08:40, Eric S Fraga <e.fraga@ucl.ac.uk> writes:

>> I could set that binding in gnus-summary-mode-hook, but it bothers me to
>> set is every time I enter summary mode and not once and for all.
>
> The reality is that this is the only way to do it, as far as I
> understand.  I remap my keys in mode hooks for summary and article
> modes.  For instance:
>
> #+begin_src emacs-lisp
>   (defun esf/alter-summary-map ()
>     (local-set-key "d" 'gnus-summary-delete-article)
>     (local-set-key "d" 'gnus-summary-expand-window)
>     (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

Thank you for this suggestion. I was using an anonymous function, but
it's much cleaner with a named one.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

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

end of thread, other threads:[~2014-09-10 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m2tx4guh7e.fsf@polytechnique.org>
2014-09-10  7:40 ` remapping 'S' in summary-mode-map does not stick Eric S Fraga
2014-09-10 12:21   ` Alan Schmitt

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).