kostafey / ejc-sql

Emacs SQL client uses Clojure JDBC.
278 stars 29 forks source link

Update ejc-result-buffer.el #169

Closed huangfeiyu closed 2 years ago

huangfeiyu commented 2 years ago

display result buffer in the bottom instead of right. I found that display the result buffer in the bottom will have a wide window, it helps especially for tables with many columns

kostafey commented 2 years ago

Could you please provide an option for that. I'd like to keep an old behavior for existing users habits. This possibility should be done via defcustom setting.

huangfeiyu commented 2 years ago

@kostafey yes, it is better to provide an option, but to be honest, I don't know how to write elisp code. It would be a challenge to me.

huangfeiyu commented 2 years ago

Hi @kostafey I add a custom variable ejc-show-result-bottom. Would you mind me to set show result in bottom window by default? I think it is a good default, unless you intentionally show the result in the right window when you write the code first time. By the way, introducing a custom variable is easier than I original thought.

huangfeiyu commented 2 years ago

Hi @kostafey will you please check out my last commit?

kostafey commented 2 years ago

Ok, merged. But with a tiny updates (https://github.com/kostafey/ejc-sql/commit/5e100426be90fc193154b1219ab1058534a4fb52):

  1. Please polite existing user habits. We should not force other people to re-learn their user experience (ejc-show-result-bottom is nil by default).
  2. Avoid repetitive code (ejc-show-result-buffer fn introduced).
huangfeiyu commented 2 years ago

@kostafey that's good to hear. Hope it helps. I am sorry if my previous comments bothered you. I just simply say my opinion about a better default. I am fine with you keep the existing behavior as default, I understand your reason. And ejc-sq is an excellent tool, I really enjoy it. Thank you for your excellent work.