[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sql-mode calls tramp for no reason

From: Michael Albinus
Subject: Re: Sql-mode calls tramp for no reason
Date: Wed, 23 Oct 2013 08:26:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Nikolay Kudryavtsev <address@hidden> writes:

> Hello.


> Is there any way to force sql-product-interactive to run sql program
> on local machine only?
> After I use tramp for some time and then call sql-product-interactive
> it tries to run sql program on one of the open tramp connections,
> instead of my local machine. It does not matter if I call it while
> having dired open on local machine or even local sql file open. Even
> calling M-x cd beforehand does not help. It still tries to run sql
> program on a host over tramp. After some sequence of actions that I
> haven't fully figured out, it finally goes away and uses local machine
> paths.

I don't know sql.el, but it looks like it uses comint. When a new sql call
is run, comint uses either the local host or the remote one, depending
on default-directory of the current buffer.

Further calls of sql-product-interactive seem to reuse the buffer, its
name is kept in the variable sql-buffer.

Maybe you could add some code via sql-set-sqli-hook. Something like
(completely untested):

;; Force sql-product-interactive to run on the local host.
(add-hook 'sql-set-sqli-hook (lambda () (setq default-directory "/")))

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]