From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/26461 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.emacs.gnus.general Subject: Re: Confused about crosspost marking behavior. Date: 09 Nov 1999 00:13:00 -0600 Sender: owner-ding@hpc.uh.edu Message-ID: <87yac8tcpf.fsf@raven.localnet> References: <87eme8dvqi.fsf_-_@raven.localnet> <8766zjeami.fsf@raven.localnet> <873dugut28.fsf@raven.localnet> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035163665 19503 80.91.224.250 (21 Oct 2002 01:27:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:27:45 +0000 (UTC) Return-Path: Original-Received: from lisa.math.uh.edu (lisa.math.uh.edu [129.7.128.49]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id BAA13644 for ; Tue, 9 Nov 1999 01:13:33 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by lisa.math.uh.edu (8.9.1/8.9.1) with ESMTP id AAB31703; Tue, 9 Nov 1999 00:13:31 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 09 Nov 1999 00:13:48 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id AAA21487 for ; Tue, 9 Nov 1999 00:13:38 -0600 (CST) Original-Received: from omen.dhis.org (mail@cs2868-22.austin.rr.com [24.28.68.22]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id BAA13639 for ; Tue, 9 Nov 1999 01:13:07 -0500 (EST) Original-Received: from raven.localnet ([192.168.1.7] ident=mail) by omen.dhis.org with esmtp (Exim 3.03 #1 (Debian)) id 11l4Wa-0003YK-00 for ; Tue, 09 Nov 1999 00:13:00 -0600 Original-Received: from rlb by raven.localnet with local (Exim 3.03 #1 (Debian)) id 11l4Wa-0001oU-00 for ; Tue, 09 Nov 1999 00:13:00 -0600 Original-To: ding@gnus.org In-Reply-To: Rob Browning's message of "08 Nov 1999 23:34:23 -0600" Original-Lines: 76 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.4 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:26461 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:26461 Rob Browning writes: > Actually, given one fairly minor enhancement, I don't think I'd need > auto-expire *or* total-expire. If I just had the > gnus-summary-mark-same-subject where you could provide the mark for it > to use, I'd be happy. I don't really want auto-expire since I don't > want all read marks to turn to expires, I just need a more > powerful/flexible way to assign expire marks when called for. I quickly realized there already is a gnus-summary-mark-same-subject, but it only allows a few marks. > I wonder if this would be hard; and I wonder if Lars would have any > interest in a patch for this... Well, to follow myself up, here's an initial attempt. I've never messed with gnus programming before, so this might be fubar, violate all kinds of conventions, or just be a bad idea... I just mirrored the existing gnus-summary-mark-same-subject, but use a symbol to represent the mark (which might be bad), and I treat 'expirable and 'dormant as "read style" marks. I looked at the other code, and this passed the smell-test, but I wasn't sure it was *right*. I haven't tested it either. I wanted to see if I was on the right track first. (defun gnus-summary-mark-same-subject-with-mark (subject mark) "Mark articles with same SUBJECT with mark, which must be one of either 'read, 'ticked, 'unread, 'dormant, or 'expirable." (let ((count 1)) (save-excursion (cond ((eq mark 'read) ; Mark as read. (while (and (progn (gnus-summary-mark-article-as-read gnus-killed-mark) (gnus-summary-show-thread) t) (gnus-summary-find-subject subject)) (setq count (1+ count)))) ((eq mark 'ticked) ; Tick. (while (and (progn (gnus-summary-mark-article-as-unread gnus-ticked-mark) (gnus-summary-show-thread) t) (gnus-summary-find-subject subject)) (setq count (1+ count)))) ((eq mark 'unread) ; Mark as unread. (while (and (progn (gnus-summary-mark-article-as-unread gnus-unread-mark) (gnus-summary-show-thread) t) (gnus-summary-find-subject subject)) (setq count (1+ count)))) ((eq mark 'dormant) ; Mark as dormant. (while (and (progn (gnus-summary-mark-article-as-read gnus-dormant-mark) (gnus-summary-show-thread) t) (gnus-summary-find-subject subject)) (setq count (1+ count)))) ((eq mark 'expirable) ; Mark as expirable. (while (and (progn (gnus-summary-mark-article-as-read gnus-expirable-mark) (gnus-summary-show-thread) t) (gnus-summary-find-subject subject)) (setq count (1+ count)))) (t (error "Unknown mark: %s" mark))) (gnus-set-mode-line 'summary) ;; Return the number of marked articles. count))) -- Rob Browning PGP=E80E0D04F521A094 532B97F5D64E3930