Hi all,
my config changed a lot in the last weeks so i am quite sure i introduced a bug.

When i start emacs and try to launch agenda or refile a captured tasks i 
encounter this kind of error:
org-refile-get-targets: Major mode in refile target buffer "/home/org/file.org" 
must be ‘org-mode’

some info on the error:
- it does not occur every time i start emacs (1 on 3 times more or less)
- when it occur is always on 1 file not more
- the file seems to change every time (all the files involved have .org 
extension)
- to resolve i just visit the file and launch M-x org-mode (saving the file is 
not needed)

I am seeing right now that the file have a creation date in 2025 and 
modification date in 2024, so something strange in the file is going on.
This can be non emacs related (files are synced via syncthing, which changed 
version [v2] in the last month or so)

relevant part of my config (for what i can understand) are autorevert and 
autosave:
  (setq auto-save-default t)
  (setq auto-save-interval 300)
  (setq auto-save-timeout 30)

  (use-package autorevert
    :ensure nil
    :commands (auto-revert-mode global-auto-revert-mode)
    :hook
    (after-init . global-auto-revert-mode)
    :custom
    (auto-revert-interval 3)
    (auto-revert-remote-files nil)
    (auto-revert-use-notify t)
    (auto-revert-avoid-polling nil)
    (auto-revert-verbose t))

Does anybody have any ideas of what i can investigate?
I am lost

Thank you in advance

Matteo

Reply via email to