beorg 3.24.0 - dates, outlines and the init.org file

November 6, 2023

beorg 3.24.0

Better localization of date and time formats

A beorg user got in touch recently to say that even though their iPhone was set to show time using the 12-hour clock, beorg was showing a mixture of 12 and 24-hour clock across the UI. On digging into this a little more I discovered an app wide inconsistency in how dates and times were displayed. In the .org files that beorg writes there is a specific date and time format which must always use the 24-hour clock, and the date written as year-month-day. However, when dates are displayed to the user a good iOS citizen should respect the region set on the device.

I’ve gone through the beorg code and centralized formatting of dates and times. Now when you see a date and/or time in the UI it should use the same format as apps such as Calendar.

If you would like more flexibility on how dates and times are formatted there are three new Scheme variables. These allow you to set a custom format to be used when:

Here is an example of an init.org file (the way you do advanced customizations in beorg) which sets some custom dates and times:

* Custom date and time formats
#+begin_src scheme
(set! org-date-format "yyyy-MM-dd")
(set! org-date-time-format "yyyy-MM-dd HH:mm")
(set! org-time-format "HH:mm")
#+end_src

For a guide on how to construct date and time formats see this page on unicode.org. See Creating an init.org if you aren’t familiar with the init.org file.

More control over outliner folding

beorg now checks the STARTUP keyword in a file to determine which headlines should be open when you open an outline. If a file doesn’t have a STARTUP keyword then the Scheme variable org-startup-folded is checked (this defaults to overview).

Here is an example that tells beorg and Emacs to open the file completely unfolded:

#+STARTUP: showeverything
* Shopping
** Fruit
*** Citrus
- Lemons
- Lime
** Vegetables
- Courgettes
- Peas
** Non-food
- Surface spray

The available options for the STARTUP keyword are:

Do you have an init.org?

If you have an init.org file for advanced customization of beorg then you’ll find having to kill beorg each time you want to try some changes cumbersome. In beorg 3.24.0 you can now execute (reset-scheme) in the REPL, and beorg will completely reset the Scheme environment and reload the init.org file. Hopefully you’ll find this a useful addition. In a future update I hope to improve this further by offering to do this for you if you’ve modified the init.org file from within beorg.

Download now for iPhone and iPad

Follow us on Mastodon

Privacy Policy | Press Kit