I don't know if this has been addressed in a later version of org-mode. I'm using the one from the Debian 13 repositories, but Debian is not exactly a bleeding-edge distro.
For now, I'm solving it by writing my code in the *scratch* buffer and then yanking it into my org-mode code block.
@vnikolov Yes, it's an annoying bug. One workaround is org-edit-special, bound to C-c ' in org-mode-map.
It puts you into a recursive edit buffer, containing only that code block, in unadulterated emacs-lisp-mode. Lots of annoyances go away. Exit with the same key C-c '
@Greg A. Woods One of the things I didn't mention in the initial post is that this code is inside of an org-mode code block. This doesn't happen when in pure eliisp mode. I didn't realize at the time that this was relevant, but I have noticed that org-mode has gotten slightly buggier since I upgraded to Debian 13.
It's also a good option to use C-c ' , that will open up a buffer with the source block contents. This is neat because the major mode and all related setup for that mode is loaded as well, no matter which language you're editing.
Jonathan Lamothe
in reply to Jonathan Lamothe • •Vassil Nikolov | Васил Николов
in reply to Jonathan Lamothe • • •It is rather significant that this is in an org-mode code block.
I wouldn't omit that detail and I wouldn't call it "basic" in this case.
(I don't know how to submit bug reports about org mode.)
#Emacs
#OrgMode
@me
Juha Autero
in reply to Vassil Nikolov | Васил Николов • • •Vassil Nikolov | Васил Николов
in reply to Juha Autero • • •@jautero
The above reply, to the attention of the original poster:
@me
#Emacs
#OrgMode
hajovonta
in reply to Vassil Nikolov | Васил Николов • • •@vnikolov
came to say exactly that.
@me
Jonathan Lamothe
in reply to Vassil Nikolov | Васил Николов • •@Vassil Nikolov | Васил Николов I'd argue that the code itself is basic. The context in which it is located is not.
I don't know if this has been addressed in a later version of org-mode. I'm using the one from the Debian 13 repositories, but Debian is not exactly a bleeding-edge distro.
For now, I'm solving it by writing my code in the
*scratch*buffer and then yanking it into my org-mode code block.James Endres Howell
in reply to Vassil Nikolov | Васил Николов • • •@vnikolov Yes, it's an annoying bug. One workaround is org-edit-special, bound to C-c ' in org-mode-map.
It puts you into a recursive edit buffer, containing only that code block, in unadulterated emacs-lisp-mode. Lots of annoyances go away. Exit with the same key C-c '
Jonathan Lamothe
in reply to James Endres Howell • •C-c 'a short while ago. It's actually a pretty nice feature/workaround.Greg A. Woods
in reply to Jonathan Lamothe • • •I've never seen that happen!
(But I'm mostly still running emacs-27.x -- maybe it's a new bug)
Jonathan Lamothe
in reply to Greg A. Woods • •Greg A. Woods
in reply to Jonathan Lamothe • • •Jonathan Lamothe likes this.
kimothy
in reply to Jonathan Lamothe • • •It's also a good option to use C-c ' , that will open up a buffer with the source block contents. This is neat because the major mode and all related setup for that mode is loaded as well, no matter which language you're editing.
So no need to yank from the scratch buffer.
Jonathan Lamothe likes this.
Jonathan Lamothe
in reply to kimothy • •