emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to make change the appearance of org-date inside a drawer?
@ 2023-01-05 18:04 William Denton
  2023-01-07  9:16 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: William Denton @ 2023-01-05 18:04 UTC (permalink / raw)
  To: emacs-orgmode

I would like to make drawers look fainter and smaller.  I have this mostly 
working, with this:

(face-spec-set 'org-drawer '((t (:foreground "dim gray" :weight normal :height 0.9))))
(face-spec-set 'org-special-keyword '((t (:foreground "dim gray" :weight normal :height 0.9))))
(face-spec-set 'org-property-value '((t (:weight normal :height 0.9))))

But then there is this case:

:LOGBOOK:
CLOCK: [2023-01-04 Wed 14:05]--[2023-01-04 Wed 17:33] =>  3:28
:END:

Here LOGBOOK and CLOCK are smaller, but the timestamps are full size.  (This 
won't come across in plain text email, of course.)

describe-char there tells me the timestamp has the face org-date.  Is there a 
way to make org-date smaller when it's in a drawer?  I don't want to make a 
global setting for it, because I often use dates in headings.


Thanks,

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada


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

* Re: How to make change the appearance of org-date inside a drawer?
  2023-01-05 18:04 How to make change the appearance of org-date inside a drawer? William Denton
@ 2023-01-07  9:16 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-01-07  9:16 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

William Denton <wtd@pobox.com> writes:

> describe-char there tells me the timestamp has the face org-date.  Is there a 
> way to make org-date smaller when it's in a drawer?  I don't want to make a 
> global setting for it, because I often use dates in headings.

Not yet.
For now, you can use `org-font-lock-set-keywords-hook' to add a custom
font-lock keyword that will check if point is in drawer and apply
alternative timestamp face.

See `font-lock-keywords' docstring. It is long and not very easy to
understand, but the options are flexible enough to achieve anything you
want.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2023-01-07  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-05 18:04 How to make change the appearance of org-date inside a drawer? William Denton
2023-01-07  9:16 ` Ihor Radchenko

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