Subject: bug#53764: 27.1; shouldn't ~/diary be in diary-mode?

From: Francesco Potortì <[email-masked]>
Date: Sat, 05 Feb 2022 16:02:30 +0100

>Francesco Potortì <[email-masked]> writes:
>> Is there any reason why the ~/diary file is not read in diary-mode?
>>
>> Shouldn't it be in the auto-mode-alist?
>>
>> Maybe the reason is that the name of the diary is contained in the
>> diay-file variable and can thus be changed?

Lars:
>I think putting any file that's called "diary" in diary-mode would
>probably lead to too many false positives?  "~/.emacs.d/diary" (which is
>the default on many platforms) could safely be put in diary mode,
>though, but I'm not sure that would be all that helpful in practice...

When calendar is loaded, diary-file is initialised.  After that, it could be added to the auto-mode-alist.

The reason I am asking is that I have used the diary for years, and only recently, by looking at the source code for other reasons, did I discover that a diary-mode exists.

Now I have added -*-diary-*- line to my diary file, but in fact that should be automatic, I think.