From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/32401 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-undo-mode and nnimap Date: 12 Sep 2000 16:00:22 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: <8766o1rkgs.fsf@delivery.cam.eu.citrix.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035168676 19532 80.91.224.250 (21 Oct 2002 02:51:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:51:16 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by mailhost.sclp.com (Postfix) with ESMTP id E77E8D051E for ; Tue, 12 Sep 2000 10:01:18 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id JAC05849; Tue, 12 Sep 2000 09:00:57 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 12 Sep 2000 09:00:10 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id IAA19125 for ; Tue, 12 Sep 2000 08:59:58 -0500 (CDT) Original-Received: from vic20.blipp.com (unknown [195.163.165.35]) by mailhost.sclp.com (Postfix) with ESMTP id 54503D051E for ; Tue, 12 Sep 2000 10:00:21 -0400 (EDT) Original-Received: from barbar.josefsson.org (localhost [127.0.0.1]) by vic20.blipp.com (8.10.1/8.10.1) with ESMTP id e8CE0I011116; Tue, 12 Sep 2000 16:00:19 +0200 Original-To: Toby Speight In-Reply-To: <8766o1rkgs.fsf@delivery.cam.eu.citrix.com> Original-Lines: 56 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:32401 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:32401 Toby Speight 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 * 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.