help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: A nice gnus thread tree in console


From: Leo
Subject: Re: A nice gnus thread tree in console
Date: Fri, 08 Dec 2006 21:06:50 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux)

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

> Leo <address@hidden> 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: gnus-eyecandy.png
Description: gnus-eyecandy.png

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

Any ideas?

Again thank you for your help.

-- 
Leo

reply via email to

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