Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a journal entry opens the file in Fundamental mode #396

Open
rjray opened this issue Aug 21, 2022 · 1 comment
Open

Creating a journal entry opens the file in Fundamental mode #396

rjray opened this issue Aug 21, 2022 · 1 comment

Comments

@rjray
Copy link

rjray commented Aug 21, 2022

Describe the Bug

I've installed the latest org-journal from ELPA, via package-install. When I create a new entry (C-c C-j), it correctly derives the name of the file from the date and opens the new file in the designated directory. However, rather than putting the buffer in org-journal-mode, it puts it in Fundamental instead.

This appears to be due to the following line in org-journal.el either not getting evaluated, or magic-mode-alist being nullified somewhere else:

(add-to-list 'magic-mode-alist '(org-journal-is-journal . org-journal-mode))

Either way, when I examine magic-mode-alist within emacs it is nil.

Desktop Configuration

This is Emacs 27.1 on Ubuntu Linux 22.04.1.

Emacs Configuration

Relevant configuration:

;;; setup-org --- Loading and configuration of org-mode

;;; Commentary:

;;; Code:

(require 'org)
(require 'org-journal)

(setq
 org-default-notes-file "~/Dropbox/org/organizer.org"
 org-journal-dir "~/Dropbox/org/journal"
 org-refile-targets '((org-agenda-files . (:maxlevel . 6))))

(global-set-key (kbd "C-c l") #'org-store-link)
(global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c c") #'org-capture)
(global-set-key (kbd "C-c o")
                (lambda () (interactive)
                  (find-file "~/Dropbox/org/organizer.org")))
(global-set-key (kbd "C-c O")
                (lambda () (interactive)
                  (find-file "~/Dropbox/org")))

(provide 'setup-org)
;;; setup-org.el ends here
@rjray
Copy link
Author

rjray commented Aug 21, 2022

I find that if I visit the org-journal.el file in a buffer and eval-last-sexp on that line, creating a journal entry will start using the correct buffer mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant