From: Ivan Sokolov <ivan-p-sokolov@ya.ru>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-sql: blocks without :engine get stuck in org-edit-src-code on indent
Date: Fri, 30 Apr 2021 14:40:37 +0300 [thread overview]
Message-ID: <2549801619782837@myt2-b899cd0385f4.qloud-c.yandex.net> (raw)
In-Reply-To: <877dkkckdi.fsf@gnu.org>
> what you want to do?
I want to indent some sql in the src block in an org file.
> what happens instead
Buffer becomes unusable -- text is entered in the opposite direction
until the Org-Src buffer is closed. NOTE: I am not opening this buffer
myself, it is opened by org-indent-line, but is not closed because
sql-set-product throws a user-error.
> how the patch fixes the problem?
It ignores user-error thrown by sql-set-product.
---
Debugger entered--entering a function:
* signal(user-error ("SQL product nil is not supported; treated as ANSI"))
* user-error("SQL product %s is not supported; treated as ANSI" nil)
* #f(compiled-function (product) "Set `sql-product' to PRODUCT and enable appropriate highlighting." (interactive #f(compiled-function () #<bytecode 0x2eb2ee0e10bfe1>)) #<bytecode -0x63b7e4c1361d2b2>)(nil)
* apply(#f(compiled-function (product) "Set `sql-product' to PRODUCT and enable appropriate highlighting." (interactive #f(compiled-function () #<bytecode 0x2eb2ee0e10bfe1>)) #<bytecode -0x63b7e4c1361d2b2>) nil)
* sql-set-product(nil)
org-babel-edit-prep:sql(("sql" "select foo\n" ((:results . "replace") (:exports . "code") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "" nil 1 "(ref:%s)"))
org-edit-src-code()
org-babel-do-key-sequence-in-edit-buffer("\11")
org-indent-line()
indent-according-to-mode()
electric-indent-post-self-insert-function()
self-insert-command(1)
newline(nil 1)
org--newline(nil nil 1)
org-return(nil nil 1)
funcall-interactively(org-return nil nil 1)
call-interactively(org-return nil nil)
command-execute(org-return)
next prev parent reply other threads:[~2021-04-30 12:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 15:41 [PATCH] ob-sql: blocks without :engine get stuck in org-edit-src-code on indent Ivan Sokolov
2021-04-30 7:16 ` Bastien
2021-04-30 11:40 ` Ivan Sokolov [this message]
2021-05-01 10:29 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2549801619782837@myt2-b899cd0385f4.qloud-c.yandex.net \
--to=ivan-p-sokolov@ya.ru \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).