From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45797 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.emacs.gnus.general Subject: Re: B DEL is being treated as expiry? Date: Tue, 23 Jul 2002 14:33:26 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1027449255 7137 127.0.0.1 (23 Jul 2002 18:34:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 23 Jul 2002 18:34:15 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17X4U9-0001r0-00 for ; Tue, 23 Jul 2002 20:34:13 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17X4Th-0004ea-00; Tue, 23 Jul 2002 13:33:45 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 23 Jul 2002 13:34:11 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id NAA21903 for ; Tue, 23 Jul 2002 13:33:57 -0500 (CDT) Original-Received: (qmail 8619 invoked by alias); 23 Jul 2002 18:33:27 -0000 Original-Received: (qmail 8614 invoked from network); 23 Jul 2002 18:33:27 -0000 Original-Received: from multivac.student.cwru.edu (HELO multivac.cwru.edu) (@129.22.96.25) by gnus.org with SMTP; 23 Jul 2002 18:33:27 -0000 Original-Received: (qmail 1204 invoked by uid 500); 23 Jul 2002 18:33:49 -0000 Original-To: ding@gnus.org In-Reply-To: (Karl Kleinpaste's message of "Tue, 23 Jul 2002 14:09:19 -0400") Mail-Copies-To: nobody Mail-Followup-To: ding@gnus.org Original-Lines: 103 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45797 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45797 Karl Kleinpaste wrote: > prj@po.cwru.edu (Paul Jarc) writes: >> The backend interface must define how this is expressed, and all >> backends must be made to conform to that specification. > > So make them conform. > > Why is this hard? I never said it was hard. I really don't think it is hard to fix the backend interface documentation and then to fix the backends. > I solved today's problem, so that things just plain *work* according > to established intent -- so that -delete-article *stops making mistakes*. It stops making mistakes *for you*. > You have a view toward a different problem; feel free to solve that. I'm looking at the more general case of the same problem, as well as a different but related problem. > I am of the opinion that this different problem is most readily solved > merely by convincing the currently non-conforming backends to > understand nnmail-expiry-target, plus adding 1 general function + > keybinding to provide expire-right-now as well. Currently, all backends conform equally well to the backend interface spec (AFAIK). The spec does not say that backends should delete instead of expiring in any particular case, and the spec does not give callers enough information to know (in general) how to tell backends to delete instead of expiring. And since your fix has not been installed AFAIK, all backends fail to DTRT for B DEL. If you say all backends should be fixed, I agree. But I don't think your patch is the right way to do that. >> g-s-d-a is not supposed to know the details of how backends decide >> what to do with expirable articles; it's only supposed to know what >> to pass to nnchoke-request-expire-articles. > > -delete-article doesn't know squat about anything to do with expiry at > all -- it isn't *doing* expiry so it doesn't *care* about expiry, > other than to turn it off unconditionally. But it doesn't know how to do that via nn*-request-expire-articles. The backend interace doesn't say that that's even possible at all. > It sounds like the problem you have is that there exists any use of > nnmail-expiry-target. Feel free to redesign that, if the urge moves > you, but I think you're working too hard. No, I don't have a problem with that. I have a problem with the disconnect between the code and the documentation. If the code does not conform to the backend interface definition, such as by making unwarranted assumptions about how to configure expiry behavior for all backends, then the backend interface definition is worse than useless; it's harmful, because it leads people to believe things that the code does not agree with. Ideally, I think it would be nice for all the expiry code to be removed from the backend interface. Given nn*-request-{move,accept}-article, Gnus can do expiry itself, and more uniformly than when backends do it themselves. >> The problem isn't specific to nnmaildir; your fix is specific to >> nnmail-derived backends. I don't know, but I'd guess that it also >> fails for nnimap. > > The fix is general with regard to _today's_ expectation that > nnmail-expiry-target is the specified way to define expiry habits, by > means of overriding any general expiry intention so that deletion, and > only deletion, is what occurs. gnus-request-expire-articles works > this way, and -delete-article accommodates it. I don't mind too much that those Gnus functions help the nnmail-derived backends this way, although it's a bit ugly. But the fix for this problem should work for all backends, not just the nnmail ones. The expectation that n-e-t is the way to define expiry behavior is itself derived from using nnmail-derived backends. Other backends exist and must be accounted for. >> It isn't completely disjoint, because it's likely that we'll want to >> use the same backend function for both purposes. (Otherwise we'll >> be duplicating a significant amount of code.) > > Please. The totality of -delete-article is 40 lines. I'm talking about nn*-request-expire-articles. Separate nn*-request-delete-articles functions would duplicate much of that code, I think. But we already have nn*-request-move-article, which can be used to remove articles instead of expiring them. Why don't we change B DEL to use that? That should work for all backends. > You can find numerous examples of duplicated code in Gnus much > larger than that. That doesn't sound like a good reason for adding more. paul