info-gnus-english
[Top][All Lists]
Advanced

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

Re: move/copy article with only one key


From: David Z Maze
Subject: Re: move/copy article with only one key
Date: Wed, 05 May 2004 21:43:16 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Artificial Intelligence, linux)

Peter Gjefle <XX.peter@gjefle.com> writes:

> (add-hook 'gnus-summary-mode-hook
>           '(lambda ()
>              (define-key gnus-summary-mode-map "i"
>                'gnus-summary-copy-article "INBOX.copy")))

If it were me, I'd write (untested)

(require 'gnus-sum)
(defun dzm-copy-article-to-inbox ()
  (gnus-summary-copy-article "INBOX.copy"))
(define-key gnus-summary-mode-map "i" 'dzm-copy-article-to-inbox)

...that is, write a function that takes no parameters that does what
you want, then set up the keybinding to call that function.  Your form
successfully binds "i" to gnus-summary-copy-article, which prompts
you, which isn't what you want.  If you wanted to bind this all
together and not have a named function, you could probably write (even
more untested)

(require 'gnus-sum)
(define-key gnus-summary-mode-map "i"
  (lambda () (gnus-summary-copy-article "INBOX.copy")))

-- 
David Maze             dmaze@mit.edu          http://www.mit.edu/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
        -- Abra Mitchell


reply via email to

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