unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: different colors in buffer-list
       [not found] <87pta3p165.fsf@tfdpc12.tfd.chalmers.se>
@ 2004-04-20 23:24 ` Glenn Morris
  2004-04-21  6:00   ` Fabian Braennstroem
  0 siblings, 1 reply; 2+ messages in thread
From: Glenn Morris @ 2004-04-20 23:24 UTC (permalink / raw)


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

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

* Re: different colors in buffer-list
  2004-04-20 23:24 ` different colors in buffer-list Glenn Morris
@ 2004-04-21  6:00   ` Fabian Braennstroem
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Braennstroem @ 2004-04-21  6:00 UTC (permalink / raw)


Hello Glenn,

Glenn Morris <gmorris+news@ast.cam.ac.uk> writes:

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

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

Greetings!
-- 
Fabian Braennstroem
Duesseldorf/Berlin

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

end of thread, other threads:[~2004-04-21  6:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87pta3p165.fsf@tfdpc12.tfd.chalmers.se>
2004-04-20 23:24 ` different colors in buffer-list Glenn Morris
2004-04-21  6:00   ` Fabian Braennstroem

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