Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

different colors in buffer-list

1 view
Skip to first unread message

Fabian Braennstroem

unread,
Apr 20, 2004, 3:18:42 AM4/20/04
to
Hello,

how can I use different colors for a certain file-format in the buffer-list?
E.G. all tex-files have a yellow background, the dired-buffers a green, the
shell-buffer a ....


Greetings!
--
Fabian Braennstroem
Duesseldorf/Berlin

Glenn Morris

unread,
Apr 20, 2004, 7:24:45 PM4/20/04
to
Fabian Braennstroem wrote:

> how can I use different colors for a certain file-format in the
> buffer-list? E.G. all tex-files have a yellow background, the
> dired-buffers a green, the shell-buffer a ....

One way is to use ibuffer, which offers an all-round improved buffer
menu experience. It will be part of future Emacs distributions, but is
not in any of the released versions, IIRC. I think it does some
highlighting by default, and it is easily extendable through
ibuffer-fontification-alist. For example:

(defface ibuffer-compress-face '((t (:foreground "Red" :weight bold)))
"Ibuffer compress face")

(add-to-list
'ibuffer-fontification-alist
'(5 (string-match
(concat "\\.\\("
(regexp-opt '("tar" "tgz" "arj" "taz" "lzh" "zip" "z"
"gz" "bz2" "deb" "rpm" "bun" "bgz"))
"\\)$")
(buffer-name))
ibuffer-compress-face))

Fabian Braennstroem

unread,
Apr 21, 2004, 2:00:33 AM4/21/04
to
Hello Glenn,

Glenn Morris <gmorri...@ast.cam.ac.uk> writes:

Thanks a lot! That's what I wanted :-)

0 new messages