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

Org-mode 9.7.x and warning: ‘org-element-at-point’ cannot be used in non-Org buffer #446

Open
jackbaty opened this issue Sep 7, 2024 · 3 comments

Comments

@jackbaty
Copy link

jackbaty commented Sep 7, 2024

Describe the bug
This feels like something that may not be org-journal specific, so apologies if this is misplaced, but...

The first time (and only the first time) I call org-journal-new-entry or org-journal-search, emacs generates nearly 3,000 warnings like this:

Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org buffer #<buffer 2016-12.org> (fundamental-mode)

This does not happen when using Org 9.6x with the same config. Tested also with a barebones (emacs -q) config.

To Reproduce
When running Org-mode version 9.7.x, call org-journal-new-entry

Expected behavior
No such warnings should appear

Desktop (please complete the following information):

  • OS: [e.g. iOS] macOS 15 (beta 4) but this also happened using 14.x
  • Emacs Version 29.4
  • Org version 9.7.11

Your Emacs Configuration

(use-package org-journal 
  :ensure t
  :defer t
  :bind
  ("C-c o j" . org-journal-new-entry)
  :config
  (setq org-journal-dir "~/Documents/Notes/OrgJournal"
    org-journal-file-type 'monthly
    org-journal-file-format "%Y-%m.org"
    org-journal-find-file #'find-file
    org-journal-time-prefix ""
    org-journal-time-format ""
    org-journal-enable-agenda-integration nil
    org-journal-enable-encryption nil
    org-journal-date-format "%A, %B %d %Y"))
@jmay
Copy link
Collaborator

jmay commented Sep 9, 2024

@jackbaty I've seen messages like this when there is a PROPERTIES drawer that has invalid formatting. org-journal trusts that the formatting is perfect. Take a look in your 2016-12.org file and check the PROPERTIES entries there - even an extra newline can cause problems.

@jackbaty
Copy link
Author

@jackbaty I've seen messages like this when there is a PROPERTIES drawer that has invalid formatting. org-journal trusts that the formatting is perfect. Take a look in your 2016-12.org file and check the PROPERTIES entries there - even an extra newline can cause problems.

Thanks, I'll investigate that. I hope that's not the cause, though, since I get a message line for every entry in every file, which would suggest that I've got a lot of invalid PROPERTIES drawers! :)

@cands
Copy link

cands commented Sep 16, 2024

I see a very similar behavior (with > 10 k such warnings generated). I checked the PROPERTIES drawers for invalid formatting, but cannot see any problems there so it appears the warnings are genereated although files are correctly formatted.

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

3 participants