[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: binding a summary key to *two* commands
From: |
Hikaru Ichijyo |
Subject: |
Re: binding a summary key to *two* commands |
Date: |
Tue, 20 Jan 2015 21:43:24 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Ok, the function I was trying to make, debugged, in case anyone wants
it. If you press "d", it sets the expirable mark and moves forward
without reading the next message (good if you're in the middle of a lot
of trash messages); if you press "D", it sets expirable and reads the
next one (good if you're in a lot of message you want to read but not
keep). When RET is pressed in the Summary buffer on an article that
isn't yet being displayed, it calls gnus-summary-scroll-up, which only
does what it's name says if the article had already been displayed. If
not (as in this case), it reads the article under point in the Summary.
(defun delete-then-read-next ()
(interactive)
(gnus-summary-mark-as-expirable 1)
(gnus-summary-scroll-up 1)
)
(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