0

From what I am experiencing, org-id-update-id-locations opens all files in my org-directory and more that it knows of, and if inlineimages is set even loads the images in that process. This creates a huge bunch of open buffers and performs unnecessary IO.

Is there any way to prevent this? Can't it simply read out the files without opening them?
If not, can I at least make it close all the buffers it opened upon finishing?

5
  • Do you know who calls org-id-update-id-location? How do you know it's the culprit? It is a fact though that Org mode opens a lot of files (e.g. all the agenda files are opened when you create the agenda for the first time) and keeps the buffers around "for ever", This is done for speed and efficiency reasons. If org-id does the same thing, it's probably for the same reason. One way to deal with a plethora of buffers is not to look at them: you can teach e.g. ibuffer to not display some buffers. See emacswiki.org/emacs/IbufferMode for some documentation.
    – NickD
    Nov 24 at 4:25
  • It happens when I call it manually
    – xeruf
    2 days ago
  • OK, but why are you calling it manually? If it is called by somebody else as a specific requirement of that call, then we can try to reason about the call. OTOH, if the function is there but is not used by anybody else, then it does not matter that it opens all those buffers (that's a ridiculous extreme of course: I expect that the function is called by somebody, so what I'm trying to establish is who calls it and therefore why it needs to do what it does). But telling me that "when I do this, it hurts", the obvious answer is "don't do this" :-)
    – NickD
    yesterday
  • I have an idle-timer that refreshes all org-ids including org-roam, so it is called automatically every so often
    – xeruf
    yesterday
  • Since I set org-ids manually, I have to call it at some point
    – xeruf
    yesterday

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.