unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* A nice gnus thread tree in console
@ 2006-12-07 22:31 Leo
  0 siblings, 0 replies; 5+ messages in thread
From: Leo @ 2006-12-07 22:31 UTC (permalink / raw)


Hi there,

I came across this screenshot¹ and really like the nice thread
tree. Does anyone know how to setup this in Emacs 22? Thank you very
much.

Footnotes: 
¹  http://www.dd.chalmers.se/~bojohan/emacs/img/gnus2.png
-- 
Leo

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

* Re: A nice gnus thread tree in console
       [not found] <mailman.1657.1165530732.2155.help-gnu-emacs@gnu.org>
@ 2006-12-08 15:51 ` Johan Bockgård
  2006-12-08 18:04   ` Leo
       [not found]   ` <mailman.1677.1165601084.2155.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Johan Bockgård @ 2006-12-08 15:51 UTC (permalink / raw)


Leo <sdl.web@gmail.com> writes:

> I came across this screenshot¹ and really like the nice thread
> tree.

Thanks :)

> Does anyone know how to setup this in Emacs 22? Thank you very much.

http://www.emacswiki.org/cgi-bin/wiki/GnusFormatting

-- 
Johan Bockgård

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

* Re: A nice gnus thread tree in console
  2006-12-08 15:51 ` Johan Bockgård
@ 2006-12-08 18:04   ` Leo
       [not found]   ` <mailman.1677.1165601084.2155.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Leo @ 2006-12-08 18:04 UTC (permalink / raw)


On FRI, 8 DEC 2006, Johan Bockgård wrote:

> Leo <sdl.web@gmail.com> writes:
>
>> I came across this screenshot¹ and really like the nice thread
>> tree.
>
> Thanks :)
>
>> Does anyone know how to setup this in Emacs 22? Thank you very much.
>
> http://www.emacswiki.org/cgi-bin/wiki/GnusFormatting

Thank you for the pointer. I actually have seen this page before :-)

I don't quite understand how people find the glyphs.

(dolist (c '((?\207 . ?q) (?\216 . ?x) (?\212 . ?t) (?\203 . ?m)))
  (aset standard-display-table (car c)
	(vector (create-glyph (concat "\e(0" "\e[35m" ; magenta
				      (char-to-string (cdr c))
				      "\e[0m" "\e(B")))))

-- 
Leo

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

* Re: A nice gnus thread tree in console
       [not found]   ` <mailman.1677.1165601084.2155.help-gnu-emacs@gnu.org>
@ 2006-12-08 19:13     ` Johan Bockgård
  2006-12-08 21:06       ` Leo
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Bockgård @ 2006-12-08 19:13 UTC (permalink / raw)


Leo <sdl.web@gmail.com> writes:

> I don't quite understand how people find the glyphs.
>
> (dolist (c '((?\207 . ?q) (?\216 . ?x) (?\212 . ?t) (?\203 . ?m)))
>   (aset standard-display-table (car c)
> 	(vector (create-glyph (concat "\e(0" "\e[35m" ; magenta
> 				      (char-to-string (cdr c))
> 				      "\e[0m" "\e(B")))))

"ESC ( C" switches character sets.
"ESC [ N m" selects color.

    http://www.xfree86.org/current/ctlseqs.html

"m" is a lower-left corner character etc.

    http://vt100.net/docs/tp83/appendixa.html (bottom)

The \nnn numbers are somewhat arbitrary in this context.

-- 
Johan Bockgård

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

* Re: A nice gnus thread tree in console
  2006-12-08 19:13     ` Johan Bockgård
@ 2006-12-08 21:06       ` Leo
  0 siblings, 0 replies; 5+ messages in thread
From: Leo @ 2006-12-08 21:06 UTC (permalink / raw)


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

On FRI, 8 DEC 2006, Johan Bockgård wrote:

> Leo <sdl.web@gmail.com> writes:
>
>> I don't quite understand how people find the glyphs.
>>
>> (dolist (c '((?\207 . ?q) (?\216 . ?x) (?\212 . ?t) (?\203 . ?m)))
>>   (aset standard-display-table (car c)
>> 	(vector (create-glyph (concat "\e(0" "\e[35m" ; magenta
>> 				      (char-to-string (cdr c))
>> 				      "\e[0m" "\e(B")))))
>
> "ESC ( C" switches character sets.
> "ESC [ N m" selects color.
>
>     http://www.xfree86.org/current/ctlseqs.html
>
> "m" is a lower-left corner character etc.
>
>     http://vt100.net/docs/tp83/appendixa.html (bottom)
>
> The \nnn numbers are somewhat arbitrary in this context.

Thank you.

Now I pick up some pieces of code from the emacswiki and put them in a
function as:

(defun my-gnus-summary-line-format-ascii-fancy ()
  "Use fancy ASCII graphics to display thread tree."
  (interactive)
  (setq gnus-summary-line-format
	(concat
	 "%0{%U%R%z%u&@;%}"
	 "%10{|%}"
	 "%1{%d%}"
	 "%10{|%}"
	 "%( %-15,15f %)"
	 "%10{|%}"
	 "%4k"
	 "%10{|%}"
	 "%2u&score;"
	 "%10{|%}"
	 "%u&thread;%s\n"))
  (unless standard-display-table
    (setq standard-display-table (make-display-table)))
  (dolist (c '((?\207 . ?q) (?\216 . ?x) (?\212 . ?t) (?\203 . ?m)))
    (aset standard-display-table (car c)
	  (vector (create-glyph (concat "\e(0" "\e[36m" ; magenta
					(char-to-string (cdr c))
					"\e[0m" "\e(B")))))
  (setq gnus-sum-thread-tree-vertical "\216"
	gnus-sum-thread-tree-root ""
	gnus-sum-thread-tree-false-root ""
	gnus-sum-thread-tree-indent " "
	gnus-sum-thread-tree-single-indent ""
	gnus-sum-thread-tree-leaf-with-other "\212\207>"
	gnus-sum-thread-tree-single-leaf "\203\207>")
  (gnus-message 5 "Using fancy ascii tree layout."))

The thread tree can be displayed in emacs starting in gnome-terminal
or xterm etc. but with strange background color. See the screen shot.


[-- Attachment #2: gnus-eyecandy.png --]
[-- Type: image/png, Size: 5698 bytes --]

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


However, if started in virtual console (Ctrl-Alt-F1), it is display as
"mq>" etc.

Any ideas?

Again thank you for your help.

-- 
Leo

[-- Attachment #4: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

end of thread, other threads:[~2006-12-08 21:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07 22:31 A nice gnus thread tree in console Leo
     [not found] <mailman.1657.1165530732.2155.help-gnu-emacs@gnu.org>
2006-12-08 15:51 ` Johan Bockgård
2006-12-08 18:04   ` Leo
     [not found]   ` <mailman.1677.1165601084.2155.help-gnu-emacs@gnu.org>
2006-12-08 19:13     ` Johan Bockgård
2006-12-08 21:06       ` Leo

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 read-only IMAP folder(s) and NNTP newsgroup(s).