Gnus development mailing list
 help / color / mirror / Atom feed
* Suggestion for additional %B-leaf type
@ 2001-08-22 16:29 Martin Kretzschmar
  2001-08-23 16:58 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Kretzschmar @ 2001-08-22 16:29 UTC (permalink / raw)


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

Hi,

I don't really like the %[ and %] in my summary lines. However,
knowing that an article was adopted (is this the right word?) into a
tree is quite useful. So I'd like to encode this in the thread tree
(%B) as in mutt. This patch


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: adopted-leaf-variable for %B --]
[-- Type: text/x-patch, Size: 1008 bytes --]

--- /tmp/gnus-sum.el4258DDW	Tue Aug 14 22:49:50 2001
+++ /tmp/gnus-sum.el425824P	Tue Aug 14 22:49:50 2001
@@ -4115,6 +4115,8 @@
   "With %B spec, used for a leaf with brothers.")
 (defvar gnus-sum-thread-tree-single-leaf "\\-> "
   "With %B spec, used for a leaf without brothers.")
+(defvar gnus-sum-thread-tree-adopted-leaf "\\*> "
+  "With %B spec, used for an adopted leaf")
 
 (defun gnus-summary-prepare-threads (threads)
   "Prepare summary buffer from THREADS and indentation LEVEL.
@@ -4358,9 +4360,11 @@
 					    gnus-sum-thread-tree-vertical
 					  gnus-sum-thread-tree-indent))
 				      (cdr (reverse tree-stack))))
		       (if (nth 1 thread) 
 			   gnus-sum-thread-tree-leaf-with-other
-			 gnus-sum-thread-tree-single-leaf)))))
+			   (if (eq gnus-tmp-opening-bracket ?\<)
+			       gnus-sum-thread-tree-adopted-leaf
+			     gnus-sum-thread-tree-single-leaf))))))
 	    (when (string= gnus-tmp-name "")
 	      (setq gnus-tmp-name gnus-tmp-from))
 	    (unless (numberp gnus-tmp-lines)

[-- Attachment #3: Type: text/plain, Size: 1712 bytes --]


adds a new variable `gnus-sum-thread-tree-adopted-leaf' which is used
for adopted leaves (leaves that would have `<' as opening bracket).

 Question 1: Is it, under any circumstances possible that an adopted
 article has brothers? (I.e. do I need
 `gnus-sum-thread-tree-adopted-leaf-with-other'?

 Question 2: Could this be integrated into Oort?

 Question 3: The patch is optimized for size ;-) Should the line

          (if (eq gnus-tmp-opening-bracket ?\<) 

 be changed so that it doesn't depend on gnus-tmp-opening bracket? 
 Maybe the information `<' or `[' should be factored out into some
 variable. What would be its name?


	Martin

 PS: In Emacs 21, ASCII art does not nearly look as good as unicode art
so I chose these settings under X with the quite complete fixed font:

(setq gnus-sum-thread-tree-root "■ ")
(setq gnus-sum-thread-tree-single-indent "□ ")
(setq gnus-sum-thread-tree-vertical "│ ")
(setq gnus-sum-thread-tree-indent "  ")
(setq gnus-sum-thread-tree-leaf-with-other "├─▶ ")
(setq gnus-sum-thread-tree-single-leaf "╰─▶ ")
(setq gnus-sum-thread-tree-adopted-leaf "╰╶▷ ")

Producing this Summary

O   14-Aug Jason R. Mastaler       (  21) ■ Re: gnus-delay.el: let Gnus remind you of action items 
O   15-Aug Kai Großjohann          (  26)   ├─▶  
O   15-Aug Jason R. Mastaler       (  14)   │ ╰─▶  
O   15-Aug Kai Großjohann          (  14)   ╰─▶  
O   19-Aug Lars Magne Ingebrigtse  (  15)     ╰╶▷  
O   20-Aug Kai Großjohann          (  30)       ╰─▶  
O   20-Aug Lars Magne Ingebrigtse  (  17)         ├─▶  
O   20-Aug Kai Großjohann          (  19)         ╰─▶  

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-24 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-22 16:29 Suggestion for additional %B-leaf type Martin Kretzschmar
2001-08-23 16:58 ` Lars Magne Ingebrigtsen
2001-08-24 20:10   ` Martin Kretzschmar

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).