From: Michael Mauger <mmaug@yahoo.com>
To: Juri Linkov <juri@jurta.org>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: [patch] SQL enhancements
Date: Wed, 21 Apr 2010 21:25:24 -0700 (PDT) [thread overview]
Message-ID: <415027.16686.qm@web62507.mail.re1.yahoo.com> (raw)
In-Reply-To: <87zl0xdwce.fsf@mail.jurta.org>
On Wed, April 21, 2010, Juri Linkov said:
>>> 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.
>
I'm not seeing the same problem (i.e., leaving the separator as "/n--/n" seems
to be handled by comint correctly). My experience working with Oracle is that
the default works but that occasionally the history disappears. I assumed that it was
a bug in comint and hadn't had a chance to debug further.
Antone else aware of any issues with comint's input-ring handling?
prev parent reply other threads:[~2010-04-22 4:25 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
2010-04-22 4:25 ` Michael Mauger [this message]
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=415027.16686.qm@web62507.mail.re1.yahoo.com \
--to=mmaug@yahoo.com \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.org \
/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.