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-entry-get
returns nil after org-entry-put
and save-buffer
#40
Comments
* lisp/org-element.el (org-element--cache-sensitive-re): Make proprety drawer lines sensitive. (org-element--cache-before-change): Prioritise 'org-data warning. (org-element--cache-for-removal): Make sensitive edits inside cache gap right after org-data re-parse the org-data. Make sensitive top-section edits re-parse org-data. The specific error has been reported in #40 The recepy involves loading org-contrib: 1. emacs -Q -L ~/.emacs.d/.local/straight/repos/org/lisp -L ~/.emacs.d/.local/straight/repos/org-contrib/lisp -l org -l org-eldoc 2. Create a test.org file with the following content: :PROPERTIES: :ID: test :END: Test. 3. (goto-char (point-min)) (org-entry-put nil "ID" "test") (save-buffer) (org-entry-get nil "ID") Return value is nil, while should be "test"
Thanks for reporting! Can you update and check again? |
Yes it works perfectly now. Thanks for fixing it so quickly! Would be great if you could push this to the main Org branch as well. I first encountered this issue there. Thank you for all your amazing work on this branch and getting it merged into main! |
I plan to run it for some time locally before pushing. Just in case if there are unintended side-effects. This change was not trivial. |
* lisp/org-element.el (org-element--cache-sensitive-re): Make proprety drawer lines sensitive. (org-element--cache-before-change): Prioritise 'org-data warning. (org-element--cache-for-removal): Make sensitive edits inside cache gap right after org-data re-parse the org-data. Make sensitive top-section edits re-parse org-data. The specific error has been reported in #40 The recepy involves loading org-contrib: 1. emacs -Q -L ~/.emacs.d/.local/straight/repos/org/lisp -L ~/.emacs.d/.local/straight/repos/org-contrib/lisp -l org -l org-eldoc 2. Create a test.org file with the following content: :PROPERTIES: :ID: test :END: Test. 3. (goto-char (point-min)) (org-entry-put nil "ID" "test") (save-buffer) (org-entry-get nil "ID") Return value is nil, while should be "test"
* lisp/org-element.el (org-element--cache-sensitive-re): Make proprety drawer lines sensitive. (org-element--cache-for-removal): Make sensitive edits inside cache gap right after org-data re-parse the org-data. Make sensitive top-section edits re-parse org-data. The specific error has been reported in yantar92/org#40 The recepy involves loading org-contrib: 1. emacs -Q -L ~/.emacs.d/.local/straight/repos/org/lisp -L ~/.emacs.d/.local/straight/repos/org-contrib/lisp -l org -l org-eldoc 2. Create a test.org file with the following content: :PROPERTIES: :ID: test :END: Test. 3. (goto-char (point-min)) (org-entry-put nil "ID" "test") (save-buffer) (org-entry-get nil "ID") Return value is nil, while should be "test"
Describe the bug
In some cases, after running
org-entry-put
andsave-buffer
,org-entry-get
returns nil instead the entry value.From a clean Emacs config, this seems to happen only with
org-eldoc
enabled. In my full Doom Emacs however, disablingeldoc
doesn't restore the expected behaviour, perhaps due to some modes or settings by Doom I haven't been able to narrow down.Expected behavior
org-entry-get
afterorg-entry-put
andsave-buffer
always returns the correct entry value.To Reproduce
Using fee5d07, start Emacs with
org
andorg-eldoc
loaded:Create a
test.org
file with the following content:Run the following commands:
(org-entry-get nil "ID")
returns nil instead of "test".The text was updated successfully, but these errors were encountered: