Re: face for org-capture template

2021-10-25 Thread Ihor Radchenko
Jean-Christophe Helary  writes:

> (add-hook 'org-capture-mode-hook ’my-buffer-face-mode-fixed)
>
> But that applies the fixed font to the capture target and not to the template 
> buffer...

You probably need buffer-list-update-hook and check for "*Org Select*"
buffer name.

best,
Ihor



face for org-capture template

2021-10-03 Thread Jean-Christophe Helary
I just found how to change the face based on the major mode thanks to 
buffer-face-mode and I'd like to know if there is a similar mechanism to apply 
a given face to the template buffer.

What I have is:

;; polices fixes pour modes
;; https://www.emacswiki.org/emacs/FacesPerBuffer#toc3
(defun my-buffer-face-mode-fixed ()
  "Sets a fixed width (monospace) font in current buffer"
  (interactive)
  (setq buffer-face-mode-face '(:family "PT Mono" :height 115))
  (buffer-face-mode))

(add-hook 'org-capture-mode-hook ’my-buffer-face-mode-fixed)

But that applies the fixed font to the capture target and not to the template 
buffer...

I'm sure the answer is somewhere right under my nose...

-- 
Jean-Christophe Helary @brandelune
https://mac4translators.blogspot.com
https://sr.ht/~brandelune/omegat-as-a-book/