- Emacs Lisp 100%
| calloc-nb_NO.el | Fix missing parenthesis after calloc--extra-flag-days in calloc-nb_NO.el and calloc-nn_NO.el. | |
| calloc-nn_NO.el | Fix missing parenthesis after calloc--extra-flag-days in calloc-nb_NO.el and calloc-nn_NO.el. | |
| calloc.el | Remove extra b in buffer. | |
| LICENSE | First commit of Calloc. | |
| README.org | Add information about the extra flag days functionality in README. | |
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
Notes
- Every Sunday is also an official red calendar day in these locales.
- 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