From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84909 Path: news.gmane.org!not-for-mail From: Alan Schmitt Newsgroups: gmane.emacs.gnus.general Subject: Re: remapping 'S' in summary-mode-map does not stick Date: Wed, 10 Sep 2014 14:21:10 +0200 Message-ID: References: <878ulrkjnl.fsf@ucl.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1410351763 30679 80.91.229.3 (10 Sep 2014 12:22:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Sep 2014 12:22:43 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33153@lists.math.uh.edu Wed Sep 10 14:22:36 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XRgum-000598-9R for ding-account@gmane.org; Wed, 10 Sep 2014 14:22:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1XRgu6-0004PY-0j; Wed, 10 Sep 2014 07:21:42 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1XRgu4-0004PP-RU for ding@lists.math.uh.edu; Wed, 10 Sep 2014 07:21:40 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XRgu2-0004LP-C4 for ding@lists.math.uh.edu; Wed, 10 Sep 2014 07:21:40 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1XRgu0-0002hO-FY for ding@gnus.org; Wed, 10 Sep 2014 14:21:36 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XRgu0-0004cJ-6q for ding@gnus.org; Wed, 10 Sep 2014 14:21:36 +0200 Original-Received: from top-wifi.irisa.fr ([131.254.66.192]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Sep 2014 14:21:36 +0200 Original-Received: from alan.schmitt by top-wifi.irisa.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Sep 2014 14:21:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: top-wifi.irisa.fr User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (darwin) Cancel-Lock: sha1:YQ/gDg52UVpff8vT/Qf3pIYsvlg= X-Spam-Score: -5.4 (-----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84909 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2014-09-10 08:40, Eric S Fraga 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 =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBCgAGBQJUEEJBAAoJEAQNCjtO0uXHJ4UIAIBG6GSMT9Yu4AnaPZ21EPEj u5pVtv2KyJusjyMrnLC7RIdWroS94FjlVgvvmA+W8fDnsEhAN7zW66PbOxvJO5c9 0s2RKvbKhCSX5DT8yiuiWYj0J/N4IJPhUjYjKUsyVAWL6aZKFCk+yyfxN4XdlQ8J 6i3VYLffFjYmNkoTq79SRWCTcvqdcdlkvOo0z6c8yqjbbw5SissKfGAPPzoIDkzB lvRZmrCIBkeT49Xu5xZYyQHoJGyoV7/F6ygFFz9pNOUD3zKvOCUieiJ6kB+Ad/ty WNy3wGJGBQleTsgCfGe1YAPuJb7if+fBpqudxTlSMcLi/OyJOFzY5QPKDKO7ooU= =d4HD -----END PGP SIGNATURE----- --=-=-=--