Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See
https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ Hello, I have code in my init that calls org-id-find to get the entry ID refers to. When the ID is non-existent, the function unintentionally changes the major-mode of the current buffer. [ This almost caused me to lose a PDF file, but thankfully I could recover it because of Emacs backup. Admittedly this happened because I was half-panicking and half-confused. ] To reproduce, 1. emacs -Q 2. M-: (require 'org-id) 3. Visit any file (M-x find-library RET org-id RET) 4. M-: (org-id-find "non-existent") 5. Witness the major-mode change This all happens in org-id-find-id-in-file where when VISITING is non-nil, the buffer is (re)used whether or not it was originally in org-mode. The problem is complicated by the use of find-file-noselect when MARKERP argument to org-id-find is non-nil. Perhaps, org-id-find-id-file should check if the current-buffer is derived from org-mode before returning the buffer-file-name. WDYT? Emacs : GNU Emacs 31.0.50 (build 7, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw scroll bars) of 2024-09-09 Package: Org mode version 9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/)