[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Org-Babel SQL block: Narrows to buffer in background when pressing T
Re: Org-Babel SQL block: Narrows to buffer in background when pressing TAB
Sun, 11 Oct 2020 11:41:14 -0400
Still running into this issue often, but I tried some techniques others have recommended to debug other issues:
Pressing TAB in an org-mode sql src block opens the src in a background buffer and locks the src block
- Behavior not reproducible when using emacs -Q
- Behavior not reproducible when running emacs in terminal with emacs -nw
Suggests behavior is not directly associated with org-babel as originally thought. Not sure where to look yet to continue though. Is there a way to capture all functions called when reproducing the behavior in the GUI?
Is anyone able to reproduce the behavior as a quick sanity check?
Hi Org ML,
I hope this is the right place. If not please let me know where I should surface this 😅
If I press TAB while the cursor is in a sql src block, it opens the code in a new buffer in the background. Kind of like pressing C-C C-' (org-edit-special) but silently. It's frustrating because it prevents me from editing it until I find the buffer or use org-edit-special.
- Create an org-mode buffer
- Add at least one headline
- Create a sql source block (sample below)
- Put the cursor on the "S" of the "SELECT" statement
- Press TAB
Indents using either native sql-mode or sql-indent-mode if installed.
Highlights the SQL src, opens it in a new buffer in the background, and I can't edit the source.
If I use M-x org-cycle directly this behavior also occurs. If I call indent-for-tab-command on the SQL sample the behavior also occurs, but I can nil-out the body of that function using the REPL and the behavior still occurs. This does not happen when using TAB in a bash src block. This does not happen in a sql-mode buffer which is why I currently suspect it to be org-babel sql specific.
GIF reproducing behavior below
I appreciate any help debugging this, or even links to docs to help me learn how to debug it.