From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68588 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: auto auto-expirable Date: Tue, 02 Jun 2009 20:12:04 +0900 Organization: Emacsen advocacy group Message-ID: References: <12651.1243909393@rawbw.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243941239 3851 80.91.229.12 (2 Jun 2009 11:13:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Jun 2009 11:13:59 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17019@lists.math.uh.edu Tue Jun 02 13:13:56 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1MBRwJ-0003Uz-7i for ding-account@gmane.org; Tue, 02 Jun 2009 13:13:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1MBRvK-0006zv-2W; Tue, 02 Jun 2009 06:12:54 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1MBRvG-0006zi-PD for ding@lists.math.uh.edu; Tue, 02 Jun 2009 06:12:50 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1MBRvA-0001Gd-21 for ding@lists.math.uh.edu; Tue, 02 Jun 2009 06:12:50 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1MBRvd-0008KP-00 for ; Tue, 02 Jun 2009 13:13:13 +0200 Original-Received: from localhost ([127.0.0.1]:49675) by orlando.hostforweb.net with esmtpa (Exim 4.69) (envelope-from ) id 1MBRub-00006v-ME for ding@gnus.org; Tue, 02 Jun 2009 06:12:10 -0500 X-Hashcash: 1:20:090602:ding@gnus.org::ffr8gwOa287+HbIP:00005WYS X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.94 (gnu/linux) Cancel-Lock: sha1:U0ywiHjJmZDDyMPuERpOgQdPvQ8= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68588 Archived-At: >>>>> 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---