all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to color full line in dired
@ 2002-11-20 12:01 Astrid Kuhr
  2002-11-21 23:54 ` Kin Cho
  2002-11-23 21:22 ` Kai Großjohann
  0 siblings, 2 replies; 9+ messages in thread
From: Astrid Kuhr @ 2002-11-20 12:01 UTC (permalink / raw)



Hello!

On emacs 19.34 I had following lines in my .emacs:

 ;;--------------------------------------------------------------------- 
 ;; font-lock fuer die ganze Zeile im dired-mode
 ;;--------------------------------------------------------------------- 
 (setq dired-font-lock-keywords
 '(
   ;; Put directory headers in italics.
   ("^  \\(/.+\\)" 1 font-lock-dired-header-face)
   ;; Put symlinks in bold italics.
   ("^\\(.*[^ ]+\\) -> [^ ]+$" . font-lock-dired-link-face)
   ;; Put marks in bold.
   ("^[^ ].*$" . font-lock-reference-face)
   ;; Put files that are subdirectories in bold.
   ("^..d.* \\([^ ]+\\)$" . font-lock-dired-dir-face)
   ;; Put Trash in green
   ("^.*~$"    . font-lock-dired-trash-face)
   ("^.*#*#$"  . font-lock-dired-trash-face)
   ("^.*\\.o$" . font-lock-dired-trash-face)
   ("^.*\\.elc$" . font-lock-dired-trash-face)
   ("^.*\\.aux$" . font-lock-dired-trash-face)
   ("^.*\\.div$" . font-lock-dired-trash-face)
   ("^.*\\.idx$" . font-lock-dired-trash-face)
   ("^.*\\.lof$" . font-lock-dired-trash-face)
   ("^.*\\.lot$" . font-lock-dired-trash-face)
   ("^.*\\.toc$" . font-lock-dired-trash-face)
   ("^.*\\.log$" . font-lock-dired-trash-face))
 )
 (defvar font-lock-face-attributes 					 
 (list
  ;;                                 
  (list 'font-lock-dired-link-face "Firebrick"        nil nil t   nil)
  (list 'font-lock-dired-trash-face "ForestGreen"     nil nil nil nil)
  (list 'font-lock-dired-header-face "tomato"         nil t   nil nil)
  (list 'font-lock-dired-dir-face "blue"              nil nil nil nil)
  )
 )

For highlighting the hole line in the dired mode, e.g. of a directory.
It works very well.

But now I change to emacs 20.5.3 and want to get the same result.
How can I define in the new emacs some additional font-lock-dired
keywords like the font-lock-dired-header-face? And how can I then
describe, which lines should be then with this color?

Regards, Astrid

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

* Re: How to color full line in dired
  2002-11-20 12:01 How to color full line in dired Astrid Kuhr
@ 2002-11-21 23:54 ` Kin Cho
  2002-11-24 11:51   ` Astrid Kuhr
  2002-11-23 21:22 ` Kai Großjohann
  1 sibling, 1 reply; 9+ messages in thread
From: Kin Cho @ 2002-11-21 23:54 UTC (permalink / raw)


Try highline:

(add-hook 'dired-mode-hook 'highline-on)

Look for highline.el in google.

-kin

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

* Re: How to color full line in dired
  2002-11-20 12:01 How to color full line in dired Astrid Kuhr
  2002-11-21 23:54 ` Kin Cho
@ 2002-11-23 21:22 ` Kai Großjohann
  2002-11-24 11:51   ` Astrid Kuhr
  1 sibling, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2002-11-23 21:22 UTC (permalink / raw)


Astrid Kuhr <a.kuhr@web.de> writes:

>  (defvar font-lock-face-attributes 					 
>  (list
>   ;;                                 
>   (list 'font-lock-dired-link-face "Firebrick"        nil nil t   nil)
>   (list 'font-lock-dired-trash-face "ForestGreen"     nil nil nil nil)
>   (list 'font-lock-dired-header-face "tomato"         nil t   nil nil)
>   (list 'font-lock-dired-dir-face "blue"              nil nil nil nil)
>   )
>  )

I think in Emacs 20 and higher it is useful to use defface to define
these faces.  For example,

(defface font-lock-dired-link-face
  '((t (:foreground "Firebrick" :bold t)))
  "Face used for symlinks in dired.")

I forget what was the meaning for all those booleans after the fg
color, but I think you get the idea.

Does this help?

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

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

* Re: How to color full line in dired
  2002-11-23 21:22 ` Kai Großjohann
@ 2002-11-24 11:51   ` Astrid Kuhr
  2002-11-24 14:56     ` Kai Großjohann
  2002-11-24 15:51     ` lawrence mitchell
  0 siblings, 2 replies; 9+ messages in thread
From: Astrid Kuhr @ 2002-11-24 11:51 UTC (permalink / raw)


Hello!

Thank you for the information.
> 
> (defface font-lock-dired-link-face
>   '((t (:foreground "Firebrick" :bold t)))
>   "Face used for symlinks in dired.")

I tried this:

(defface ak-dir-face
  '((t (:foreground "Firebrick" :bold t)))
  "Face used for directories in dired.")

(let*()
  (setq 
   dired-font-lock-keywords 
   (list '("^..d.* \\([^ ]+\\)$" . ak-dir-face))
  )
)

But then I get the errormessage: Symbols value as
variable is void: ak-dir-face.

Must I add something else?

Regards, Astrid

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

* Re: How to color full line in dired
  2002-11-21 23:54 ` Kin Cho
@ 2002-11-24 11:51   ` Astrid Kuhr
  0 siblings, 0 replies; 9+ messages in thread
From: Astrid Kuhr @ 2002-11-24 11:51 UTC (permalink / raw)



Hello!

Thank you very much for the information.
I tested highline.el
But this is not, what I am looking for.
I dont want to highlight the current line.

E.g. in dired-mode is in the moment the
names off all directories blue.
But only the name is in blue. What I want:
that the whole line is written in blue letters,
but not only the line where the cursor is in
the moment, all lines with directories.

Regards, Astrid

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

* Re: How to color full line in dired
  2002-11-24 11:51   ` Astrid Kuhr
@ 2002-11-24 14:56     ` Kai Großjohann
  2002-11-24 16:08       ` Astrid Kuhr
  2002-11-24 15:51     ` lawrence mitchell
  1 sibling, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2002-11-24 14:56 UTC (permalink / raw)


Astrid Kuhr <kuhr@ica1.uni-stuttgart.de> writes:

> Hello!
>
> Thank you for the information.
>> 
>> (defface font-lock-dired-link-face
>>   '((t (:foreground "Firebrick" :bold t)))
>>   "Face used for symlinks in dired.")
>
> I tried this:
>
> (defface ak-dir-face
>   '((t (:foreground "Firebrick" :bold t)))
>   "Face used for directories in dired.")
>
> (let*()
>   (setq 
>    dired-font-lock-keywords 
>    (list '("^..d.* \\([^ ]+\\)$" . ak-dir-face))
>   )
> )
>
> But then I get the errormessage: Symbols value as
> variable is void: ak-dir-face.
>
> Must I add something else?

Oh, boy.  This shouldn't happen.  Anyway, maybe you can work around
it by including

    (defvar ak-dir-face 'ak-dir-face)

together with the defface statement.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

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

* Re: How to color full line in dired
  2002-11-24 11:51   ` Astrid Kuhr
  2002-11-24 14:56     ` Kai Großjohann
@ 2002-11-24 15:51     ` lawrence mitchell
  2002-11-24 16:10       ` Astrid Kuhr
  1 sibling, 1 reply; 9+ messages in thread
From: lawrence mitchell @ 2002-11-24 15:51 UTC (permalink / raw)


Astrid Kuhr wrote:

> Hello!

> Thank you for the information.

>> (defface font-lock-dired-link-face
>>   '((t (:foreground "Firebrick" :bold t)))
>>   "Face used for symlinks in dired.")

> I tried this:

> (defface ak-dir-face
>   '((t (:foreground "Firebrick" :bold t)))
>   "Face used for directories in dired.")

> (let*()
>   (setq
>    dired-font-lock-keywords
>    (list '("^..d.* \\([^ ]+\\)$" . ak-dir-face))
                                     ^^
                                     you need 'ak-dir-face here.

[...]

-- 
lawrence mitchell <wence@gmx.li>

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

* Re: How to color full line in dired
  2002-11-24 14:56     ` Kai Großjohann
@ 2002-11-24 16:08       ` Astrid Kuhr
  0 siblings, 0 replies; 9+ messages in thread
From: Astrid Kuhr @ 2002-11-24 16:08 UTC (permalink / raw)


Kai Großjohann wrote:
> 
> Astrid Kuhr <kuhr@ica1.uni-stuttgart.de> writes:
> 
> > Hello!
> >
Thanx, now it works. :)

Regards, Astrid

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

* Re: How to color full line in dired
  2002-11-24 15:51     ` lawrence mitchell
@ 2002-11-24 16:10       ` Astrid Kuhr
  0 siblings, 0 replies; 9+ messages in thread
From: Astrid Kuhr @ 2002-11-24 16:10 UTC (permalink / raw)


Thank you very much. :)
Now it works.

Regards, Astrid

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

end of thread, other threads:[~2002-11-24 16:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-20 12:01 How to color full line in dired Astrid Kuhr
2002-11-21 23:54 ` Kin Cho
2002-11-24 11:51   ` Astrid Kuhr
2002-11-23 21:22 ` Kai Großjohann
2002-11-24 11:51   ` Astrid Kuhr
2002-11-24 14:56     ` Kai Großjohann
2002-11-24 16:08       ` Astrid Kuhr
2002-11-24 15:51     ` lawrence mitchell
2002-11-24 16:10       ` Astrid Kuhr

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.