I started using Emacs on Linux, now I moved to Mac OS and my problems began.

When I use org-capture to capture stuff to a datetree, it duplicates the day entry instead of just adding a new node under the existing day.


* 2019
** 2019-08
*** 2019-08-09 Sexta Feira
**** [2019-08-09 Sex 01:21] Entry 1
*** 2019-08-09 Sexta Feira
**** [2019-08-09 Sex 03:55] Entry 2
*** 2019-08-09 Sexta Feira
**** [2019-08-09 Sex 17:19] Entry 3

The 2019-08-09 Sexta Feira part is duplicated for every new entry on that same day.

I know what the problem is, BUT I DON'T KNOW HOW TO FIX IT. On Linux, the day appears as "sexta" (one word). On Mac OS, it's "Sexta Feira" (two words, without hyphen).

I could track things down to the org-datetree-find-day-create function. It uses a regex that ends with \w+, but it won't match a day with more than one word.

How can I fix it? My emacs knowledge is limited, so any help is welcome.

  • How are you getting two words? Using "pt_BR.UTF-8" I get one word only and it's lower case. – jagrg Aug 11 '19 at 1:48
  • @jagrg I'm using the command date +"%A". Are you using Mac OS? On Linux, Monday is "segunda", on Mac it's "Segunda Feira". It's true for any day from Monday to Friday. Linux drops the "feira" from the name of the day and is all lowercase. I'm on Mac OS Mojave. – Leonardo Bighi Aug 11 '19 at 22:52
  • I use Linux but you're right about the regexp matching one word only. Maybe you should file a bug report. – jagrg Aug 12 '19 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.