Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Hikaru Ichijyo <ichijyo@macross.sdf.jp>
To: info-gnus-english@gnu.org
Subject: binding a summary key to *two* commands
Date: Tue, 20 Jan 2015 11:54:01 -0600	[thread overview]
Message-ID: <8xx7fwhwd6u.fsf@village.keycorner.org> (raw)

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

             reply	other threads:[~2015-01-20 17:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 17:54 Hikaru Ichijyo [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8xx7fwhwd6u.fsf@village.keycorner.org \
    --to=ichijyo@macross.sdf.jp \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).