all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Sql-mode calls tramp for no reason
Date: Wed, 23 Oct 2013 08:26:13 +0200	[thread overview]
Message-ID: <878uxkjyey.fsf@gmx.de> (raw)
In-Reply-To: <526741FC.4010604@gmail.com> (Nikolay Kudryavtsev's message of "Wed, 23 Oct 2013 07:26:52 +0400")

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.



  reply	other threads:[~2013-10-23  6:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23  3:26 Sql-mode calls tramp for no reason Nikolay Kudryavtsev
2013-10-23  6:26 ` Michael Albinus [this message]
2013-10-24 14:40   ` Nikolay Kudryavtsev
2013-10-24 15:00     ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878uxkjyey.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=nikolay.kudryavtsev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.