Closed xbc5 closed 1 year ago
That is pretty strange. I don't know who that would be happening. Maybe something here: https://www.gnu.org/software/emacs/manual/html_node/elisp/Watching-Variables.html could be useful to find out what is causing it.
That's quite helpful, although I think I am misusing it. I opened an issue here if you're interested.
Closing for now. Thanks.
I just noticed something weird: two lines before the offending line (here), there's a mention of org-ref
, which is a builtin roam function. Perhaps some weirdness is going on? I only ask because this issue disappears when I disable org-ref
(package), and it doesn't even use org-agenda-files
.
What do you think?
something is weird for sure. Can you try this instead:
(add-variable-watcher 'org-agenda-files
(lambda (symbol newval operation where)
(message "%s set to %s by %s at %s"
symbol newval operation where)))
and see what shows in your messages?
It might not be useful but I noticed a few things.
There are three significant things of note:
~/org => ~/org/perm
and ~/org/bib/notes => ~/org/lit
-- so this suggests that the value is cached somewhere. However, I have grepped my entire ~ for bib/notes
but found nothing relevant;Minor notes:
For brevity:
...
org-agenda-files set to nil by set at nil
org-agenda-files set to (\~/org) by set at nil
...
org-agenda-files set to (my/org-agenda-dir) by set at nil
...
org-agenda-files set to nil by let at nil
...
org-agenda-files set to (my/org-agenda-dir) by unlet at nil
org-agenda-files set to nil by let at nil
...
org-agenda-files set to (my/org-agenda-dir) by unlet at nil
org-agenda-files set to (~/projects/linux/emacs-notes/conf/org/org.el /home/user/org/political_manipulation_with_ai-20230531092425.org /home/user/org/bib/notes/137_emergent_abilities_of_large_language_models.org ...<about 500 more bib/notes/foo.org entries>...) by set at nil [2 times]
...
org-agenda-files set to (~/projects/linux/emacs-notes/conf/org/org.el /home/user/org/political_manipulation_with_ai-20230531092425.org /home/user/org/bib/notes/137_emergent_abilities_of_large_language_models.org ...<about 500 more bib/notes/foo.org entries>...) by unlet at nil
Full messages:
Loading /usr/share/emacs/site-lisp/site-start.d/autoconf-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/cmake-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/desktop-entry-mode-init.el (source)...done
org-agenda-files set to nil by set at nil
org-agenda-files set to (\~/org) by set at nil
Created RFC link.
Created CMC link.
Created caniuse link.
Created reddit link.
Created HN link.
Created SOQ link.
Created SOA link.
Created twitter link.
org-agenda-files set to (my/org-agenda-dir) by set at nil
Waiting for git... [2 times]
Initializing org-roam database...
org-agenda-files set to nil by let at nil
Clearing removed files...done
Processing modified files...done
org-agenda-files set to (my/org-agenda-dir) by unlet at nil
org-agenda-files set to nil by let at nil
Clearing removed files...done
Processing modified files...done
org-agenda-files set to (my/org-agenda-dir) by unlet at nil
org-agenda-files set to (~/projects/linux/emacs-notes/conf/org/org.el /home/user/org/political_manipulation_with_ai-20230531092425.org /home/user/org/bib/notes/137_emergent_abilities_of_large_language_models.org ...<about 500 more bib/notes/foo.org entries>...) by set at nil [2 times]
Parsing bibliography file /home/user/org/bib/refs.bib ...
Resolving cross-references ...
Done (re)loading bibliography.
org-agenda-files set to nil by let at nil
Clearing removed files...done
Processing modified files...done
org-agenda-files set to (~/projects/linux/emacs-notes/conf/org/org.el /home/user/org/political_manipulation_with_ai-20230531092425.org /home/user/org/bib/notes/137_emergent_abilities_of_large_language_models.org ...<about 500 more bib/notes/foo.org entries>...) by unlet at nil
Doom loaded 212 packages across 37 modules in 7.998s
[yas] Check your `yas-snippet-dirs': /home/user/.config/doom/snippets/ is not a directory
[yas] Prepared just-in-time loading of snippets with some errors. Check *Messages*.
Done (re)loading bibliography. [2 times]
SPC n ESC is undefined
Position saved to mark ring, go back with ‘M-x org-mark-ring-goto’.
Loading /home/user/.config/emacs/.local/cacherecentf...done
Starting new Ispell process aspell with british dictionary...done
Quit
Updating buffer list...
Formats have changed, recompiling...done
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Quit [2 times]
It seems like something happens here:
org-agenda-files set to (my/org-agenda-dir) by unlet at nil
org-agenda-files set to (~/projects/linux/emacs-notes/conf/org/org.el /home/user/org/political_manipulation_with_ai-20230531092425.org /home/user/org/bib/notes/137_emergent_abilities_of_large_language_models.org ...<about 500 more bib/notes/foo.org entries>...) by set at nil [2 times]
Parsing bibliography file /home/user/org/bib/refs.bib ...
especially notable is "by set at nil " It seems notable because it is not "by let", and it seems outside of a let statement. I don't see an obvious place it is set though in org-roam.
If something is cached, it might be in a custom.el file. Try C-h v custom-file to find out where that is, and then open it and see if you find the path in there.
Yep, that sorted it -- it was custom.el
. Sorry to bother you. I still don't know why the problem went away after disabling org-ref
though. I guess we will never know.
Thanks for taking the time to help.
org-ref (or a dependency) sets
org-agenda-files
to files underorg-directory
and in some cases to files in my private (doom) config. It's strange behaviour, but when I disable org-ref it goes away.I don't see any mention of
org-agenda-files
in the source, so its possibly a dependency (perhaps some effect org-ref has on org after loading).I don't know how to debug this (or any issue within Emacs for that matter).
My configs: org-ref; org; other vars.