Gnus development mailing list
 help / color / mirror / Atom feed
From: Wes Hardaker <wjhardaker@ucdavis.edu>
Cc: Ding mailing list <ding@gnus.org>
Subject: Re: Showing dormants when entering mail group?
Date: 15 Mar 1998 20:13:35 -0800	[thread overview]
Message-ID: <x790qbtgr4.fsf@des.castles.com> (raw)
In-Reply-To: 's message of "15 Mar 1998 00:03:38 +0200"

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

>>>>> On 15 Mar 1998 00:03:38 +0200, <jari.aalto@poboxes.com> said:

jari> Thanks for the idea by SLB and others, I started marking "todo"
jari> articles with dormant tick in my mail groups. What is the
jari> elegant way to display them by default in mail groups?

Ok, fyi, this long thread has gotten enough interest that I'd post my
currently used hack to do similar displays of expitory threads.  The
difference is minimal, and enclosed in the hack is a new 'display'
group parameter support for a string to force listing/excluding
articles of a certain type.

The problem is, it doesn't work quite right.  It shows all the
articles, but ends up marking all of them but the last one as 'O' even 
though it should be reading the mark on them not changing it (even
Lars told me so).

The end result, if someone fixes it, it should be able to do what you
want (display dormant marks), with minor tweaks.  I haven't had the
time to look into it further myself.

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


[-- Attachment #2: Type: text/plain, Size: 3498 bytes --]

diff -c -r1.1.1.14 gnus-sum.el
*** gnus-sum.el 1998/03/09 17:49:04     1.1.1.14
--- gnus-sum.el 1998/03/09 17:50:02
***************
*** 3897,3914 ****
  
  (defun gnus-articles-to-read (group &optional read-all)
    ;; Find out what articles the user wants to read.
!   (let* ((articles
          ;; Select all articles if `read-all' is non-nil, or if there
          ;; are no unread articles.
!         (if (or read-all
!                 (and (zerop (length gnus-newsgroup-marked))
!                      (zerop (length gnus-newsgroup-unreads)))
!                 (eq (gnus-group-find-parameter group 'display)
!                     'all))
!             (gnus-uncompress-range (gnus-active group))
            (sort (append gnus-newsgroup-dormant gnus-newsgroup-marked
                          (copy-sequence gnus-newsgroup-unreads))
!                 '<)))
         (scored-list (gnus-killed-articles gnus-newsgroup-killed articles))
         (scored (length scored-list))
         (number (length articles))
--- 3905,3956 ----
  
  (defun gnus-articles-to-read (group &optional read-all)
    ;; Find out what articles the user wants to read.
!   (let* ((display (gnus-group-find-parameter group 'display))
!        tmparticles artmark
!        (articles
          ;; Select all articles if `read-all' is non-nil, or if there
          ;; are no unread articles.
!         (cond 
!          ((or read-all
!               (and (zerop (length gnus-newsgroup-marked))
!                    (zerop (length gnus-newsgroup-unreads)))
!               (eq display 'all))
!           (gnus-uncompress-range (gnus-active group)))
!          ((stringp display)
!           (message gnus-newsgroup-headers)
!           (setq tmparticles (gnus-uncompress-range (gnus-active group)))
!           (setq articles nil)
!           (if (string-equal (substring display 0 1) "-")
!               (progn
!                 (setq display (substring display 1))
!                 (while (not (null tmparticles))
!                   (setq artmark 
!                         (char-to-string 
!                          (gnus-article-mark (car tmparticles))))
!                   (if (or (not artmark)
!                           (not (string-match artmark display)))
!                       (setq articles 
!                             (append (list (car tmparticles)) articles)))
!                   (setq tmparticles (cdr tmparticles))))
!             (while (not (null tmparticles))
!               (setq artmark 
!                     (char-to-string (gnus-article-mark (car tmparticles))))
!               (if (and artmark (string-match artmark display))
!                   (setq articles
!                         (append (list (car tmparticles)) articles)))
!               (setq tmparticles (cdr tmparticles))))
!           articles)
!          ((eq display 'not-expired)
!           (setq articles (gnus-uncompress-range (gnus-active group)))
!           (setq tmparticles gnus-newsgroup-expirable)
!           (while (not (null tmparticles))
!             (setq articles (delq (car tmparticles) articles))
!             (setq tmparticles (cdr tmparticles)))
!           articles)
!          (t
            (sort (append gnus-newsgroup-dormant gnus-newsgroup-marked
                          (copy-sequence gnus-newsgroup-unreads))
!                 '<))))
         (scored-list (gnus-killed-articles gnus-newsgroup-killed articles))
         (scored (length scored-list))
         (number (length articles))

  parent reply	other threads:[~1998-03-16  4:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-14 22:03 jari.aalto
1998-03-15  2:51 ` SL Baur
1998-03-15 10:26   ` jari.aalto
1998-03-15 18:41   ` Per Abrahamsen
1998-03-15 20:50     ` jari.aalto
1998-03-15 21:24       ` Hallvard B Furuseth
1998-03-15 23:09     ` Hrvoje Niksic
1998-03-16  7:08       ` Yair Friedman
1998-03-16  8:07     ` SL Baur
1998-03-16 16:00       ` Per Abrahamsen
1998-03-15 19:39 ` Hallvard B Furuseth
1998-03-15 23:14 ` Justin Sheehy
1998-03-16  4:13 ` Wes Hardaker [this message]
1998-03-19 12:37 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x790qbtgr4.fsf@des.castles.com \
    --to=wjhardaker@ucdavis.edu \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).