Gnus development mailing list
 help / color / mirror / Atom feed
From: Trevor Murphy <trevor.m.murphy@gmail.com>
To: ding@gnus.org
Subject: Re: Can I mark a mail as read and expired at the same time?
Date: Wed, 03 Jul 2013 18:39:06 -0400	[thread overview]
Message-ID: <8761wrxo8l.fsf@gmail.com> (raw)
In-Reply-To: <87ppv0c8dy.fsf@ucl.ac.uk>

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Yes, it does make sense.  Maybe the solution is to create your own
> command that first marks the article as read and then marks it as
> expirable?  Something along the lines of
>
> #+begin_src emacs-lisp
>   (defun esf/mark-read-and-expirable () 
>     (interactive)
>     (gnus-summary-mark-as-read)
>     (gnus-summary-mark-as-expirable 1))
> #+end_src

Thanks for the suggestion!  Unfortunately in my testing it still doesn't
do what I want.

After doing some digging, I've found the following:

1. The command `gnus-summary-expire-articles' will call
   `gnus-summary-update-info' before expiring articles *if* total-expire
   is on.  That sends the "read" mark from Gnus to Gmail before expiring
   the articles, which is why I was getting the desired behavior from
   total-expire.

2. Sounds like an interesting path would be a function like yours that
   marks as read, *then calls update-info*, then marks as expirable.
   But after this afternoon of reading source code I'm pooped and not up
   for making sure that my call to update-info doesn't accidentally mess
   with other articles.

3. Instead I "solved" the problem by changing my expectations.  I just
   set expiry-wait to 0 and use auto-expiry.  Any read articles I want
   to disappear will go away tomorrow.  That's good enough for me.

Thanks again for your interest and pointers.

-- 
Trevor Murphy
GnuPG Key: 0xCB06EAAF




  reply	other threads:[~2013-07-03 22:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02  1:44 Trevor Murphy
2013-07-02  7:58 ` Eric S Fraga
2013-07-02 12:52   ` Trevor Murphy
2013-07-03  9:14     ` Eric S Fraga
2013-07-03 22:39       ` Trevor Murphy [this message]
2013-07-04 12:51         ` Eric S Fraga

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=8761wrxo8l.fsf@gmail.com \
    --to=trevor.m.murphy@gmail.com \
    --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).