Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: [gmane.emacs.devel] gnus-read-mark not preserved
Date: Fri, 29 Jun 2007 20:06:01 +0900	[thread overview]
Message-ID: <b4msl8bvx46.fsf@jpl.org> (raw)
In-Reply-To: <87r6nwm40f.fsf@florent.maison>

[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]

>>>>> In <87r6nwm40f.fsf@florent.maison> Florent Rougon wrote:

> Stephen Berman <Stephen.Berman@gmx.net> wrote:

>> It appears that all marks are lost: they are not marked new (.) and,
>> what's more distressing, ticks (!) are also undone.

> I believe I have the same problem.

I found the way to reproduce it and a solution for No Gnus, not
for Gnus v5.11.

The point is that the nntp marks are not updated when unplugged,
and those marks are preferred to the ones that are saved in the
~/.newsrc.eld file next time you start Gnus.  This will arise
not only with nntp but also with nnimap, nnmaildir, etc.  So,
*I wish to ask people who use those backends together with the*
*agent to test the attached patch*, since I use only nntp and nnml.

Gnus v5.11 does not use the nntp marks, so there will probably
be another cause.  I am going to look into it further.

Here is the way to reproduce the problem for people who don't
use `unplugged' usually.  You need to have the agent enabled of
course.

1. Make sure Gnus is plugged.

2. Enter to a certain group in which there are a few unread
   articles using the RET key.

3. Mark unread articles with the # marks, and type `J s' to
   download those articles.

4. Exit the summary buffer using `q'.

5. Type `J j' to make Gnus unplugged.

6. Eenter to the group that you entered to before, read unread
   articles, and exit the summary buffer using `q'.

7. Make sure there is no unread article in that group, and exit
   Gnus using `q'.

8. Restart Emacs and Gnus.  And you will see those articles that
   are not marked as read.

The patch attached can be used with the trunk and the released
No Gnus v0.6.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 587 bytes --]

--- nnagent.el~	2007-01-24 07:15:37 +0000
+++ nnagent.el	2007-06-29 10:46:02 +0000
@@ -132,6 +132,12 @@
     (insert ")\n")
     (write-region (point-min) (point-max) (gnus-agent-lib-file "flags")
 		  t 'silent))
+  ;; Also set mark for the original back end.
+  (let ((gnus-agent nil)
+	(method (gnus-find-method-for-group group)))
+    (when (gnus-check-backend-function 'request-set-mark (car method))
+      (funcall (gnus-get-function method 'request-set-mark)
+	       group action server)))
   nil)
 
 (deffoo nnagent-retrieve-headers (articles &optional group server fetch-old)

[-- Attachment #3: Type: text/plain, Size: 20 bytes --]


See you next week.

  reply	other threads:[~2007-06-29 11:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19  6:52 Stephen Berman
2007-06-22  9:51 ` Stephen Berman
2007-06-22 10:45   ` Katsumi Yamaoka
2007-06-22 10:57     ` Stephen Berman
2007-06-22  9:58 ` Stephen Berman
2007-06-22 10:33   ` Stephen Berman
2007-06-28 16:34   ` Florent Rougon
2007-06-29 11:06     ` Katsumi Yamaoka [this message]
2007-06-29 14:07       ` Florent Rougon
2007-07-02 12:15         ` Katsumi Yamaoka
2007-07-02 20:34           ` Stephen Berman
2007-07-04  9:21             ` Katsumi Yamaoka
2007-07-06  1:08               ` Katsumi Yamaoka
2007-07-06  9:04                 ` Stephen Berman
2007-09-02  9:27       ` Florent Rougon

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=b4msl8bvx46.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --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).