bastibe / org-journal

A simple org-mode based journaling mode
BSD 3-Clause "New" or "Revised" License
1.24k stars 123 forks source link

Fixes 370 #371

Closed quantumgc closed 2 years ago

quantumgc commented 2 years ago
quantumgc commented 2 years ago

I've just realised that the default behaviour of org-journal-mode-hook should probably be mentioned in the documentation. I'll make that addition and update this PR.

I've also noted that the anonymous function

(lambda () (add-hook org-journal-encrypt-on
                               'org-journal-encryption-hook
                               nil t))

is added to the hook directly afterwards using an add-hook call. I don't think that function can be removed using the remove-hook interface so should it be added to the defcustom call too?

bastibe commented 2 years ago

I've also noted that the anonymous function

(lambda () (add-hook org-journal-encrypt-on
                               'org-journal-encryption-hook
                               nil t))

is added to the hook directly afterwards using an add-hook call. I don't think that function can be removed using the remove-hook interface so should it be added to the defcustom call too?

Good idea!

quantumgc commented 2 years ago

(come to think of it, org-journal-encryption-hook has the same problem. But I don't know if we can change that without breaking existing functionality.)

I feel like there's also some confusion with org-journal-encrypt-on pointing to an actual hook so that might need to be renamed too (though at that point it feels like it needs a a separate issue/PR).

bastibe commented 2 years ago

Thank you very much!