> 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)