Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Adrian Kubala <adrian@sixfingeredman.net>
Subject: clarification of deleting articles
Date: Mon, 08 Jul 2002 16:05:19 +0200	[thread overview]
Message-ID: <877kk69vzr.fsf@localhost.i-did-not-set--mail-host-address--so-tickle-me> (raw)

This is for anybody who, like me, is confused by "B <del>" (aka
`gnus-summary-delete-article'). These comments apply to Oort 0.06.

1. Despite all outward indications, this does not delete articles, it
   expires them.
2. It respects settings to nnmail-expiry-target, but does not respect
   the group parameter expiry-target.

The following snippet does something I felt was more consistent and
understandable:

;;; start code
;; Make forced summary deletion and expiration work more intuitively.

(define-key gnus-summary-mode-map [(?B) (delete)]
            'my-gnus-summary-delete-article)
(define-key gnus-summary-mode-map [(?B) (?E)]
            'my-gnus-summary-expire-article)

(defun my-gnus-summary-expire-article (&optional n)
  "Expire the N next (mail) articles.
If N is negative, delete backwards.
If N is nil and articles have been marked with the process mark,
expire these instead."
  (interactive "P")
  ;; respect expiry-target!
  (let ((nnmail-expiry-target
         (or (gnus-group-find-parameter gnus-newsgroup-name
              'expiry-target)
             nnmail-expiry-target)))
    (gnus-summary-delete-article n)))

(defun my-gnus-summary-delete-article (&optional n)
  "Delete the N next (mail) articles.
If N is negative, delete backwards.
If N is nil and articles have been marked with the process mark,
delete these instead."
  (interactive "P")
  (let ((nnmail-expiry-target 'delete))
    (gnus-summary-delete-article n)))

;;; end code

I filed a bug report about this, but since it's arguably not a bug I
don't know if it will ever be officially changed.

adrian


             reply	other threads:[~2002-07-08 14:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08 14:05 Adrian Kubala [this message]
2002-07-09  9:41 ` Kai Großjohann

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=877kk69vzr.fsf@localhost.i-did-not-set--mail-host-address--so-tickle-me \
    --to=adrian@sixfingeredman.net \
    /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).