0

Trying to get org-journal working, but it wants to auto-complete nearly every word I type, then require two space bar hits to advance to type next word.

I tried this and it works

(add-hook 'org-mode-hook (lambda () (toggle-auto-completion-off)))

but this is a false-friend and causes bizarre problems other places. I want company on but just not while typing text in org-journal. Can that be done?

Here is my org-journal config

(use-package org-journal
  :after org
  :custom
  (org-journal-dir "~/Dropbox/org/journal/")
  (org-journal-date-prefix "#+TITLE: ")
  (org-journal-time-prefix "* ")
  (org-journal-file-format "%Y/%m/%Y%m%d.org")
  (org-journal-date-format "%Y-%m-%dT%H:%M:%S")
  (org-journal-enable-agenda-integration t)
  :bind
  ("C-c j" . org-journal-new-entry))

Yes, when I disable company, the problem goes away. A hook should allow this, but I'm getting it wrong?

(add-hook 'org-journal-mode-hook (company-mode -1))
4
  • 1
    That should be (add-hook 'org-journal-mode-hook (lambda () (company-mode -1))). Hooks are lists of functions not forms. Commented Feb 7, 2021 at 11:38
  • Yes, I think I tried it but it didn't seem to work -- or I don't know how or where to apply it. Where would it go?
    – 147pm
    Commented Feb 7, 2021 at 15:18
  • Put it in the use-package stanza after :config. Commented Feb 7, 2021 at 15:20
  • Thanks. That worked in the org-journal block.
    – 147pm
    Commented Feb 7, 2021 at 15:37

1 Answer 1

0

At the suggestion of Fran Burstall above in the comments, I added a properly written hook to org-journal-mode-hook to my org-journal use-package block

(use-package org-journal
  :after org
  :custom
  (org-journal-dir "~/Dropbox/org/journal/")
  (org-journal-date-prefix "#+TITLE: ")
  (org-journal-time-prefix "* ")
  (org-journal-file-format "%Y/%m/%Y%m%d.org")
  (org-journal-date-format "%Y-%m-%dT%H:%M:%S")
  (org-journal-enable-agenda-integration t)
  :bind
  ("C-c j" . org-journal-new-entry)
  :config
  (add-hook 'org-journal-mode-hook (lambda () (company-mode -1))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.