* font for dired mode?
@ 2005-04-21 23:07 David Reitter
2005-04-21 23:29 ` Joe Corneli
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: David Reitter @ 2005-04-21 23:07 UTC (permalink / raw)
Hi,
I'm trying to set a different font for the dired mode. I would like to
make everything appear in "fontset-monaco12". I've tried setting the
faces (like dired-header), but that didn't work at all.
Then I've tried this:
(add-hook 'dired-mode-hook (lambda () (set-frame-font
"fontset-monaco12")))
but the result was only that the buffer from which i called dired was
displayed in monaco, but not the newly opened frame for dired. It's
like the hook is called from the wrong context, with a different frame
being the selected frame.
So I don't know what to do -- anyone have an idea?
Many thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: font for dired mode?
2005-04-21 23:07 David Reitter
@ 2005-04-21 23:29 ` Joe Corneli
2005-04-22 9:23 ` Peter Dyballa
2005-04-22 16:04 ` Kevin Rodgers
2 siblings, 0 replies; 8+ messages in thread
From: Joe Corneli @ 2005-04-21 23:29 UTC (permalink / raw)
Hi,
I'm trying to set a different font for the dired mode. I would like to
make everything appear in "fontset-monaco12". I've tried setting the
faces (like dired-header), but that didn't work at all.
Hm... Did you customize the faces, or just mess around with them by
hand? You should be able to type M-x customize-face with point on a
string exhibiting the face you'd like to change, then change it, then
have your life be improved. Otherwise, I would suggest M-x doctor (or
M-x report-emacs-bug if you feel you need to talk to a human about
things).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: font for dired mode?
@ 2005-04-22 6:29 David Reitter
2005-04-22 13:57 ` Joe Corneli
0 siblings, 1 reply; 8+ messages in thread
From: David Reitter @ 2005-04-22 6:29 UTC (permalink / raw)
Joe Corneli <jcorneli <at> math.utexas.edu> writes:
> I'm trying to set a different font for the dired mode. I would
like to
> make everything appear in "fontset-monaco12". I've tried setting
the
> faces (like dired-header), but that didn't work at all.
>
> Hm... Did you customize the faces, or just mess around with them by
> hand? You should be able to type M-x customize-face
I can customize a whole bunch of dired-* faces, and when I deselect
some "inherit"
flag, the faces a even used in the buffer. However, and that is still
my main problem,
I can't find the face for meta information for a file except for the
file name.
Everything that's marked in [ ] here:
[-rw-r--r-- 1 dr admin 16716 19 Apr 11:09 ] ansi-color.elc
This still appears in the proportional default face.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: font for dired mode?
2005-04-21 23:07 David Reitter
2005-04-21 23:29 ` Joe Corneli
@ 2005-04-22 9:23 ` Peter Dyballa
2005-04-22 9:33 ` David Reitter
2005-04-22 16:04 ` Kevin Rodgers
2 siblings, 1 reply; 8+ messages in thread
From: Peter Dyballa @ 2005-04-22 9:23 UTC (permalink / raw)
Cc: Help-gnu-emacs
Am 22.04.2005 um 01:07 schrieb David Reitter:
> Then I've tried this:
>
> (add-hook 'dired-mode-hook (lambda () (set-frame-font
> "fontset-monaco12")))
>
Hello!
Have you tried M-x customize-group RET dired RET? This will show a few
dired-faces without settings special fonts or fontsets for the items.
If you set them then they'll be fixed to these values ...
--
Greetings
Pete
To be is to do.
-- I. Kant
To do is to be.
-- A. Sartre
Yabba-dabba-doo!
-- F. Flintstone
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: font for dired mode?
2005-04-22 9:23 ` Peter Dyballa
@ 2005-04-22 9:33 ` David Reitter
0 siblings, 0 replies; 8+ messages in thread
From: David Reitter @ 2005-04-22 9:33 UTC (permalink / raw)
Cc: Help-gnu-emacs
On 22 Apr 2005, at 10:23, Peter Dyballa wrote:
> Have you tried M-x customize-group RET dired RET? This will show a few
> dired-faces without settings special fonts or fontsets for the items.
> If you set them then they'll be fixed to these values ...
>
Thanks, yes I've tried that but the problem remains that only the
filenames (rightmost column) get "fontified" --> bad layout if the
other columns are set in a proportional font.
-D
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: font for dired mode?
2005-04-22 6:29 font for dired mode? David Reitter
@ 2005-04-22 13:57 ` Joe Corneli
0 siblings, 0 replies; 8+ messages in thread
From: Joe Corneli @ 2005-04-22 13:57 UTC (permalink / raw)
Everything that's marked in [ ] here:
[-rw-r--r-- 1 dr admin 16716 19 Apr 11:09 ] ansi-color.elc
This still appears in the proportional default face.
That's because it is the proportional default face. If you want to
the way these characters look, either change the definition of the
default face, or change the fontlocking code in dired to use a
different face! Maybe that should be your bug report / feature
request... cause I don't think you can change the default face on a
buffer-by-buffer or mode-by-mode basis, because AFAIK, faces resolve
at the frame level.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: font for dired mode?
2005-04-21 23:07 David Reitter
2005-04-21 23:29 ` Joe Corneli
2005-04-22 9:23 ` Peter Dyballa
@ 2005-04-22 16:04 ` Kevin Rodgers
2 siblings, 0 replies; 8+ messages in thread
From: Kevin Rodgers @ 2005-04-22 16:04 UTC (permalink / raw)
David Reitter wrote:
> I'm trying to set a different font for the dired mode. I would like to
> make everything appear in "fontset-monaco12". I've tried setting the
> faces (like dired-header), but that didn't work at all.
>
> Then I've tried this:
>
> (add-hook 'dired-mode-hook
> (lambda () (set-frame-font "fontset-monaco12")))
>
> but the result was only that the buffer from which i called dired was
> displayed in monaco, but not the newly opened frame for dired. It's like
> the hook is called from the wrong context, with a different frame being
> the selected frame.
Why is the Dired buffer opened in a new frame? Is it because you're
using `C-x 5 d', or is some other customization coming into play
(e.g. special-display-buffer-names)?
Your problem is probably that the Dired buffer is created and the mode
hook is run, before the buffer is displayed -- in particular, before the
new frame is created. I wonder whether this approach will work:
(defvar dired-other-frame-alist nil)
(defadvice dired-other-frame (around frame-alist activate)
(let ((default-frame-alist (append dired-other-frame-alist
default-frame-alist)))
ad-do-it))
(setq dired-other-frame-alist
'((font . "fontset-monaco12")))
Or maybe just:
(add-hook 'after-make-frame-functions
(lambda (frame)
;; do we need to first select the FRAME?
(when (eq major-mode 'dired)
(set-frame-font "fontset-monaco12"))))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: font for dired mode?
@ 2005-04-24 7:53 David Reitter
0 siblings, 0 replies; 8+ messages in thread
From: David Reitter @ 2005-04-24 7:53 UTC (permalink / raw)
Hi Kevin,
problem solved!
> Why is the Dired buffer opened in a new frame? Is it because you're
> using `C-x 5 d', or is some other customization coming into play
> (e.g. special-display-buffer-names)?
Yes, some other customizations are used; it's an option the user has.
> (defvar dired-other-frame-alist nil)
>
> (defadvice dired-other-frame (around frame-alist activate)
Doesn't work for me, I suspect dired-other-frame is not used.
> (add-hook 'after-make-frame-functions
>
This is getting closer! The working code is:
(add-hook 'after-make-frame-functions
(lambda (frame)
(select-frame frame)
(when (eq major-mode 'dired-mode)
(set-frame-font "fontset-monaco12"))))
Many thanks for setting me on the right track
-- David
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-04-24 7:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-22 6:29 font for dired mode? David Reitter
2005-04-22 13:57 ` Joe Corneli
-- strict thread matches above, loose matches on Subject: below --
2005-04-24 7:53 David Reitter
2005-04-21 23:07 David Reitter
2005-04-21 23:29 ` Joe Corneli
2005-04-22 9:23 ` Peter Dyballa
2005-04-22 9:33 ` David Reitter
2005-04-22 16:04 ` Kevin Rodgers
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).