emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Replace selective-display in Gnus (was: obsolete selective-display ?)


From: Reiner Steib
Subject: Replace selective-display in Gnus (was: obsolete selective-display ?)
Date: Sat, 29 Aug 2009 10:34:09 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux)

On Sat, Aug 29 2009, Dan Nicolaescu wrote:

> Eli Zaretskii <address@hidden> writes:
>   > > From: Dan Nicolaescu <address@hidden>
>   > > Is it time for selective-display be declared obsolete?
>   > > AFAICT there's a single active use in the tree, in gnus.
>   > 
>   > What are the alternatives?
>
> 'invisible property on overlays

Gnus uses selective-display to hide threads in the summary buffer [1].
AFAICS, the relevant code is in `gnus-sum.el'.

In `gnus-summary-hide-thread' ...

      (prog1
          (if (and (> (point) start)
                   (search-backward "\n" start t))
              (progn
                (subst-char-in-region start (point) ?\n ?\^M)
                (gnus-summary-goto-subject article))
            (goto-char start)
            nil))

... and `gnus-summary-show-thread' ...

    (prog1
        ;; Any hidden lines here?
        (search-forward "\r" end t)
      (subst-char-in-region beg end ?\^M ?\n t)
      (goto-char orig)
      (gnus-summary-position-point))

Could someone propose a patch how to use invisible overlays here?  It
should be compatible with Emacs 21 (and up) and XEmacs 21.4 (and up)
if possible.

There's also `gnus-summary-mode' where probably these lines should be
removed:

  (setq selective-display t)
  (setq selective-display-ellipses t)   ;Display `...'

Bye, Reiner.

[1] Examples:

    show threads (`T S', `gnus-summary-show-all-threads'):

      3.6k Dan Nicolaescu       ┌─▶  obsolete selective-display ?
      3.8k Eli Zaretskii        ╰┬─►  
      4.2k Dan Nicolaescu        ╰┬─►  
       11k Ted Zlatanov         ┌─▶  Re: Emacs 23.1 flushes stdin on startup
      4.0k Stefan Monnier       ╰┬─►  
       10k Ted Zlatanov          ╰┬─►  
      5.5k Tom Tromey           ┌─▶  advice needed for multi-threading patch
      6.0k Giuseppe Scrivano    ╰┬─►  

    hide threads (`T H', `gnus-summary-hide-all-threads'):

      3.6k Dan Nicolaescu       ┌─▶  obsolete selective-display ?...
       11k Ted Zlatanov         ┌─▶  Re: Emacs 23.1 flushes stdin on startup...
      5.5k Tom Tromey           ┌─▶  advice needed for multi-threading patch...
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]