From: Eli Zaretskii Date: Thu, 18 Apr 2024 08:53:26 +0000 (+0300) Subject: Fix sending input to SQL when point is not at EOB X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b74ea34742a3659dcbd73a98a835d948c2a67f5c;p=emacs.git Fix sending input to SQL when point is not at EOB * lisp/progmodes/sql.el (sql-send-string): Move point to EOB before sending input to the SQL process. Suggested by Gary Hollis . (Bug#69420) (cherry picked from commit bb9d81d5144ae497809c416eef91d126f8ac5df5) --- diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 604f04a3d57..5273ba2bee1 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -3721,6 +3721,8 @@ prompts (`sql-output-newline-count' is positive). In this case: (save-excursion ;; Set product context (with-current-buffer sql-buffer + ;; Make sure point is at EOB before sending input to SQL. + (goto-char (point-max)) (when sql-debug-send (message ">>SQL> %S" s)) (insert "\n")