kiwanami / emacs-calfw

A calendar framework for Emacs
1.16k stars 100 forks source link

cfw:open-ical-calendar hard-codes the color of the text #143

Open phil-s opened 2 years ago

phil-s commented 2 years ago

https://github.com/kiwanami/emacs-calfw/blob/03abce97620a4a7f7ec5f911e669da9031ab9088/calfw-ical.el#L279

Obviously this can conflict badly with themes.

I think there should be a defcustom color or even a face for this text?

For example:

(defcustom cfw:color-ical "#2952a3"
  "Colour used by `cfw:open-ical-calendar'."
  :type 'color
  :group 'calfw)

and:

-               (list (cfw:ical-create-source "ical" url "#2952a3")))))
+               (list (cfw:ical-create-source "ical" url cfw:color-ical)))))

I can see that this command is in some ways more of a template (and personally I wanted multiple sources visible together, and I could see how to achieve that with different colours for each with a custom variant of the function); but as the default is still useful as a command, I think hard-coding that colour seems wrong, and then themes can add support so users might have reasonable defaults if that default command serves their needs in other respects.


Thank you for these packages. I found https://ict4g.net/adolfo/notes/emacs/emacs-caldav.html and tried it out, and I am very grateful to now have my work calendars viewable in Emacs without the need for an external program.