* Sql-mode calls tramp for no reason
@ 2013-10-23 3:26 Nikolay Kudryavtsev
2013-10-23 6:26 ` Michael Albinus
0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Kudryavtsev @ 2013-10-23 3:26 UTC (permalink / raw)
To: help-gnu-emacs
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.
--
Best Regards,
Nikolay Kudryavtsev
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Sql-mode calls tramp for no reason
2013-10-23 3:26 Sql-mode calls tramp for no reason Nikolay Kudryavtsev
@ 2013-10-23 6:26 ` Michael Albinus
2013-10-24 14:40 ` Nikolay Kudryavtsev
0 siblings, 1 reply; 4+ messages in thread
From: Michael Albinus @ 2013-10-23 6:26 UTC (permalink / raw)
To: Nikolay Kudryavtsev; +Cc: help-gnu-emacs
Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> writes:
> Hello.
Hi,
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-24 15:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23 3:26 Sql-mode calls tramp for no reason Nikolay Kudryavtsev
2013-10-23 6:26 ` Michael Albinus
2013-10-24 14:40 ` Nikolay Kudryavtsev
2013-10-24 15:00 ` Michael Albinus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.