all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* interaction of fontified calendar entries and org-read-date
@ 2024-02-13 15:45 John Kitchin
  2024-02-14 15:04 ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: John Kitchin @ 2024-02-13 15:45 UTC (permalink / raw)
  To: Emacs Orgmode

[-- Attachment #1: Type: text/plain, Size: 1940 bytes --]

I am trying to debug something in org-read-date.

If I run this code:

(let* ((mark-calendar (lambda ()
(calendar-mark-visible-date
(read (format-time-string "(%m %d %Y)"))
'font-lock-warning-face)))
       (calendar-today-visible-hook))
  (add-hook 'calendar-today-visible-hook
   mark-calendar)
  (org-read-date))

I get a little calendar that pops up, today is marked red, and there is a
red square on it. I can use shift arrows to move the red box around so i
can see what day is selected.

This slightly different code (differs only in assigning an anonymous face
instead of an actual face doesn't do that exactly. Today is still marked
red, but it is no longer selected with the inverse square. Neighboring days
do get the red square, but not "today".

(let* ((mark-calendar (lambda ()
(calendar-mark-visible-date
(read (format-time-string "(%m %d %Y)"))
(list :foreground "red" :weight 'bold))))
       (calendar-today-visible-hook))
  (add-hook 'calendar-today-visible-hook
   mark-calendar)
  (org-read-date))

This is somewhat of an xy kind of question. I am writing code that sets the
color of a day based on the number of tasks due that day, so I can't
exactly define faces for all of those, and I was using the anonymous face
for that. However, in doing that I lost the inverse video selection cursor
so it is hard to tell where the cursor actually is.

I assume that somewhere the cursor is getting an inverse-video attribute
from the face that isn't present in the anonymous face, but I haven't been
able to figure out where that comes in.

Any suggestions for either how to fix this, or another approach to coloring
the days in the calendar?

-- 
John

-----------------------------------
Professor John Kitchin (he/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
https://kitchingroup.cheme.cmu.edu
https://pointbreezepubs.gumroad.com/ pycse bookstore

[-- Attachment #2: Type: text/html, Size: 2661 bytes --]

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

end of thread, other threads:[~2024-02-21 19:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13 15:45 interaction of fontified calendar entries and org-read-date John Kitchin
2024-02-14 15:04 ` Ihor Radchenko
2024-02-14 18:13   ` John Kitchin
2024-02-14 20:18     ` Ihor Radchenko
2024-02-15  1:17       ` John Kitchin
2024-02-21 11:21         ` Ihor Radchenko
2024-02-21 14:59           ` John Kitchin

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.