Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: auto auto-expirable
Date: Tue, 02 Jun 2009 20:12:04 +0900	[thread overview]
Message-ID: <b4mk53u7uuz.fsf@jpl.org> (raw)
In-Reply-To: <12651.1243909393@rawbw.com>

>>>>> Mike Kupfer wrote:
> I don't have much experience writing Emacs docstrings, but FWIW here's
> an attempt to tighten the wording.  Thanks for making this customizable.

>>  :function-document
>    "Indicate whether articles that are marked expirable should retain that mark when moved or copied to GROUP."
>>  :variable-document
>    "Articles that are moved or copied into these groups will retain the expirable mark.

Thank you for the improvement.  That's ok but the best is to make
the first line say what it is in the length of 80-column or less
because `C-h f' or `C-h v' displays it.

>> If non-nil, this should be a regexp that should match all groups in
>> which to perform auto auto-expiry.  If this is nil or the group name
[...]

> Should that be "If this is nil... the expirable marks of articles will
> be cleared"?

That's good.  However, I got to think the `auto-auto-expire' group
parameter is overkill.

>>  :parameter-document
>    "Articles that have the expirable mark will retain that mark if moved or copied into a matching group, assuming the group does auto-expiry."

BTW, here is another solution, that lets Gnus behave as before
even if the patch that I made has been applied.  Though it might
make moving and copying of articles slow if the target group
contains 100,000 articles.  Isn't it acceptable?

--8<---------------cut here---------------start------------->8---
(defun my-gnus-dont-auto-auto-expiry (action header from to method)
  "Don't make unexpirable article expirable automatically when copied or\
moved to group in which to perform auto-expiry."
  (let (article expirable)
    (when (and (memq action '(copy move))
	       (gnus-group-auto-expirable-p to)
	       (setq article (mail-header-number header))
	       (not (memq article gnus-newsgroup-expirable))
	       (setq expirable
		     (assq 'expire (car (nthcdr 3 (gnus-get-info to))))))
      (setcdr expirable
	      (gnus-compress-sequence
	       (delq (cdr (symbol-value 'art-group))
		     (gnus-uncompress-sequence (cdr expirable))))))))

(add-hook 'gnus-summary-article-move-hook 'my-gnus-dont-auto-auto-expiry)
--8<---------------cut here---------------end--------------->8---

Otherwise, how about the user option like the following?
It never slows Gnus, though it doesn't provide the means to
customize the behavior group by group.

--8<---------------cut here---------------start------------->8---
(defcustom gnus-inhibit-auto-auto-expiry nil
  "If non-nil, don't do auto auto-expiry when moving or copying articles.
`Auto auto-expiry' means that read articles, even if they haven't been
marked as expirable, will be automatically marked as expirable when
moved or copied to a group in which to perform auto-expiry."
  :version "23.2"
  :group 'gnus-summary
  :type 'boolean)
--8<---------------cut here---------------end--------------->8---



  reply	other threads:[~2009-06-02 11:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29 11:19 Katsumi Yamaoka
2009-05-29 12:08 ` Didier Verna
2009-06-01  3:36 ` Mike Kupfer
2009-06-01  8:35   ` Didier Verna
2009-06-01 11:20     ` Katsumi Yamaoka
2009-06-01 12:47       ` Tim Landscheidt
2009-06-02  2:23       ` Mike Kupfer
2009-06-02 11:12         ` Katsumi Yamaoka [this message]
2009-06-02 11:38           ` Katsumi Yamaoka
2009-06-04  4:13           ` Mike Kupfer
2009-06-13 14:22           ` Tim Landscheidt
2009-08-12  8:28             ` Katsumi Yamaoka
2009-06-02 17:34         ` Reiner Steib
2009-06-05 12:34       ` Greg Troxel

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=b4mk53u7uuz.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.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).