From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/17342 Path: news.gmane.org!not-for-mail From: Hikaru Ichijyo Newsgroups: gmane.emacs.gnus.user Subject: Re: binding a summary key to *two* commands Date: Tue, 20 Jan 2015 21:43:24 -0600 Organization: UN Spacy Message-ID: <8xxvbk094tf.fsf@village.keycorner.org> References: <8xx7fwhwd6u.fsf@village.keycorner.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1421811907 25888 80.91.229.3 (21 Jan 2015 03:45:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2015 03:45:07 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed Jan 21 04:45:07 2015 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YDmE6-0001gx-Mz for gegu-info-gnus-english@m.gmane.org; Wed, 21 Jan 2015 04:45:06 +0100 Original-Received: from localhost ([::1]:46411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDmE5-0006CI-Ud for gegu-info-gnus-english@m.gmane.org; Tue, 20 Jan 2015 22:45:05 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!news.alt.net!news.astraweb.com!border5.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.gnus User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:5/bvojxKRq/g/WmZ96h4oV51Bks= Original-Lines: 28 Original-NNTP-Posting-Host: b8673e80.news.astraweb.com Original-X-Trace: DXC=V1imKaCWS0FU8fT?_VL23KL?0kYOcDh@J>Dkf_QKcBJAj_L; G1S:ikLaJO_]QU2XRHDg<3iRT8n:G6e^?9Z0mn List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:17342 Archived-At: 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