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

* Re: Suggestion for additional %B-leaf type
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-08-23 16:58 UTC (permalink / raw)


Martin Kretzschmar <Martin.Kretzschmar@inf.tu-dresden.de> writes:

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

[...]

>  Question 1: Is it, under any circumstances possible that an adopted
>  article has brothers?

Sure.  If the parent is missing, all the children will be adopted by
the eldest sibling.

>  Question 2: Could this be integrated into Oort?

I don't know what mutt's thingamabob looks like.  Could you explain
what this is supposed to do?  And can't this be implemented by format
string specs instead of a new variable?

Hmm...  I haven't really tried the tree view thingie.  And the
variables like `gnus-sum-thread-tree-vertical' aren't documented.
Could somebody fix this, please?  And perhaps make those variables
customizable? 

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Suggestion for additional %B-leaf type
  2001-08-23 16:58 ` Lars Magne Ingebrigtsen
@ 2001-08-24 20:10   ` Martin Kretzschmar
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Kretzschmar @ 2001-08-24 20:10 UTC (permalink / raw)


[I guess I need some Message training. Thought I had sent this 7 hours ago]
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Martin Kretzschmar <Martin.Kretzschmar@inf.tu-dresden.de> writes:
>
>>  Question 1: Is it, under any circumstances possible that an adopted
>>  article has brothers?
>
> Sure.  If the parent is missing, all the children will be adopted by
> the eldest sibling.

Oops. I mixed up the real relationship between those articles and
their representation in %B formats. With %B there never seem to be two
adopted articles with the same parents, each adopted article is
indented more than it's brother from the line above. Is this a bug or
a feature of %B?

I use %B as a replacement for %I. Looking closer I see that %I does
not indent adopted articles like %B, it's more like the real
relationship between them.

>>  Question 2: Could this be integrated into Oort?
>
> I don't know what mutt's thingamabob looks like.  Could you explain
> what this is supposed to do?  And can't this be implemented by format
> string specs instead of a new variable?

With the patch, the adopted articles' branches of the tree look
different from non-adopted articles'. Compare these two threads
(the left column has obviously %B in it, the right %I)

  [  15: Lars Magne Ingebrigtsen]              [  15: Lars Magne Ingebrigtsen]
  \*> <  22: Kai Großjohann         >              <  22: Kai Großjohann         >
    \*> <  13: Per Abrahamsen         >            <  13: Per Abrahamsen         >

o [  25: Lars Magne Ingebrigtsen]              [  25: Lars Magne Ingebrigtsen]
\-> [  29: Maciej Matysiak        ]                [  29: Maciej Matysiak        ]

In mutt (as I understand it) adopted articles have that `*' in their
tree. %B without the patch had given `\->' to the adopted articles in
the upper thread. I can't imagine how to implement this by format
string specs. The old^W unpatched %B behaviour can of course be
obtained by setting `gnus-sum-thread-tree-adopted-leaf' to `\->', too.

> Hmm...  I haven't really tried the tree view thingie.  And the
> variables like `gnus-sum-thread-tree-vertical' aren't documented.
> Could somebody fix this, please?  And perhaps make those variables
> customizable? 

I have never used texinfo :-(). And should the `sum' be expanded before making
them more public. The names would still fit on one line in messages
discussing them ;-). I guess they'd get their own defgroup.

	Martin



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