From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53622 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: marks in gnus / uw imapd: what marks / how to set? Date: Mon, 04 Aug 2003 23:00:06 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <16174.26916.787632.310427@samba3.ece.ucdavis.edu> <16174.35886.132000.409517@ece.ucdavis.edu> <16174.41574.488000.239166@ece.ucdavis.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1060030852 9814 80.91.224.253 (4 Aug 2003 21:00:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 4 Aug 2003 21:00:52 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M2166@lists.math.uh.edu Mon Aug 04 23:01:09 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19jmS4-0007xw-00 for ; Mon, 04 Aug 2003 23:01:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19jmRJ-000277-00; Mon, 04 Aug 2003 16:00:21 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19jmRA-00026z-00 for ding@lists.math.uh.edu; Mon, 04 Aug 2003 16:00:12 -0500 Original-Received: (qmail 44624 invoked by alias); 4 Aug 2003 21:00:11 -0000 Original-Received: (qmail 44619 invoked from network); 4 Aug 2003 21:00:11 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by sclp3.sclp.com with SMTP; 4 Aug 2003 21:00:11 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.9/8.12.9) with ESMTP id h74L06gW028447 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 4 Aug 2003 23:00:06 +0200 Original-To: John Owens X-Payment: hashcash 1.2 0:030804:jowens@ece.ucdavis.edu:7b45fec1e3e8dc5a X-Hashcash: 0:030804:jowens@ece.ucdavis.edu:7b45fec1e3e8dc5a X-Payment: hashcash 1.2 0:030804:ding@gnus.org:bbdfa508056d0233 X-Hashcash: 0:030804:ding@gnus.org:bbdfa508056d0233 In-Reply-To: <16174.41574.488000.239166@ece.ucdavis.edu> (John Owens's message of "Mon, 4 Aug 2003 11:13:58 -0700") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53622 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53622 NB! Re-added CC to ding. John Owens writes: > And here comes the folder (attached below). The summary follows: > > -> 1 R Kyle Jones Nov 18 12/412 ""Invalid search bound (wrong side of point)" VM error on MIME send?" > 2 R Kyle Jones Nov 18 23/720 "Re: "Invalid search bound (wrong side of point)" VM error on MIME send?" > 3 Z Yahoo! Groups Jan 24 47/1695 "Unable to deliver your message" > 4 Matthew Eldridge Feb 7 14/439 "good VM hack" > 5 F E Matthew Eldridge Jun 26 27/721 "Re: widths of thesis figures" > 6 Simon Josefsson Oct 15 24/1039 "Re: [jowens@graphics.stanford.edu: Re: starttls: windows binary?]" > 7 Kai Großjohann Dec 11 14/358 "Re: remote emacs" > 8 R Hans-Peter Binder Feb 18 22/689 "Re: still trying ..." > 9 B Hans-Peter Binder Feb 18 43/1582 "Re: still trying ..." With the attached patch, after "G f simon RET", M-g, up-arrow, RET, I get the following summary buffer in Gnus on the same group: A [ 13: Kyle Jones ] "Invalid search bound (wrong side of point)" VM error on MIME send? A < 24: Kyle Jones > . [ 15: Matthew Eldridge ] good VM hack . [ 28: Matthew Eldridge ] Re: widths of thesis figures . [ 25: -> John Owens ] Re: [jowens@graphics.stanford.edu: Re: starttls: windows binary?] F [ 48: Yahoo! Groups ] Unable to deliver your message . [ 15: Kai Großjohann ] Re: remote emacs A [ 23: Hans-Peter Binder ] Re: still trying ... . < 44: Hans-Peter Binder > As you can see, the patch only handles read, reply and forward marks, but I wasn't sure how to map the others. (The M-g part shouldn't be necessary, will fix that.) Does it work for you? --- nndoc.el.~6.21.~ Sun May 11 22:41:06 2003 +++ nndoc.el Mon Aug 4 22:51:08 2003 @@ -77,7 +77,8 @@ (body-end-function . nndoc-rnews-body-end)) (mbox (article-begin-function . nndoc-mbox-article-begin) - (body-end-function . nndoc-mbox-body-end)) + (body-end-function . nndoc-mbox-body-end) + (header-hook . nndoc-mbox-header-hook)) (babyl (article-begin . "\^_\^L *\n") (body-end . "\^_") @@ -170,6 +171,7 @@ (defvoo nndoc-body-begin-function nil) (defvoo nndoc-head-begin-function nil) (defvoo nndoc-body-end nil) +(defvoo nndoc-header-hook nil) ;; nndoc-dissection-alist is a list of sublists. Each sublist holds the ;; following items. ARTICLE acts as the association key and is an ordinal ;; starting at 1. HEAD-BEGIN [0], HEAD-END [1], BODY-BEGIN [2] and BODY-END @@ -185,6 +187,8 @@ (defvoo nndoc-article-begin-function nil) (defvoo nndoc-generate-article-function nil) (defvoo nndoc-dissection-function nil) +(defvoo nndoc-update-info-read-data nil) +(defvoo nndoc-update-info-mark-data nil) (defvoo nndoc-status-string "") (defvoo nndoc-group-alist nil) @@ -269,6 +273,12 @@ (t (nnheader-insert "211 %d %d %d %s\n" number 1 number group))))) +(deffoo nndoc-request-update-info (group info &optional server) + (when (nndoc-possibly-change-buffer group server) + (gnus-info-set-read info nndoc-update-info-read-data) + (gnus-info-set-marks info nndoc-update-info-mark-data) + info)) + (deffoo nndoc-request-type (group &optional article) (cond ((not article) 'unknown) (nndoc-post-type nndoc-post-type) @@ -362,7 +372,7 @@ nndoc-generate-head-function nndoc-body-begin-function nndoc-head-begin-function nndoc-generate-article-function - nndoc-dissection-function))) + nndoc-dissection-function nndoc-header-hook))) (while vars (set (pop vars) nil))) (let (defs) @@ -427,6 +437,46 @@ (looking-at message-unix-mail-delimiter))))) (goto-char len)))) +(defun nndoc-mbox-header-hook (article start end) + (save-excursion + (let (data attributes new-flag unread-flag deleted-flag + filed-flag replied-flag written-flag + forwarded-flag edited-flag redistributed-flag) + (goto-char start) + (when (and (re-search-forward (concat "^X-VM-v5-Data: ") end t) + (goto-char (match-end 0)) + (setq data (read (current-buffer))) + (setq attributes (car-safe data)) + (arrayp attributes) + (>= (length attributes) 8)) + (setq new-flag (aref attributes 0) + unread-flag (aref attributes 1) + deleted-flag (aref attributes 2) + filed-flag (aref attributes 3) + replied-flag (aref attributes 4) + written-flag (aref attributes 5) + forwarded-flag (aref attributes 6) + edited-flag (aref attributes 7) + redistributed-flag (aref attributes 8)) + (if (not unread-flag) + (gnus-add-to-range nndoc-update-info-read-data (list article))) + (if replied-flag + (setq nndoc-update-info-mark-data + (gnus-update-alist-soft + 'reply + (gnus-add-to-range + (cdr (assoc 'reply nndoc-update-info-mark-data)) + (list article)) + nndoc-update-info-mark-data))) + (if forwarded-flag + (setq nndoc-update-info-mark-data + (gnus-update-alist-soft + 'forward + (gnus-add-to-range + (cdr (assoc 'forward nndoc-update-info-mark-data)) + (list article)) + nndoc-update-info-mark-data))))))) + (defun nndoc-mmdf-type-p () (when (looking-at "\^A\^A\^A\^A$") t)) @@ -801,6 +851,8 @@ (setq head-begin (point)) (nndoc-search (or nndoc-head-end "^$")) (setq head-end (point)) + (if nndoc-header-hook + (funcall nndoc-header-hook (1+ i) head-begin head-end)) (if nndoc-body-begin-function (funcall nndoc-body-begin-function) (nndoc-search (or nndoc-body-begin "^\n")))