* delete as moving to Trash
@ 2001-08-17 20:54 Per Bothner
2001-08-17 21:06 ` Paul Jarc
2001-08-17 21:30 ` Per Bothner
0 siblings, 2 replies; 7+ messages in thread
From: Per Bothner @ 2001-08-17 20:54 UTC (permalink / raw)
Cc: per
Something I didn't see covered in the FAQ:
In order to be more compatible with other mail readers who don't have
Gnus's notion of expiration (such as Mozilla), it seems to me it would
make sense to "delete" a message by moving it to a Trash folder. This
also has the advantage that when marks get lost, at least the deleted
messages stay in Trash, and it also makes it easier to look at
old/read messages without getting swamped by deleted messages.
The following seems to work for me:
(add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
(defun move-article-to-Trash (&optional n)
(interactive "P")
(gnus-summary-move-article n "Trash"))
(defun my-alter-summary-map ()
(local-set-key "d" 'move-article-to-Trash))
But perhaps there is a better way?
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: delete as moving to Trash
2001-08-17 20:54 delete as moving to Trash Per Bothner
@ 2001-08-17 21:06 ` Paul Jarc
2001-08-20 15:18 ` Peter Solodov
2001-08-17 21:30 ` Per Bothner
1 sibling, 1 reply; 7+ messages in thread
From: Paul Jarc @ 2001-08-17 21:06 UTC (permalink / raw)
Per Bothner <per@bothner.com> wrote:
> In order to be more compatible with other mail readers who don't have
> Gnus's notion of expiration (such as Mozilla), it seems to me it would
> make sense to "delete" a message by moving it to a Trash folder.
...
> But perhaps there is a better way?
Use a small expiry-wait, and set expiry-target to your Trash group.
In the Trash group itself, use a larger expiry-wait and no
expiry-target.
paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: delete as moving to Trash
2001-08-17 20:54 delete as moving to Trash Per Bothner
2001-08-17 21:06 ` Paul Jarc
@ 2001-08-17 21:30 ` Per Bothner
1 sibling, 0 replies; 7+ messages in thread
From: Per Bothner @ 2001-08-17 21:30 UTC (permalink / raw)
Cc: dings
A slight refinement: After "deleting" an article by moving it to Trash,
we want to move to the next message.
(defun move-article-to-Trash (&optional n)
(interactive "P")
(gnus-summary-move-article n "Trash")
(gnus-summary-next-article n))
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: delete as moving to Trash
2001-08-17 21:06 ` Paul Jarc
@ 2001-08-20 15:18 ` Peter Solodov
2001-08-20 16:22 ` Paul Jarc
0 siblings, 1 reply; 7+ messages in thread
From: Peter Solodov @ 2001-08-20 15:18 UTC (permalink / raw)
On Fri, 17 Aug 2001, Paul Jarc wrote:
> Per Bothner <per@bothner.com> wrote:
>> In order to be more compatible with other mail readers who don't
>> have Gnus's notion of expiration (such as Mozilla), it seems to me
>> it would make sense to "delete" a message by moving it to a Trash
>> folder.
> ...
>> But perhaps there is a better way?
>
> Use a small expiry-wait, and set expiry-target to your Trash group.
> In the Trash group itself, use a larger expiry-wait and no
> expiry-target.
This is not a better way. I'm subscribed to some mailing
lists. Messages go to separate groups and expiry-wait there is one
week and messages are just removed. For my private mail I have
separate group and special expiry-target. expiry-wait is somewhat
longer.
The problem comes when I get some junk in my private mail
group. There's no nice way to get rid of it (I don't want it to saved
in archives). I have to either delete it with 'B DEL', which I don't
like, or move it to 'junk' group where it will be gone quite soon :-)
So, are there any suggestions in this situation?
P.S. 'd' shouldn't be used to move articles to trash folder. I have 'A
d' binding for this.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: delete as moving to Trash
2001-08-20 15:18 ` Peter Solodov
@ 2001-08-20 16:22 ` Paul Jarc
2001-08-20 22:39 ` Peter Solodov
0 siblings, 1 reply; 7+ messages in thread
From: Paul Jarc @ 2001-08-20 16:22 UTC (permalink / raw)
Peter Solodov <solodov@bigfoot.com> wrote:
> On Fri, 17 Aug 2001, Paul Jarc wrote:
>> Per Bothner <per@bothner.com> wrote:
>>> But perhaps there is a better way?
>>
>> Use a small expiry-wait, and set expiry-target to your Trash group.
>> In the Trash group itself, use a larger expiry-wait and no
>> expiry-target.
>
> This is not a better way.
You're describing a problem different from Per's, so it's not
surprising that my suggestion doesn't help you - it wasn't aimed at
your problem.
> The problem comes when I get some junk in my private mail
> group. There's no nice way to get rid of it (I don't want it to saved
> in archives). I have to either delete it with 'B DEL', which I don't
> like, or move it to 'junk' group where it will be gone quite soon :-)
So you want to apply different treatment to articles from the same
group, but you don't like the existing key bindings for doing it?
Why don't you just bind gnus-summary-delete-article to another key?
Or, if you don't want to be prompted, bind this function:
(lambda (&optional n)
(interactive "P")
(flet ((gnus-yes-or-no-p (lambda (&rest args) t)))
(gnus-summary-delete-article n)))
Or something like that. I've never used flet, so I'm not sure I'm
doing that correctly.
> P.S. 'd' shouldn't be used to move articles to trash folder.
It isn't. It's used to mark an article as read.
paul
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: delete as moving to Trash
2001-08-20 16:22 ` Paul Jarc
@ 2001-08-20 22:39 ` Peter Solodov
2001-08-21 5:22 ` Paul Jarc
0 siblings, 1 reply; 7+ messages in thread
From: Peter Solodov @ 2001-08-20 22:39 UTC (permalink / raw)
On Mon, 20 Aug 2001, Paul Jarc wrote:
> You're describing a problem different from Per's, so it's not
> surprising that my suggestion doesn't help you - it wasn't aimed at
> your problem.
Yes, my problem is a bit different. But just a little :-)
> So you want to apply different treatment to articles from the same
> group, but you don't like the existing key bindings for doing it?
> Why don't you just bind gnus-summary-delete-article to another key?
I recall now. The problem is that I have special expiry-target. So
when I delete an article, it goes through the expiry process (is it
supposed to be like that?) and ends up in my archives, which is
clearly not what I want. So moving to trash is a perfect solution for
me.
> Or, if you don't want to be prompted, bind this function:
> (lambda (&optional n)
> (interactive "P")
> (flet ((gnus-yes-or-no-p (lambda (&rest args) t)))
> (gnus-summary-delete-article n)))
>
> Or something like that. I've never used flet, so I'm not sure I'm
> doing that correctly.
You sure haven't :-)
(lambda (&optional n)
(interactive "P")
(flet ((gnus-yes-or-no-p (args) t))
(gnus-summary-delete-article n)))
This is what you meant (I think). I'm no LISP guru, but the first
version didn't work :-)
>> P.S. 'd' shouldn't be used to move articles to trash folder.
>
> It isn't. It's used to mark an article as read.
It was in the initially proposed solution.
Peter.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: delete as moving to Trash
2001-08-20 22:39 ` Peter Solodov
@ 2001-08-21 5:22 ` Paul Jarc
0 siblings, 0 replies; 7+ messages in thread
From: Paul Jarc @ 2001-08-21 5:22 UTC (permalink / raw)
Peter Solodov <solodov@bigfoot.com> wrote:
> On Mon, 20 Aug 2001, Paul Jarc wrote:
>> So you want to apply different treatment to articles from the same
>> group, but you don't like the existing key bindings for doing it?
>> Why don't you just bind gnus-summary-delete-article to another key?
>
> I recall now. The problem is that I have special expiry-target. So
> when I delete an article, it goes through the expiry process (is it
> supposed to be like that?) and ends up in my archives, which is
> clearly not what I want. So moving to trash is a perfect solution for
> me.
(defun move-article-to-trash (&optional n)
(gnus-summary-move-article n "nnfoo:trash-group"))
(define-key gnus-summary-mode-map [?\C-c ?d] 'move-article-to-trash)
You could also do it as a keyboard macro.
paul
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-08-21 5:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-17 20:54 delete as moving to Trash Per Bothner
2001-08-17 21:06 ` Paul Jarc
2001-08-20 15:18 ` Peter Solodov
2001-08-20 16:22 ` Paul Jarc
2001-08-20 22:39 ` Peter Solodov
2001-08-21 5:22 ` Paul Jarc
2001-08-17 21:30 ` Per Bothner
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).