Search code examples
emacscalendarelisp

Configuring calendar markers in emacs


I'm very new to emacs.

I want to start using emacs' calendar and diary functionality.

The code below successfully highlights days with a diary entry using "D".

I would like the current day to be highlighted with "T".

;;; calendar
(require 'calendar)

(setq mark-diary-entries-in-calendar t)
(setq diary-entry-marker "D")

(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(setq calendar-today-marker "T")

Solution

  • This works for me. Aren't you able to see the "T" marker? Did you try reloading Calendar?

    For that purpose I created a simple function and bound to something useful for me:

    (defun reload-calendar ()
      (interactive)
      (kill-buffer-and-window)
      (calendar))
    
    (global-set-key (kbd "C-c C-0") (lambda () (interactive) (reload-calendar)))