2

I have org :jupyter in my Doom Emacs init.el, i.e., ob-jupyter, for using Jupyter with org-babel, and there's a really annoying behavior when I'm in an org file, editing a source block that begins with #+BEGIN_SRC jupyter-python :session py. Every time I enter the block by pressing o ("open" a new line for entering text, the Evil command) it disables editing in the source block, saying that the code block is actually being handled by a dedicated buffer ("Not in a sub editing buffer"). It doesn't open a window for the sub-editing buffer, so I have to go hunting for it in my buffer list, and then abort the process with C-c C-k, which is a pain.

The thing is, I never want to edit code blocks in a sub-editing buffer. How can I disable that?

3
  • 1
    This (mis)behavior seems to be specific to Doom, so maybe report it to them? Even if you are happy with your answer (which is a bit radical in my view), others might benefit from a fix.
    – NickD
    Commented Oct 9, 2022 at 0:10
  • I use vanilla emacs but this affects me too with my setup. I had yet to investigate what the culprit is tho.
    – ed9w2in6
    Commented Aug 3, 2023 at 8:53
  • I do not remember seeing this issue before upgrading to emacs29 tho. So likely some changes in emacs that made emacs-jupyter not working well with it.
    – ed9w2in6
    Commented Aug 3, 2023 at 11:03

2 Answers 2

0

Figured it out myself. I couldn't find an option for this, but doing this seems to work, so far:

;; Disable editing source code in dedicated buffer
(defun org-edit-src-code nil)
0

I faced the same issue in 2023 with emacs29 and for me my workaround now is to disable electric-indent-mode and to manually indent. Which I believe is better than to removing org-edit-src-code altogether.

I have also filed this issue: https://github.com/emacs-jupyter/jupyter/issues/488

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.