help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

.emacs keybindings in gnus


From: peter hodgson
Subject: .emacs keybindings in gnus
Date: Mon, 27 Aug 2007 08:29:18 -0500
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

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








reply via email to

[Prev in Thread] Current Thread [Next in Thread]