all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Michael Mauger <mmaug@yahoo.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: [patch] SQL enhancements
Date: Wed, 21 Apr 2010 11:49:05 +0300	[thread overview]
Message-ID: <87zl0xdwce.fsf@mail.jurta.org> (raw)
In-Reply-To: <560223.10105.qm@web62501.mail.re1.yahoo.com> (Michael Mauger's message of "Tue, 20 Apr 2010 20:29:26 -0700 (PDT)")

>> Maybe the name of the file to read/write the input history
>> should be product-specific.  Because the default history file name
>> for SQLite is ~/.sqlite_history, for MySQL is ~/.mysql_history, etc.
>> It would be better to reuse the existing history files in SQLi mode.
>
> Couldn't you do something like the following:
>
>   (defun my-sqli-setup ()
>     "Set the input ring file name based on the product name."
>     (setq sql-input-ring-file-name
>           (concat user-emacs-directory "." (symbol-name sql-product) "_history")))
>   (setq sql-interactive-mode-hook 'my-sqli-setup)

Thanks.  The following seems to work:

  (defun my-sqli-setup ()
    "Set the input ring file name based on the product name."
    (setq sql-input-ring-file-name
          (concat "~/." (symbol-name sql-product) "_history"))
    (setq sql-input-ring-separator "\n"))

  (add-hook 'sql-interactive-mode-hook 'my-sqli-setup)

But as you can see it requires changing the value of the separator
from "\n--\n" to "\n", because for compatibility with database
command line interfaces multi-line commands should be disallowed.

-- 
Juri Linkov
http://www.jurta.org/emacs/




  reply	other threads:[~2010-04-21  8:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16  4:14 [patch] SQL enhancements Michael Mauger
2010-04-16 20:42 ` Juri Linkov
2010-04-16 21:32   ` Horizontal scroll bars (was: [patch] SQL enhancements) Juri Linkov
2010-04-16 23:06   ` [patch] SQL enhancements Michael Mauger
2010-04-17  0:06     ` Juri Linkov
2010-04-18 23:57   ` Juri Linkov
2010-04-21  3:29     ` Michael Mauger
2010-04-21  8:49       ` Juri Linkov [this message]
2010-04-22  4:25         ` Michael Mauger

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=87zl0xdwce.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=mmaug@yahoo.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.