Emacs sqlplus disabled
I started using sqlplus for emacs. It works great, except for one thing - very often I get the message "Buffer ... is not talking to anyone." The sqlplus.el file has the following code that checks (get-buffer-process process-buffer-name). How can I keep the sql process running?
(defun sqlplus-verify-buffer (connect-string)
(let ((output-buffer-name (sqlplus-get-output-buffer-name connect-string))
(process-buffer-name (sqlplus-get-process-buffer-name connect-string)))
(when (not (get-buffer process-buffer-name))
(sqlplus-shutdown connect-string)
(error "No SQL*Plus session! Use 'M-x sqlplus' to start the SQL*Plus interpreter"))
(unless (get-buffer-process process-buffer-name)
(sqlplus-shutdown connect-string)
(error "Buffer '%s' is not talking to anybody!" output-buffer-name)))
t)
+2
Oleg Pavliv
source
to share
1 answer
One possible solution is the following
(defadvice sqlplus-verify-buffer (before sqlplus-verify-buffer-and-reconnect activate)
(unless (get-buffer-process (sqlplus-get-process-buffer-name connect-string))
(sqlplus connect-string)))
+1
Oleg Pavliv
source
to share