From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/51009 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.gnus.general Subject: Re: summary rescan and cancelled articles Date: Mon, 24 Mar 2003 10:36:29 +1000 Sender: owner-ding@hpc.uh.edu Message-ID: <871y0xtxbm.fsf@zip.com.au> References: <87u1ifaks3.fsf@zip.com.au> <2nhee3pynk.fsf@zsh.cs.rochester.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1048466299 574 80.91.224.249 (24 Mar 2003 00:38:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 24 Mar 2003 00:38:19 +0000 (UTC) Original-X-From: owner-ding@hpc.uh.edu Mon Mar 24 01:38:18 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18xFyk-000096-00 for ; Mon, 24 Mar 2003 01:38:18 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18xFy3-0005mK-00; Sun, 23 Mar 2003 18:37:35 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 23 Mar 2003 18:38:37 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id SAA22756 for ; Sun, 23 Mar 2003 18:38:25 -0600 (CST) Original-Received: (qmail 5317 invoked by alias); 24 Mar 2003 00:37:18 -0000 Original-Received: (qmail 5312 invoked from network); 24 Mar 2003 00:37:18 -0000 Original-Received: from snoopy.pacific.net.au (61.8.0.36) by 66.230.238.6 with SMTP; 24 Mar 2003 00:37:18 -0000 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-5) with ESMTP id h2O0bBiL012716 for ; Mon, 24 Mar 2003 11:37:15 +1100 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h2O0bBoJ011482 for ; Mon, 24 Mar 2003 11:37:11 +1100 (EST) Original-Received: from localhost (ppp109.dyn228.pacific.net.au [203.143.228.109]) by wisma.pacific.net.au (8.12.8/8.12.8) with ESMTP id h2O0b0qn019409 for ; Mon, 24 Mar 2003 11:37:05 +1100 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 18xFx0-0003Kb-00; Mon, 24 Mar 2003 10:36:30 +1000 Original-To: ding@gnus.org User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.2 (gnu/linux) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:51009 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:51009 --=-=-= A bit more to help M-g keep point in the same location, * gnus-sum.el (gnus-summary-find-for-reselect): Renamed from gnus-summary-find-uncancelled, skip temporary articles inserted by "refer" functions. --=-=-= Content-Disposition: attachment; filename=gnus-sum.el.more-reselect.diff CVS_RSH not defined /usr/bin/cvs -d :pserver:gnus@cvs.gnus.org:/usr/local/cvsroot diff gnus-sum.el Index: gnus-sum.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v retrieving revision 6.322 diff -u -r6.322 gnus-sum.el --- gnus-sum.el 21 Mar 2003 07:18:25 -0000 6.322 +++ gnus-sum.el 24 Mar 2003 00:34:16 -0000 @@ -6317,17 +6317,19 @@ (> (prefix-numeric-value arg) 0))) (redraw-display)) -(defun gnus-summary-find-uncancelled () - "Return the number of an uncancelled article. +(defun gnus-summary-find-for-reselect () + "Return the number of an article to stay on across a reselect. The current article is considered, then following articles, then previous -articles. If all articles are cancelled then return a dummy 0." +articles. An article is sought which is not cancelled and isn't a temporary +insertion from another group. If there's no such then return a dummy 0." (let (found) (dolist (rev '(nil t)) (unless found ; don't demand the reverse list if we don't need it (let ((data (gnus-data-find-list (gnus-summary-article-number) (gnus-data-list rev)))) (while (and data (not found)) - (if (not (eq gnus-canceled-mark (gnus-data-mark (car data)))) + (if (and (< 0 (gnus-data-number (car data))) + (not (eq gnus-canceled-mark (gnus-data-mark (car data))))) (setq found (gnus-data-number (car data)))) (setq data (cdr data)))))) (or found 0))) @@ -6338,7 +6340,7 @@ (interactive "P") (when (gnus-ephemeral-group-p gnus-newsgroup-name) (error "Ephemeral groups can't be reselected")) - (let ((current-subject (gnus-summary-find-uncancelled)) + (let ((current-subject (gnus-summary-find-for-reselect)) (group gnus-newsgroup-name)) (setq gnus-newsgroup-begin nil) (gnus-summary-exit) --=-=-=--