Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* binding a summary key to *two* commands
@ 2015-01-20 17:54 Hikaru Ichijyo
  2015-01-20 18:08 ` Adam Sjøgren
       [not found] ` <mailman.18212.1421777358.1147.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Hikaru Ichijyo @ 2015-01-20 17:54 UTC (permalink / raw)
  To: info-gnus-english

Anyone have any idea how I could make *two* summary buffer commands emit
from one keystroke?  I've tried the snippet below, but it's giving me
errors about the wrong number of arguments.  Basically, I'm trying to
make "D" expire and read next unread, while "d" just expires and moves
forward without reading.  The only part not working here is the "D".


(defun delete-then-read-next ()
  (interactive)
  (gnus-summary-mark-as-expirable)
  (gnus-summary-next-unread-article)
)
(add-to-list 'mm-attachment-override-types "image/.*")
(add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
(add-hook 'gnus-summary-mode-hook (lambda ()
    (local-set-key "D" 'delete-then-read-next)
    (local-set-key "d" 'gnus-summary-put-mark-as-expirable-next)
    (local-set-key "u" 'gnus-summary-clear-mark-forward)
    (local-set-key "x" 'gnus-summary-expire-articles)
    (local-set-key "s" 'gnus-summary-move-article)))

-- 
He that would make his own liberty secure must guard even his enemy from
oppression; for if he violates this duty, he establishes a precedent
that will reach to himself.
					--Thomas Paine

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-22 22:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-20 17:54 binding a summary key to *two* commands Hikaru Ichijyo
2015-01-20 18:08 ` Adam Sjøgren
     [not found] ` <mailman.18212.1421777358.1147.info-gnus-english@gnu.org>
2015-01-20 22:11   ` Hikaru Ichijyo
2015-01-21  3:43   ` Hikaru Ichijyo
2015-01-22 22:53     ` Emanuel Berg

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 NNTP newsgroup(s).