Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] Make gnus-summary-delete-article respect group parameters
@ 2002-07-09 12:32 Nevin Kapur
  2002-07-09 12:56 ` Simon Josefsson
  0 siblings, 1 reply; 9+ messages in thread
From: Nevin Kapur @ 2002-07-09 12:32 UTC (permalink / raw)


As reported by Adrian Kubala, B DEL in the summary buffer expires
articles but does not respect the expiry-target group parameter.  The
following patch attempts to fix this issue.

I would also like to argue that B DEL performing expiry instead of
deletion is inconsistent with its name and its description in the
manual.

2002-07-09  Nevin Kapur  <Nevin Kapur <nevin@jhu.edu>

	* gnus-sum.el (gnus-summary-delete-article): Respect group
	parameters while expiring.


Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 6.215
diff -u -r6.215 gnus-sum.el
--- lisp/gnus-sum.el	2002/07/05 08:27:05	6.215
+++ lisp/gnus-sum.el	2002/07/09 12:27:28
@@ -8826,6 +8826,9 @@
     (error "Couldn't open server"))
   ;; Compute the list of articles to delete.
   (let ((articles (sort (copy-sequence (gnus-summary-work-articles n)) '<))
+	(nnmail-expiry-target
+	 (or (gnus-group-find-parameter gnus-newsgroup-name 'expiry-target)
+	     nnmail-expiry-target))
 	not-deleted)
     (if (and gnus-novice-user
 	     (not (gnus-yes-or-no-p


-Nevin



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Make gnus-summary-delete-article respect group parameters
  2002-07-09 12:32 [PATCH] Make gnus-summary-delete-article respect group parameters Nevin Kapur
@ 2002-07-09 12:56 ` Simon Josefsson
  2002-07-09 13:09   ` Nevin Kapur
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Josefsson @ 2002-07-09 12:56 UTC (permalink / raw)


Nevin Kapur <nevin@jhu.edu> writes:

> As reported by Adrian Kubala, B DEL in the summary buffer expires
> articles but does not respect the expiry-target group parameter.  The
> following patch attempts to fix this issue.
>
> I would also like to argue that B DEL performing expiry instead of
> deletion is inconsistent with its name and its description in the
> manual.

Yes, which is why B DEL doesn't respect expiry-target, no?

If you want expiry-target to be adheared, you should expire the
article, not delete it.

Perhaps this isn't a intuitive default behaviour, I'm not sure since I
don't use expiry-target.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Make gnus-summary-delete-article respect group parameters
  2002-07-09 12:56 ` Simon Josefsson
@ 2002-07-09 13:09   ` Nevin Kapur
  2002-07-09 13:18     ` Simon Josefsson
  0 siblings, 1 reply; 9+ messages in thread
From: Nevin Kapur @ 2002-07-09 13:09 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Nevin Kapur <nevin@jhu.edu> writes:

[...]

>> I would also like to argue that B DEL performing expiry instead of
>> deletion is inconsistent with its name and its description in the
>> manual.
>
> Yes, which is why B DEL doesn't respect expiry-target, no?

But it respects nnmail-expiry-target.  So if you have it set to
something other than 'delete, then any article that is B DELed will be
put through the expiry process.  In my case that means junk mail that
makes it to my INBOX lands up in my archive groups.

> If you want expiry-target to be adheared, you should expire the
> article, not delete it.

With the current behavior it is not possible to have
nnmail-expiry-target set to some archival sort of function *and* have
B DEL immediately expunge the article, bypassing nnmail-expiry-target.

I offered the patch to make the current behavior consistent.  If
g-s-d-a looks at nnmail-expiry-target then it should also look at the
expiry-target group parameter.

For me the best outcome would be if B DEL outright deleted the
article.  But this may break somebody else's setup who has relied on B
DEL to expire articles.  For them the patch is useful.

> Perhaps this isn't a intuitive default behaviour, I'm not sure since I
> don't use expiry-target.

I don't know how to change the default behavior in a nice backward
compatible way.  Once could always introduce another variable...

-Nevin



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Make gnus-summary-delete-article respect group parameters
  2002-07-09 13:09   ` Nevin Kapur
@ 2002-07-09 13:18     ` Simon Josefsson
  2002-07-11 11:36       ` Steve Youngs
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Josefsson @ 2002-07-09 13:18 UTC (permalink / raw)


Nevin Kapur <nevin@jhu.edu> writes:

>>> I would also like to argue that B DEL performing expiry instead of
>>> deletion is inconsistent with its name and its description in the
>>> manual.
>>
>> Yes, which is why B DEL doesn't respect expiry-target, no?
>
> But it respects nnmail-expiry-target.  

Right.  I committed your patch.  The question if B DEL should respect
expiry-target or not is orthogonal to this.

> For me the best outcome would be if B DEL outright deleted the
> article.  But this may break somebody else's setup who has relied on B
> DEL to expire articles.  For them the patch is useful.

Yup.  I also like B DEL to really delete the article, but I don't
think it is important enough to modify existing behaviour.  Let's wait
for someone to report it as a bug, and then we can discuss it. :-)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Make gnus-summary-delete-article respect group parameters
  2002-07-09 13:18     ` Simon Josefsson
@ 2002-07-11 11:36       ` Steve Youngs
  2002-07-26 12:24         ` Simon Josefsson
  0 siblings, 1 reply; 9+ messages in thread
From: Steve Youngs @ 2002-07-11 11:36 UTC (permalink / raw)


|--==> "SJ" == Simon Josefsson <jas@extundo.com> writes:

  SJ> Yup.  I also like B DEL to really delete the article, but I don't
  SJ> think it is important enough to modify existing behaviour.  Let's wait
  SJ> for someone to report it as a bug, and then we can discuss it. :-)

Well, consider this a bug report.  IMO, B DEL should ignore all group
parameters especially expiry settings.  The only thing that B DEL
should do is physically delete the article, completely, forever, do
not pass go, do not collect 200 euro, the judges decision is final, no
correspondence will be entered into.

And up until I read this thread I'd been merrily B DEL'ing all the
crud out of my mail groups.  Now I find out that they haven't been
deleted and are all hiding in my archives... sheesh.

Please, Gnus boys 'n' girls, make B DEL do what B DEL should... Bloody
DELete.

Besides, just look at the doc for it...

,----[ C-h k B DEL ]
| B DEL runs `gnus-summary-delete-article'
| 
| `gnus-summary-delete-article' is an interactive compiled Lisp function
|   -- loaded from "gnus-sum"
| (gnus-summary-delete-article &optional N)
| 
| Documentation:
| Delete the N next (mail) articles.
| This command actually deletes articles.	 This is not a marking
| command.  The article will disappear forever from your life, never to
| return.
| If N is negative, delete backwards.
| If N is nil and articles have been marked with the process mark,
| delete these instead.
`----

Now, I've read that a dozen or so times and I just can't make it mean
"when we say 'delete' we don't actually mean delete, we mean run the
article through the normal expiry functions and if you use
expiry-targets to archive your mail the article will go into the
archive and won't get deleted at all".

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
|            XEmacs - It's not just an editor.             |
|                    It's a way of life.                   |
|------------------------------------<youngs@xemacs.org>---|




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Make gnus-summary-delete-article respect group parameters
  2002-07-11 11:36       ` Steve Youngs
@ 2002-07-26 12:24         ` Simon Josefsson
  2002-07-26 15:10           ` Benjamin Rutt
  2002-08-02 10:51           ` Steve Youngs
  0 siblings, 2 replies; 9+ messages in thread
From: Simon Josefsson @ 2002-07-26 12:24 UTC (permalink / raw)


Steve Youngs <youngs@xemacs.org> writes:

> |--==> "SJ" == Simon Josefsson <jas@extundo.com> writes:
>
>   SJ> Yup.  I also like B DEL to really delete the article, but I don't
>   SJ> think it is important enough to modify existing behaviour.  Let's wait
>   SJ> for someone to report it as a bug, and then we can discuss it. :-)
>
> Well, consider this a bug report.  IMO, B DEL should ignore all group
> parameters especially expiry settings.  The only thing that B DEL
> should do is physically delete the article, completely, forever, do
> not pass go, do not collect 200 euro, the judges decision is final, no
> correspondence will be entered into.

Does this patch do what you want?

--- gnus-sum.el.~6.216.~	2002-07-09 15:15:09.000000000 +0200
+++ gnus-sum.el	2002-07-09 21:26:35.000000000 +0200
@@ -8826,9 +8826,7 @@
     (error "Couldn't open server"))
   ;; Compute the list of articles to delete.
   (let ((articles (sort (copy-sequence (gnus-summary-work-articles n)) '<))
-	(nnmail-expiry-target
-	 (or (gnus-group-find-parameter gnus-newsgroup-name 'expiry-target)
-	     nnmail-expiry-target))
+	(nnmail-expiry-target 'delete)
 	not-deleted)
     (if (and gnus-novice-user
 	     (not (gnus-yes-or-no-p

> Besides, just look at the doc for it...
>
> ,----[ C-h k B DEL ]
> | B DEL runs `gnus-summary-delete-article'
> | 
> | `gnus-summary-delete-article' is an interactive compiled Lisp function
> |   -- loaded from "gnus-sum"
> | (gnus-summary-delete-article &optional N)
> | 
> | Documentation:
> | Delete the N next (mail) articles.
> | This command actually deletes articles.	 This is not a marking
> | command.  The article will disappear forever from your life, never to
> | return.
> | If N is negative, delete backwards.
> | If N is nil and articles have been marked with the process mark,
> | delete these instead.
> `----
>
> Now, I've read that a dozen or so times and I just can't make it mean
> "when we say 'delete' we don't actually mean delete, we mean run the
> article through the normal expiry functions and if you use
> expiry-targets to archive your mail the article will go into the
> archive and won't get deleted at all".

Not the same issue, but there is another issue with B DEL in nnimap,
just FYI:

`nnimap-expunge-on-close'
     Unlike Parmenides, the IMAP designers decided that things that
     don't exist actually do exist.  More specifically, IMAP has the
     concept of marking articles `Deleted' which doesn't actually
     delete them, and this (marking them `Deleted', that is) is what
     nnimap does when you delete a article in Gnus (with `G <DEL>' or
     similar).

     Since the articles aren't really removed when we mark them with the
     `Deleted' flag we'll need a way to actually delete them.  Feel like
     running in circles yet?

     Traditionally, nnimap has removed all articles marked as `Deleted'
     when closing a mailbox but this is now configurable by this server
     variable.

     The possible options are:

    `always'
          The default behavior, delete all articles marked as "Deleted"
          when closing a mailbox.

    `never'
          Never actually delete articles.  Currently there is no way of
          showing the articles marked for deletion in nnimap, but other
          IMAP clients may allow you to do this.  If you ever want to
          run the EXPUNGE command manually, *Note Expunging mailboxes::.

    `ask'
          When closing mailboxes, nnimap will ask if you wish to
          expunge deleted articles or not.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Make gnus-summary-delete-article respect group parameters
  2002-07-26 12:24         ` Simon Josefsson
@ 2002-07-26 15:10           ` Benjamin Rutt
  2002-07-26 16:34             ` Simon Josefsson
  2002-08-02 10:51           ` Steve Youngs
  1 sibling, 1 reply; 9+ messages in thread
From: Benjamin Rutt @ 2002-07-26 15:10 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> `nnimap-expunge-on-close'
>      Unlike Parmenides, the IMAP designers decided that things that
>      don't exist actually do exist.  More specifically, IMAP has the
>      concept of marking articles `Deleted' which doesn't actually
>      delete them, and this (marking them `Deleted', that is) is what
>      nnimap does when you delete a article in Gnus (with `G <DEL>' or
                                                           ^^^

Isn't this a doc bug?  Maybe this should be changed to 'B <DEL>'?  'G
<DEL>' is undefined for me in summary buffers.
-- 
Benjamin



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Make gnus-summary-delete-article respect group parameters
  2002-07-26 15:10           ` Benjamin Rutt
@ 2002-07-26 16:34             ` Simon Josefsson
  0 siblings, 0 replies; 9+ messages in thread
From: Simon Josefsson @ 2002-07-26 16:34 UTC (permalink / raw)


Benjamin Rutt <rutt+news@cis.ohio-state.edu> writes:

> Simon Josefsson <jas@extundo.com> writes:
>
>> `nnimap-expunge-on-close'
>>      Unlike Parmenides, the IMAP designers decided that things that
>>      don't exist actually do exist.  More specifically, IMAP has the
>>      concept of marking articles `Deleted' which doesn't actually
>>      delete them, and this (marking them `Deleted', that is) is what
>>      nnimap does when you delete a article in Gnus (with `G <DEL>' or
>                                                            ^^^
>
> Isn't this a doc bug?  Maybe this should be changed to 'B <DEL>'?  'G
> <DEL>' is undefined for me in summary buffers.

Err, right.  It actually is fixed, but I accidently used the Gnus 5.9
info sources when quoting that.  Sorry.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Make gnus-summary-delete-article respect group parameters
  2002-07-26 12:24         ` Simon Josefsson
  2002-07-26 15:10           ` Benjamin Rutt
@ 2002-08-02 10:51           ` Steve Youngs
  1 sibling, 0 replies; 9+ messages in thread
From: Steve Youngs @ 2002-08-02 10:51 UTC (permalink / raw)


|--==> "SJ" == Simon Josefsson <jas@extundo.com> writes:

  SJ> Does this patch do what you want?

You mean this one...

,----[ gnus/lisp/ChangeLog ]
| 2002-07-23  Karl Kleinpaste  <karl@charcoal.com>
| 
| 	* gnus-sum.el (gnus-summary-delete-article): Force
| 	nnmail-expiry-target to 'delete, so that absolute deletion
| 	happens when absolute deletion is requested.
`----

Yes, it works very nicely. :-)

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
|            XEmacs - It's not just an editor.             |
|                    It's a way of life.                   |
|------------------------------------<youngs@xemacs.org>---|




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-08-02 10:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-09 12:32 [PATCH] Make gnus-summary-delete-article respect group parameters Nevin Kapur
2002-07-09 12:56 ` Simon Josefsson
2002-07-09 13:09   ` Nevin Kapur
2002-07-09 13:18     ` Simon Josefsson
2002-07-11 11:36       ` Steve Youngs
2002-07-26 12:24         ` Simon Josefsson
2002-07-26 15:10           ` Benjamin Rutt
2002-07-26 16:34             ` Simon Josefsson
2002-08-02 10:51           ` Steve Youngs

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).