branch: externals/denote-journal commit 9463ced29ae0395ac124cae899d01605d16c0214 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Update how denote-journal-calendar-mode should be enabled --- README.org | 16 ++++++++++------ denote-journal.el | 1 - 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.org b/README.org index 52b3653ee6..197b38bada 100644 --- a/README.org +++ b/README.org @@ -127,6 +127,7 @@ Everything is in place to set up the package. :commands ( denote-journal-new-entry denote-journal-new-or-existing-entry denote-journal-link-or-create-entry ) + :hook (calendar-mode . denote-journal-calendar-mode) :config ;; Use the "journal" subdirectory of the `denote-directory'. Set this ;; to nil to use the `denote-directory' instead. @@ -136,9 +137,7 @@ Everything is in place to set up the package. ;; strings. (setq denote-journal-keyword "journal") ;; Read the doc string of `denote-journal-title-format'. - (setq denote-journal-title-format 'day-date-month-year) - - (denote-journal-calendar-mode 1)) + (setq denote-journal-title-format 'day-date-month-year)) #+end_src * Overview @@ -250,9 +249,14 @@ completion to select one among them. #+findex: denote-journal-calendar-mode #+vindex: denote-journal-calendar -The minor mode ~denote-journal-calendar-mode~ marks the dates in the -=M-x calendar= that have a Denote journal entry. The face applied to -them is the ~denote-journal-calendar~. +The buffer-local minor mode ~denote-journal-calendar-mode~ marks the +dates in the =M-x calendar= that have a Denote journal entry. The face +applied to them is the ~denote-journal-calendar~. Activate the mode +via the ~calendar-mode-hook~: + +#+begin_src emacs-lisp +(add-hook 'calendar-mode-hook #'denote-journal-calendar-mode) +#+end_src #+vindex: denote-journal-calendar-mode-map The ~denote-journal-calendar-mode~ also activates the key map called diff --git a/denote-journal.el b/denote-journal.el index 9c5e682961..4b2767ceaf 100644 --- a/denote-journal.el +++ b/denote-journal.el @@ -365,7 +365,6 @@ among them." map) "Key map for `denote-journal-calendar-mode'.") -;;;###autoload (define-minor-mode denote-journal-calendar-mode "Mark Denote journal entries in the `calendar' using `denote-journal-calendar' face." :global nil