Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't call (sql-mode) to invalid Org Babel source block [C-c '] to exit #58

Closed
stardiviner opened this issue Nov 11, 2018 · 1 comment
Closed

Comments

@stardiviner
Copy link
Contributor

ejc-configure-sql-buffer will execute (sql-mode). change Babel source block `major-mode'. Then when I press [C-c '] to exist sql source block will be invalid.

add a if condition to detect whether current buffer is in source block editing dedicate buffer. Because SQL source block is sql-mode already, so no need to invoke sql-mode again.

(defun ejc-configure-sql-buffer (product-name)
  (unless (org-src-edit-buffer-p)
    (sql-mode))
  (sql-set-product (or (cdr (assoc-string product-name ejc-product-assoc))
                       (car (assoc-string product-name sql-product-alist))
                       "ansi"))
  (auto-complete-mode t)
  (auto-fill-mode t)
  (ejc-sql-mode)
  (ejc-sql-mode t))

If you accept this patch, I will add an PR.

@kostafey
Copy link
Owner

It's ok, please add Pull request for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants