Merge pull request #2924 from bandresen/fix_contrib-journal

Fix: contrib/journal: `buffer-file-name' is nil in *Capture* buffer
This commit is contained in:
Henrik Lissner 2020-04-17 13:01:32 -04:00 committed by GitHub
commit ec5303bfd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,7 @@
(defun +org-journal-mode-maybe ()
"Activate `org-journal-mode', maybe."
(and (eq major-mode 'org-mode)
(stringp buffer-file-name)
(string-match-p org-journal-file-pattern buffer-file-name)
(let ((org-mode-hook (remq '+org-journal-mode-maybe org-mode-hook)))
(org-journal-mode))))