* .emacs keybindings in gnus
@ 2007-08-27 13:29 peter hodgson
2007-08-27 13:59 ` Michaël Cadilhac
0 siblings, 1 reply; 3+ messages in thread
From: peter hodgson @ 2007-08-27 13:29 UTC (permalink / raw)
To: help-gnu-emacs
distro/release: ubuntu/feisty
emacs21 21.4a+1-2ubunt
emacsen-common 1.4.17
gnus 5.11+v0.5.dfsg
[NB so says "dpkg -l gnus",
but "M-x gnus-version" in gnus yields:
"No Gnus v0.6"
--------------------------------
Each new version of gnus resists one or another of my .emacs key bindings.
This time it's next-line, previous-line, end-of-line.
I can impose them, each time I load gnus, by typing:
'M-x local-set-key'
and then setting the key bindings by hand,
1/ in the summary buffer, and
2/ in the *mail* buffer
[which says (Message MML Fly Abbrev Fill), and which I assume is the
"message" buffer, not the "article" buffer.]
But I would like to hardcode them into my .gnus.el file.
I tried:
(define-key gnus-summary-mode-map "\ei" 'previous-line)
(define-key gnus-summary-mode-map "\en" 'next-line)
(define-key gnus-message-mode-map "\en" 'next-line)
(define-key gnus-message-mode-map "\e;" 'end-of-line)
[also 'gnus-article-mode-map' instead of 'gnus-message-mode-map']
THERE was no resulting change in gnus' behavior.
Then I tried:
(add-hook 'gnus-summary-mode-hook
(lambda ()
(local-set-key (kbd "\ei") 'previous-line)))
(add-hook 'gnus-summary-mode-hook
(lambda ()
(local-set-key (kbd "\en") 'next-line)))
(add-hook 'gnus-message-mode-hook
(lambda ()
(local-set-key (kbd "\en") 'next-line)))
(add-hook 'gnus-message-mode-hook
(lambda ()
(local-set-key (kbd "\e;") 'end-of-line)))
[also 'gnus-article-mode-hook' instead of 'gnus-message-mode-hook]
[also 'global-set-key' instead of 'local-set-key]
This time the changes WERE effected in the summary mode, but NOT in the
message/article mode.
Here are four lines from my present .gnus.el file:
(defun my-message-mode-setup ()
(setq fill-column 72)
(turn-on-auto-fill))
(add-hook 'message-mode-hook 'my-message-mode-setup)
Does this mean the buffer for composing mail is the "message" mode?
Is there somewhere i can define my very own "message-mode-setup"?
Here are two lines from one of those mammoth, posted, compiled .gnus
[http://www.math.tu-berlin.de/~freundt/.gnus]:
;; posting styles et. al.
(load-file "~/.user.mail")
Does this mean i should put my .emacs key bindings in to a ~/.user.mail
file and reference this file somehow in .gnus.el?
So, what can I do to get the next-line and end-on-line key bindings
installed in .gnus.el so they'll be there when i compose mail?
I would also like to get the effects of:
M-x paragraph-indent-minor-mode
hardcoded into .gnus.el
because i have to load that for each mail message.
Thanks for your help.
imputerate@puteracy.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: .emacs keybindings in gnus
2007-08-27 13:29 .emacs keybindings in gnus peter hodgson
@ 2007-08-27 13:59 ` Michaël Cadilhac
[not found] ` <87zm0cgeeb.fsf@cadilhac.name>
0 siblings, 1 reply; 3+ messages in thread
From: Michaël Cadilhac @ 2007-08-27 13:59 UTC (permalink / raw)
To: peter hodgson; +Cc: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 1726 bytes --]
peter hodgson <pclhodgson@comcast.net> writes:
> (add-hook 'gnus-summary-mode-hook
> (lambda ()
> (local-set-key (kbd "\ei") 'previous-line)))
> (add-hook 'gnus-summary-mode-hook
> (lambda ()
> (local-set-key (kbd "\en") 'next-line)))
> (add-hook 'gnus-message-mode-hook
> (lambda ()
> (local-set-key (kbd "\en") 'next-line)))
> (add-hook 'gnus-message-mode-hook
> (lambda ()
> (local-set-key (kbd "\e;") 'end-of-line)))
>
> [also 'gnus-article-mode-hook' instead of 'gnus-message-mode-hook]
> [also 'global-set-key' instead of 'local-set-key]
>
> This time the changes WERE effected in the summary mode, but NOT in the
> message/article mode.
Have you tried with `message-mode-map' ?
--
| Michaël `Micha' Cadilhac | Boobs will come and go, and then, |
| http://michael.cadilhac.name | someday, you'll meet a pair of boobs |
| JID/MSN: | that you want to marry. |
`---- michael.cadilhac@gmail.com | -- Randy - --'
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: .emacs keybindings in gnus
[not found] ` <87zm0cgeeb.fsf@cadilhac.name>
@ 2007-08-29 8:48 ` imputerate
0 siblings, 0 replies; 3+ messages in thread
From: imputerate @ 2007-08-29 8:48 UTC (permalink / raw)
To: Help-gnu-emacs
michael, you da man! it worked like a charm;
in my .gnus.el file, i changed a line
from:
(add-hook 'gnus-message-mode-hook line
to:
(add-hook 'message-mode-hook
so now the section of my .gnus.el file which forces gnus to accept key
bindings from my .emacs file is:
(add-hook 'gnus-summary-mode-hook
(lambda ()
(local-set-key (kbd "\ei") 'previous-line)))
(add-hook 'gnus-summary-mode-hook
(lambda ()
(local-set-key (kbd "\en") 'next-line)))
;; instead of 'gnus-message-mode-hook
\
(add-hook 'message-mode-hook
(lambda ()
(local-set-key (kbd "\en") 'next-line)))
(add-hook 'message-mode-hook
(lambda ()
(local-set-key (kbd "\e;") 'end-of-line)))
i left the summary-mode lines as is, since they work, and as they say,
"if it works..."
michael, you also solved my other problem:
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
;;instead of 'gnus-message-mode-hook
(add-hook 'message-mode-hook 'paragraph-indent-minor-mode)
the lesson to be taken from all this is that the "'gnus" should be omitted
when one is configuring the .gnus.el file;
now how about getting customized key bindings to work in X, and X apps, like
browsers?
--
View this message in context: http://www.nabble.com/.emacs-keybindings-in-gnus-tf4335298.html#a12383043
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-29 8:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-27 13:29 .emacs keybindings in gnus peter hodgson
2007-08-27 13:59 ` Michaël Cadilhac
[not found] ` <87zm0cgeeb.fsf@cadilhac.name>
2007-08-29 8:48 ` imputerate
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).