From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#11908: 24.1; "Unable to locate SQL program" when using sql-mysql with tramp and the client does not have the SQL program (but the server does) Date: Fri, 13 Jul 2012 16:31:23 +0200 Message-ID: <87fw8vg2bo.fsf@gmx.de> References: <0C01659A-3017-4D3E-AE26-03DED52A29A7@devrx.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342189961 10503 80.91.229.3 (13 Jul 2012 14:32:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Jul 2012 14:32:41 +0000 (UTC) Cc: 11908@debbugs.gnu.org To: Francis Devereux Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 13 16:32:41 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SpgvA-000676-Mk for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jul 2012 16:32:40 +0200 Original-Received: from localhost ([::1]:37887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Spgv9-00064w-S6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jul 2012 10:32:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Spgv0-00063r-SI for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2012 10:32:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Spguu-0001ee-VB for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2012 10:32:30 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Spguu-0001eZ-Ru for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2012 10:32:24 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sph0M-0008JX-6g for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2012 10:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jul 2012 14:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11908 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11908-submit@debbugs.gnu.org id=B11908.134219022931900 (code B ref 11908); Fri, 13 Jul 2012 14:38:02 +0000 Original-Received: (at 11908) by debbugs.gnu.org; 13 Jul 2012 14:37:09 +0000 Original-Received: from localhost ([127.0.0.1]:39478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SpgzU-0008IS-2A for submit@debbugs.gnu.org; Fri, 13 Jul 2012 10:37:08 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:56283) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SpgzR-0008IK-AP for 11908@debbugs.gnu.org; Fri, 13 Jul 2012 10:37:06 -0400 Original-Received: (qmail invoked by alias); 13 Jul 2012 14:31:25 -0000 Original-Received: from p57BB97A2.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.162] by mail.gmx.net (mp001) with SMTP; 13 Jul 2012 16:31:25 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18YojAUAMQY5uCW/lJii5J9e9GefcJ39YWVBSl7yA XPDrLDMAyV5btI In-Reply-To: <0C01659A-3017-4D3E-AE26-03DED52A29A7@devrx.org> (Francis Devereux's message of "Wed, 11 Jul 2012 12:33:27 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61889 Archived-At: Francis Devereux writes: > However, if you comment out the following lines in sql-comint in sql.el: > ; (unless (executable-find program) > ; (error "Unable to locate SQL program \'%s\'" program)) > then it works - you get an SQLi buffer running mysql in an ssh session on > the server. Indeed, `executable-find' does not work in this case. I would propose the following check, which keeps the test for local processes: --8<---------------cut here---------------start------------->8--- *** /home/albinus/src/emacs/lisp/progmodes/sql.el.~109053~ 2012-07-13 16:25:32.863194360 +0200 --- /home/albinus/src/emacs/lisp/progmodes/sql.el 2012-07-13 16:24:52.026991734 +0200 *************** *** 4146,4153 **** passed as command line arguments." (let ((program (sql-get-product-feature product :sqli-program)) (buf-name "SQL")) ! ;; make sure we can find the program ! (unless (executable-find program) (error "Unable to locate SQL program \'%s\'" program)) ;; Make sure buffer name is unique (when (sql-buffer-live-p (format "*%s*" buf-name)) --- 4146,4155 ---- passed as command line arguments." (let ((program (sql-get-product-feature product :sqli-program)) (buf-name "SQL")) ! ;; Make sure we can find the program. `executable-find' does not ! ;; work for remote hosts; we suppress the check there. ! (unless (or (file-remote-p default-directory) ! (executable-find program)) (error "Unable to locate SQL program \'%s\'" program)) ;; Make sure buffer name is unique (when (sql-buffer-live-p (format "*%s*" buf-name)) --8<---------------cut here---------------end--------------->8--- Could you, please, check, whether this works for you? > Francis Best regards, Michael.