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: Mon, 02 Jul 2007 21:15:35 +0900	[thread overview]
Message-ID: <b4my7hzc87s.fsf@jpl.org> (raw)
In-Reply-To: <87ejjukg6s.fsf@florent.maison>

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

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

> With your recipe and without the patch, I can reproduce the bug. Again
> with the same recipe but with the patch applied, the bug doesn't happen.
> I'll now start reading again some nntp newsgroups and tell you if
> anything wrong happens, but I think you did spot and fix the problem I
> was experiencing.

Thanks for verifying the patch.  However, what I did might be
a kludge.  That is, making nnagent handle marks of the specific
back ends looks ill-mannered, since to abstract the actual back
ends seems to be one of the aims of nnagent.  The reason I changed
my idea is because I found the variable:

gnus-agent-synchronize-flags

The default value is nil.  See (info "(gnus)Agent and flags").
Does setting it to t solve the problem that you all are troubled
with?  Could someone, who uses Gnus v5.11, try it?  (I couldn't
reproduce the problem with Gnus v5.11 so far, though.)

But, for all that, updating at least the nntp marks when unplugged
is absolutely necessary.  Because the nntp marks can be copied to
another nntp client that connects to the same nntp server.

The patch I posted is probably harmful to some back end(s) that
keeps marks in the server, not the local system, and is unable
to set marks when unplugged.  I'm not quite sure of it but at
least the nnimap back end seems to be applied to.  Therefore, I
installed the code that I modified so that it may work with only
the nntp back end, in the Gnus CVS trunk.

Here is a revised patch for the released No Gnus v0.6:


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

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

  reply	other threads:[~2007-07-02 12:15 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
2007-06-29 14:07       ` Florent Rougon
2007-07-02 12:15         ` Katsumi Yamaoka [this message]
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=b4my7hzc87s.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).