* Org-Babel SQL block: Narrows to buffer in background when pressing TAB
@ 2020-10-07 4:38 Jay Zawrotny
2020-10-11 15:41 ` Jay Zawrotny
0 siblings, 1 reply; 3+ messages in thread
From: Jay Zawrotny @ 2020-10-07 4:38 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1409 bytes --]
Hi Org ML,
I hope this is the right place. If not please let me know where I should
surface this 😅
*Issue:*
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.
*Reproduction:*
1. Create an org-mode buffer
2. Add at least one headline
3. Create a sql source block (sample below)
4. Put the cursor on the "S" of the "SELECT" statement
5. Press TAB
*Expected:*
Indents using either native sql-mode or sql-indent-mode if installed.
*Actual:*
Highlights the SQL src, opens it in a new buffer in the background, and I
can't edit the source.
*Notes:*
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
[image: 2020-10-06 23.13.44.gif]
I appreciate any help debugging this, or even links to docs to help me
learn how to debug it.
Thanks,
J
[-- Attachment #1.2: Type: text/html, Size: 1896 bytes --]
[-- Attachment #2: 2020-10-06 23.13.44.gif --]
[-- Type: image/gif, Size: 133695 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Org-Babel SQL block: Narrows to buffer in background when pressing TAB
2020-10-07 4:38 Org-Babel SQL block: Narrows to buffer in background when pressing TAB Jay Zawrotny
@ 2020-10-11 15:41 ` Jay Zawrotny
2020-10-11 19:46 ` Jay Zawrotny
0 siblings, 1 reply; 3+ messages in thread
From: Jay Zawrotny @ 2020-10-11 15:41 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 2223 bytes --]
Still running into this issue often, but I tried some techniques others
have recommended to debug other issues:
Summary:
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?
On Wed, Oct 7, 2020 at 12:38 AM Jay Zawrotny <jayzawrotny@gmail.com> wrote:
> Hi Org ML,
>
> I hope this is the right place. If not please let me know where I should
> surface this 😅
>
> *Issue:*
>
> 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.
>
> *Reproduction:*
>
> 1. Create an org-mode buffer
> 2. Add at least one headline
> 3. Create a sql source block (sample below)
> 4. Put the cursor on the "S" of the "SELECT" statement
> 5. Press TAB
>
>
> *Expected:*
>
> Indents using either native sql-mode or sql-indent-mode if installed.
>
> *Actual:*
>
> Highlights the SQL src, opens it in a new buffer in the background, and I
> can't edit the source.
>
> *Notes:*
>
> 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
>
> [image: 2020-10-06 23.13.44.gif]
>
> I appreciate any help debugging this, or even links to docs to help me
> learn how to debug it.
>
> Thanks,
> J
>
[-- Attachment #1.2: Type: text/html, Size: 3181 bytes --]
[-- Attachment #2: 2020-10-06 23.13.44.gif --]
[-- Type: image/gif, Size: 133695 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Org-Babel SQL block: Narrows to buffer in background when pressing TAB
2020-10-11 15:41 ` Jay Zawrotny
@ 2020-10-11 19:46 ` Jay Zawrotny
0 siblings, 0 replies; 3+ messages in thread
From: Jay Zawrotny @ 2020-10-11 19:46 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 2484 bytes --]
Found the cause! It was because I was using :engine postgresql instead of
:engine postgres.
On Sun, Oct 11, 2020 at 11:41 AM Jay Zawrotny <jayzawrotny@gmail.com> wrote:
> Still running into this issue often, but I tried some techniques others
> have recommended to debug other issues:
>
> Summary:
> 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?
>
> On Wed, Oct 7, 2020 at 12:38 AM Jay Zawrotny <jayzawrotny@gmail.com>
> wrote:
>
>> Hi Org ML,
>>
>> I hope this is the right place. If not please let me know where I should
>> surface this 😅
>>
>> *Issue:*
>>
>> 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.
>>
>> *Reproduction:*
>>
>> 1. Create an org-mode buffer
>> 2. Add at least one headline
>> 3. Create a sql source block (sample below)
>> 4. Put the cursor on the "S" of the "SELECT" statement
>> 5. Press TAB
>>
>>
>> *Expected:*
>>
>> Indents using either native sql-mode or sql-indent-mode if installed.
>>
>> *Actual:*
>>
>> Highlights the SQL src, opens it in a new buffer in the background, and I
>> can't edit the source.
>>
>> *Notes:*
>>
>> 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
>>
>> [image: 2020-10-06 23.13.44.gif]
>>
>> I appreciate any help debugging this, or even links to docs to help me
>> learn how to debug it.
>>
>> Thanks,
>> J
>>
>
[-- Attachment #1.2: Type: text/html, Size: 3615 bytes --]
[-- Attachment #2: 2020-10-06 23.13.44.gif --]
[-- Type: image/gif, Size: 133695 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-11 19:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-07 4:38 Org-Babel SQL block: Narrows to buffer in background when pressing TAB Jay Zawrotny
2020-10-11 15:41 ` Jay Zawrotny
2020-10-11 19:46 ` Jay Zawrotny
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).