>>>>> Bastien Guerry <b...@gnu.org> writes:

    > Hi Ruizhou, Ruizhou LIAO <ruizhou.l...@hsbc.com.hk> writes:

    >> By setting ‘️diary-file’ and ‘org-agenda-diary-file’, there is no
    >> issue. Maybe need to update related guideline/ manual.

    > By default `org-agenda-diary-file', is set to 'diary-file and
    > `diary-file' is set to ~/.emacs.d/diary, which is not an .org
    > file.

    > With this default setting, hitting `i d' after M-x calendar RET
    > allows to add a diary entry in ~/.emacs.d/diary in the diary
    > format, not as an Org entry.

    > If you customize `org-agenda-diary-file' to point to an .org file,
    > this file will be used as a diary file instead, storing the
    > entries in Org format.

    > Can you try to remove your `diary-file' setting while setting
    > `org-agenda-diary-file' to an .org file?  It should do the job.

    > Otherwise, can you share the part of your config and a
    > reproducible recipe for the error?

I sometimes get the same error as the OP. The solution for me is always
to open org-agenda first, before the calendar. My settings are:

(setq diary-file "~/.emacs.d/diary/main")
org-agenda-diary-file set to diary-file

Best Wishes,

Colin Baxter.

Reply via email to