From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/49285 Path: main.gmane.org!not-for-mail From: Kevin Greiner Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus lies about downloaded state Date: Wed, 15 Jan 2003 22:29:15 -0600 Sender: owner-ding@hpc.uh.edu Message-ID: References: <844r8biqtg.fsf@lucy.is.informatik.uni-duisburg.de> <84k7h6h50w.fsf@lucy.is.informatik.uni-duisburg.de> <84ptqyv1lb.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1042691362 27479 80.91.224.249 (16 Jan 2003 04:29:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 16 Jan 2003 04:29:22 +0000 (UTC) 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 18Z1ea-00078t-00 for ; Thu, 16 Jan 2003 05:29:20 +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 18Z1fD-0003lK-00; Wed, 15 Jan 2003 22:29:59 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 15 Jan 2003 22:30:54 -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 WAA11547 for ; Wed, 15 Jan 2003 22:30:39 -0600 (CST) Original-Received: (qmail 56478 invoked by alias); 16 Jan 2003 04:29:39 -0000 Original-Received: (qmail 56473 invoked from network); 16 Jan 2003 04:29:38 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by 66.230.238.6 with SMTP; 16 Jan 2003 04:29:38 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18Z1mK-0003Gh-00 for ; Thu, 16 Jan 2003 05:37:20 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 141 Original-NNTP-Posting-Host: 216.12.206.41 Original-X-Trace: quimby.gnus.org 1042691840 12566 216.12.206.41 (16 Jan 2003 04:37:20 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 16 Jan 2003 04:37:20 GMT User-Agent: Gnus/5.090013 (Oort Gnus v0.13) Emacs/21.2 (i386-msvc-nt5.1.2600) Cancel-Lock: sha1:CG8/Wuutjf0WG6sDtap1v8Bftp8= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:49285 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:49285 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes: > Kevin Greiner writes: > >> 1) Open one of the problem groups. > > nntp+quimby:gnus.ding > >> 2) Identify the article number of an article that is marked as >> undownloaded yet is stored in the agent. > > 45110 > >> 3) Do this: m-: (memq gnus-newsgroup-undownloaded) >> Do you get nil or a list? > > (memq 45110 gnus-newsgroup-undownloaded) > => (45110) > >> 4) Now do c-h v gnus-agent-article-alist. >> 5) Find in the display. >> 6) Is in a cons that looks like () or ( . #)? > > (assoc 45110 gnus-agent-article-alist) > => (45110 . 731230) > > So the character is wrong even though the data is right. That goes > well with my experience: these articles behave as if downloaded, even > though %O says they're not. > > FWIW, the message 45110 is the grandparent of your posting that I'm > replying to (ie, it's the great-grandparent of this message I'm > typing). I've read that message before, it was marked R or O in the > summary buffer. Kai, You're going to be particularly interested in this one. I just proved, to my own satisfaction as least, that the gnus-summary-update-article-line call in gnus-agent-fetch-selected-article is corrupting the summary headers that are used to layout the summary. I've attached a patch to introduce my diagnostic code. You'll probably have to customize it (there is a constant one in the code that should be a parameter) to say that all is OK when the summary first opens. I've bound the test to 'z' so it is simple to execute. I also call the test code from gnus-agent-fetch-selected-article. On my installation, the first call to gnus-summary-update-article-line in gnus-agent-fetch-selected-article shifted the pos of each following article by one character. If each subsequent call has a similar effect, ... Kevin --=-=-= Content-Disposition: attachment; filename=kjg_patch Content-Description: A patch to debug gnus-sum and gnus-agent. --- ../lisp.cvs_ref/gnus-agent.el Wed Jan 15 21:41:57 2003 +++ gnus-agent.el Wed Jan 15 22:18:17 2003 @@ -847,16 +847,19 @@ "Fetch the current article as it is selected. This can be added to `gnus-select-article-hook' or `gnus-mark-article-hook'." + (kjg-gnus-summary-test "entering gnus-agent-fetch-selected-article") (let ((gnus-command-method gnus-current-select-method)) (when (and gnus-plugged (gnus-agent-method-p gnus-command-method)) (when (gnus-agent-fetch-articles gnus-newsgroup-name (list gnus-current-article)) + (kjg-gnus-summary-test "gnus-agent-fetch-selected-article (after fetch)") (setq gnus-newsgroup-undownloaded (delq gnus-current-article gnus-newsgroup-undownloaded)) (gnus-summary-update-article-line gnus-current-article - (gnus-summary-article-header gnus-current-article)))))) + (gnus-summary-article-header gnus-current-article)) + (kjg-gnus-summary-test "gnus-agent-fetch-selected-article (after update)"))))) ;;; ;;; Internal functions @@ -2091,7 +2094,6 @@ day (let (found (days gnus-agent-expire-days)) - (debug) (catch 'found (while (and (not found) days) *** ../lisp.cvs_ref/gnus-sum.el Mon Jan 13 23:06:13 2003 --- gnus-sum.el Wed Jan 15 22:21:49 2003 *************** *** 1526,1531 **** --- 1526,1532 ---- ;; Non-orthogonal keys (gnus-define-keys gnus-summary-mode-map + "z" kjg-gnus-summary-test " " gnus-summary-next-page "\177" gnus-summary-prev-page [delete] gnus-summary-prev-page *************** *** 6776,6781 **** --- 6777,6804 ---- (gnus-summary-goto-subject article t))) (gnus-summary-limit (append articles gnus-newsgroup-limit)) (gnus-summary-position-point)) + + (defun kjg-gnus-summary-test (&optional prefix) + (interactive) + (let ((bug nil)) + (save-excursion + (goto-char (point-min)) + (let ((b (get-buffer "*scratch*"))) + (while (looking-at ".....\\([0-9]+\\)") + (let* ((art (string-to-int (match-string 1))) + (data (gnus-data-find art)) + (pt (gnus-data-pos data)) + (pnt (1+ (point)))) + (unless (eq pt pnt) + (let ((msg (format "Art#: %d pt: %d point: %d" art pt pnt))) + (when (and prefix (not bug)) + (princ prefix b) + (princ "\n" b)) + (setq bug t) + (princ msg b) + (princ "\n" b))) + (forward-line 1))))) + (gnus-message 1 (if bug "Problem" "All OK")))) (defun gnus-summary-goto-subject (article &optional force silent) "Go the subject line of ARTICLE. --=-=-=--