Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-25-2007, 10:38 PM   #1
LQ Newbie
Registered: May 2006
Location: houston/malibu
Distribution: ubuntu
Posts: 19

Rep: Reputation: 0
.emacs keybindings in gnus

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


customize, emacs

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
emacs and gnus user on ubuntu and slackware imputerate Member Intro 0 08-25-2007 10:33 PM
How can I post the message in emacs Gnus? ayiiq180 Linux - Software 3 10-04-2006 12:04 PM
An imap problem in gnus hrothgar Linux - Software 0 08-21-2004 03:30 AM
how do you email in emacs or gnus arpi Linux - Software 1 06-18-2004 09:57 PM
GNUS email problem nakkaya Linux - Software 0 06-20-2003 03:20 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration