emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-column face
@ 2011-12-14 14:25 sergio
  2011-12-14 15:15 ` sergio
  0 siblings, 1 reply; 7+ messages in thread
From: sergio @ 2011-12-14 14:25 UTC (permalink / raw)
  To: emacs-orgmode

Hello.

Why org-column has a different font, than default?
It's event not monospace! (DejaVu Sans in my case (foncofig's default))

OK. I want to set org-column font to same as default font.
How should I do this?

(set-face-font 'org-column (face-font 'default))
Doesn't work, is says: error: Invalid face, org-column

OK, but
(add-hook 'org-mode-hook (lambda ()
       (set-face-font 'org-column (face-font 'default))))
also doesn't work, without any error.

(add-hook 'org-mode-hook (lambda ()
        (set-face-font 'org-column "terminus-10")))
works, but I don't want to write terminus-10 twice in my config.

-- 
sergio.

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

* Re: org-column face
  2011-12-14 14:25 org-column face sergio
@ 2011-12-14 15:15 ` sergio
  2011-12-15 14:25   ` Michael Brand
  0 siblings, 1 reply; 7+ messages in thread
From: sergio @ 2011-12-14 15:15 UTC (permalink / raw)
  To: emacs-orgmode

On 12/14/2011 06:25 PM, sergio wrote:

> Why org-column has a different font, than default?

I just realized (thank to Nick, who answered personally to me), that if
I write:
(set-face-font 'default "terminus-10")
org-column uses this font, but I want to define default font so:
(setq default-frame-alist '(
...
	(font . "terminus-10")
...
))


-- 
sergio.

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

* Re: org-column face
  2011-12-14 15:15 ` sergio
@ 2011-12-15 14:25   ` Michael Brand
  2012-01-02 19:08     ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Brand @ 2011-12-15 14:25 UTC (permalink / raw)
  To: Org Mode; +Cc: sergio

Hi all

On Wed, Dec 14, 2011 at 16:15, sergio <mailbox@sergio.spb.ru> wrote:
> (setq default-frame-alist '(
> ...
>        (font . "terminus-10")
> ...
> ))

Thank you for this hint. Changing my setup from set-frame-font to
default-frame-alist now helps me to get the desired font for
org-culumn-face for the case when I open a file /tmp/test.org manually
after

emacs -q -l /tmp/font.el

But when I open the file with

emacs -q -l /tmp/font.el /tmp/test.org

then the original default font is still in effect for org-column-face
unexpectedly. The only difference in "C-u C-x =" is the <size> in the
line

xft:-unknown-DejaVu Sans
Mono-normal-normal-normal-*-<size>-*-*-*-m-0-iso10646-1 (#x03)

The above comparison was GNU Emacs 23.1.1 with both original
org-version 6.21b or both my current Org release_7.7-537-g7e31.dirty
and a minimal /tmp/font.el:

(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
;; optionally comment this out
(add-to-list 'load-path "/f/git/org-mode/lisp/")
(require 'org-install)

What I don't understand too: When I append (require 'org) to (require
'org-install) then also "emacs -q -l /tmp/font.el" does not work any
more again.

What is the right way for the setup to get all this working?

Michael

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

* Re: org-column face
  2011-12-15 14:25   ` Michael Brand
@ 2012-01-02 19:08     ` Bastien
  2012-01-03  7:21       ` Michael Brand
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2012-01-02 19:08 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode, sergio

Hi Michael,

Michael Brand <michael.ch.brand@gmail.com> writes:

> What is the right way for the setup to get all this working?

The default face for the column view is DeJa Sans Mono for me,
working fine.

Are things okay by just setting the face with 

  M-x customize-face RET org-column RET

then picking up the font family of your choice?

-- 
 Bastien

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

* Re: org-column face
  2012-01-02 19:08     ` Bastien
@ 2012-01-03  7:21       ` Michael Brand
  2012-01-04 10:32         ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Brand @ 2012-01-03  7:21 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode, sergio

Hi Bastien

Setting org-column-face did not solve my issues (and in my opinion
should be avoided if possible) but helped me to find out that the
problem is either set-frame-font too late in my large setup or the use
of default-frame-alist even when at the first place. This minimal
setup works for all use cases mentioned earlier:

(set-frame-font "DejaVu Sans Mono-12")
(add-to-list 'load-path "/f/git/org-mode/lisp/")
(require 'org-install)
(require 'org)

Now I am a bit confused why the above works but not

(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
(add-to-list 'load-path "/f/git/org-mode/lisp/")
(require 'org-install)
(require 'org)

because the Emacs info manual mentions default-frame-alist but not
set-frame-font.

Michael

On Mon, Jan 2, 2012 at 20:08, Bastien <bzg@altern.org> wrote:
> Michael Brand <michael.ch.brand@gmail.com> writes:
>
>> What is the right way for the setup to get all this working?
>
> The default face for the column view is DeJa Sans Mono for me,
> working fine.
>
> Are things okay by just setting the face with
>
>  M-x customize-face RET org-column RET
>
> then picking up the font family of your choice?

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

* Re: org-column face
  2012-01-03  7:21       ` Michael Brand
@ 2012-01-04 10:32         ` Bastien
  2012-01-05 17:14           ` Michael Brand
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2012-01-04 10:32 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode, sergio

Hi Michael,

Michael Brand <michael.ch.brand@gmail.com> writes:

> (set-frame-font "DejaVu Sans Mono-12")
> (add-to-list 'load-path "/f/git/org-mode/lisp/")
> (require 'org-install)
> (require 'org)
>
> Now I am a bit confused why the above works but not
>
> (add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))

What about (add-to-list 'initial-frame-alist '(font . "DejaVu Sans Mono-12"))

?

`initial-frame-alist' is for the first frame, `default-frame-alist' for
the ones that are created later one.  Just a guess.

HTH,

-- 
 Bastien

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

* Re: org-column face
  2012-01-04 10:32         ` Bastien
@ 2012-01-05 17:14           ` Michael Brand
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Brand @ 2012-01-05 17:14 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode, sergio

Hi Bastien

On Wed, Jan 4, 2012 at 11:32, Bastien <bzg@altern.org> wrote:
> `initial-frame-alist' is for the first frame, `default-frame-alist' for
> the ones that are created later one.  Just a guess.

None of the *-frame-alist that I tested changes the font for all use cases:
- default-frame-alist
- initial-frame-alist
- frame-initial-frame-alist
- window-system-default-frame-alist

But set-frame-font works when early enough in my setup and is sufficient for me.

Michael

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

end of thread, other threads:[~2012-01-05 17:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 14:25 org-column face sergio
2011-12-14 15:15 ` sergio
2011-12-15 14:25   ` Michael Brand
2012-01-02 19:08     ` Bastien
2012-01-03  7:21       ` Michael Brand
2012-01-04 10:32         ` Bastien
2012-01-05 17:14           ` Michael Brand

Code repositories for project(s) associated with this public inbox

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

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