1
0
Fork
You've already forked calloc
0
Calendar localizations for Emacs
  • Emacs Lisp 100%
2026年05月18日 21:47:28 +02:00
calloc-nb_NO.el Fix missing parenthesis after calloc--extra-flag-days in calloc-nb_NO.el and calloc-nn_NO.el. 2026年03月26日 10:55:40 +01:00
calloc-nn_NO.el Fix missing parenthesis after calloc--extra-flag-days in calloc-nb_NO.el and calloc-nn_NO.el. 2026年03月26日 10:55:40 +01:00
calloc.el Remove extra b in buffer. 2026年05月18日 21:47:28 +02:00
LICENSE First commit of Calloc. 2026年03月18日 22:24:05 +01:00
README.org Add information about the extra flag days functionality in README. 2026年03月25日 14:55:28 +01:00

Calloc

Calloc is a calendar localization framework for the Emacs calendar. It supplies your locale's official red calendar days, official flag days, other often commemorated days, the days summer and winter time starts and ends (if it is observed in your locale), and localized time formats, names of days, months, hemisphere-seasons, lunar phases, sunset, sunrise and date formats.

Some locales also have extra flag days for official flag days for the flag(s) of national minorities and/or semi-independent regions. (Some minorities have their own locale as well, but it makes sense to add official flag days for their flag to the majority language locales as well since some members of minorities have lost the use of their native language, but still want to celebrate their heritage by flagging with their own flag.) Look in the table of locales currently supported to see which locales include extra flag days.

The Emacs calendar is more useful when it is localized since having your locale's red calendar days and other often commemorated days in the calendar makes it easier to use the calendar for planning appointments. If you have a flag pole, then seeing the official flag days of your locale makes it easier to plan which days to get up early to raise the flag. Seeing in the calendar in advance when to set the clock an hour back or forward at the start and end of summertime (daylight saving time) is also useful for planning even if computers and electronic devices sync their clocks over NTP. In addition, localizing the Emacs calendar makes it more personal and friendly since it speaks your language.

Installation and configuration

Calloc is currently early in its development and not ready for use. When ready, I will ask if I can get it included in GNU Elpa (and happily assign copyright of it to the FSF) to make it easier to install.

To configure calloc, either use the customize interface (M-x customize) and search for calloc, or configure the variables as in the code block below.

The variable calloc-locale defaults to your system's current locale, but you can configure it manually if you want something else. You can choose which lists of days you want to add to your calendar by setting the calloc-enable-something-days variables to t if you want the corresponding list of days or nil if you do not. By default, every list is on, so if you want everything, you do not need to configure any of these variables.

The variable calloc-extra-flag-days is used for official flag days for other flags used within the same locale. Set it to the name of the flag you want official flag days for, or nil for no extra flag days. The table below lists the extra flag days available for each locale. This feature is useful for flags of minorities or semi-independent regions that have their own official flag days.

(use-package calloc
 :ensure t
 ;; Load calloc after Emacs' calendar
 :after calendar
 :config
 (setopt calloc-locale "nb_NO"
	 calloc-enable-red-days t
	 calloc-enable-flag-days nil	 
	 calloc-enable-extra-flag-days "Samisk"
	 calloc-enable-commemorated-days t
	 calloc-enable-summertime-days t)))

Locales currently supported

English Name Localized name File name Since version Contributed by Extra flag days Notes
Norwegian Bokmål Norsk Bokmål calloc-nb_NO.el 0.0.1 Einar Mostad Samisk 1) and 2)
Norwegian Nynorsk Norsk Nynorsk calloc-nn_NO.el 0.1.0 Einar Mostad Samisk 1) and 2)

Notes

  1. Every Sunday is also an official red calendar day in these locales.
  2. The day of parliamentary elections is also a Norwegian flag day, but impossible to calculate. It happens "some monday" in september every four years.

Contributions

Please contribute locale files! Have a look at calloc.el and the existing locale files to see how, open an issue if you have any questions and send a pull request when you have a locale file ready for contribution.

License and copyright

This program is free software licensed under the terms of the GNU General Public License version 3 or (at your option) any later version. See the LICENSE file for more information.

Copyright © 2025 - 2026 Einar Mostad