Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <simon@josefsson.org>
Cc: ding@gnus.org
Subject: Re: gnus-undo-mode and nnimap
Date: 12 Sep 2000 16:00:22 +0200	[thread overview]
Message-ID: <iluem2paex5.fsf@barbar.josefsson.org> (raw)
In-Reply-To: <8766o1rkgs.fsf@delivery.cam.eu.citrix.com>

Toby Speight <streapadair@gmx.net> writes:

> I know this is the same effect as the generally useful feature of
> accepting the server's marks over Gnus's, but WIBNI gnus-undo actually
> told the backend to change its stored marks?

Yup.  See if it works and I could commit it.

2000-09-12  Simon Josefsson  <simon@josefsson.org>

	* gnus-sum.el (gnus-update-read-articles): Undo
	`gnus-request-set-mark' operation.

Index: gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 5.131
diff -w -u -u -w -r5.131 gnus-sum.el
--- gnus-sum.el	2000/09/03 19:52:43	5.131
+++ gnus-sum.el	2000/09/12 13:56:38
@@ -9493,13 +9493,7 @@
       (if compute
 	  read
 	(save-excursion
-	  (set-buffer gnus-group-buffer)
-	  (gnus-undo-register
-	    `(progn
-	       (gnus-info-set-marks ',info ',(gnus-info-marks info) t)
-	       (gnus-info-set-read ',info ',(gnus-info-read info))
-	       (gnus-get-unread-articles-in-group ',info (gnus-active ,group))
-	       (gnus-group-update-group ,group t))))
+	  (let (setmarkundo)
 	;; Propagate the read marks to the backend.
 	(if (gnus-check-backend-function 'request-set-mark group)
 	    (let ((del (gnus-remove-from-range (gnus-info-read info) read))
@@ -9509,7 +9503,19 @@
 		  (error "Can't open server for %s" group))
 		(gnus-request-set-mark
 		 group (delq nil (list (if add (list add 'add '(read)))
-				       (if del (list del 'del '(read)))))))))
+					   (if del (list del 'del '(read))))))
+		    (setq setmarkundo
+			  `(gnus-request-set-mark
+			    ,group ',(delq nil (list (if del (list del 'add '(read)))
+						     (if add (list add 'del '(read))))))))))
+	    (set-buffer gnus-group-buffer)
+	    (gnus-undo-register
+	      `(progn
+		 (gnus-info-set-marks ',info ',(gnus-info-marks info) t)
+		 (gnus-info-set-read ',info ',(gnus-info-read info))
+		 (gnus-get-unread-articles-in-group ',info (gnus-active ,group))
+		 (gnus-group-update-group ,group t)
+		 ,setmarkundo))))
 	;; Enter this list into the group info.
 	(gnus-info-set-read info read)
 	;; Set the number of unread articles in gnus-newsrc-hashtb.




  reply	other threads:[~2000-09-12 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-12 10:08 Toby Speight
2000-09-12 14:00 ` Simon Josefsson [this message]
2000-09-12 15:45   ` Toby Speight
2000-09-13 12:29     ` Simon Josefsson
2000-09-13 12:53       ` Toby Speight
2000-09-13 13:31       ` Kai Großjohann

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=iluem2paex5.fsf@barbar.josefsson.org \
    --to=simon@josefsson.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).