From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Re: [patch] SQL enhancements Date: Wed, 21 Apr 2010 21:25:24 -0700 (PDT) Message-ID: <415027.16686.qm@web62507.mail.re1.yahoo.com> References: <313753.60852.qm@web62504.mail.re1.yahoo.com> <87sk6v2kpu.fsf@mail.jurta.org> <87tyr8i9cg.fsf@mail.jurta.org> <560223.10105.qm@web62501.mail.re1.yahoo.com> <87zl0xdwce.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1271910335 17585 80.91.229.12 (22 Apr 2010 04:25:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Apr 2010 04:25:35 +0000 (UTC) Cc: Emacs Devel To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 22 06:25:34 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O4nyo-0000zA-BD for ged-emacs-devel@m.gmane.org; Thu, 22 Apr 2010 06:25:34 +0200 Original-Received: from localhost ([127.0.0.1]:58290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4nyn-0007as-GG for ged-emacs-devel@m.gmane.org; Thu, 22 Apr 2010 00:25:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4nyi-0007am-8p for emacs-devel@gnu.org; Thu, 22 Apr 2010 00:25:28 -0400 Original-Received: from [140.186.70.92] (port=59314 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4nyg-0007ae-Pz for emacs-devel@gnu.org; Thu, 22 Apr 2010 00:25:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4nyf-0006Nz-Ek for emacs-devel@gnu.org; Thu, 22 Apr 2010 00:25:26 -0400 Original-Received: from web62507.mail.re1.yahoo.com ([69.147.75.99]:31115) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O4nyf-0006Nt-CE for emacs-devel@gnu.org; Thu, 22 Apr 2010 00:25:25 -0400 Original-Received: (qmail 16728 invoked by uid 60001); 22 Apr 2010 04:25:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1271910324; bh=EfoHyWH1WaBgQBtv6xGgQcEDmYhcchQNwJX3ap91/Zg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=0j8+bQhCWuUVMxiGEnbniLPI42Wa78AICa9Prx8RMTfpPgoU1KVkIrn4GKpPJhT/pxu/Q1/Ud7gNWuLH4JBiCNmQpsC6bz+SGSux3MIDeK9sAv5RzaZITwECVDp52KeE9iF/GA/s6h0aCY+yBYvOfL9Vqeh0s2US5YL8NgwmXUw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=bpeRUrtSiUngzzCWVFvBLUV3dzUqT2WWO23NaQqiRo/q5blr2au4HcJPbzenYcC6IwbBiF0v4GuN5i40lUU25o5i16WFM+fMnRi88LObnPqUeyZoWnvTDYGO+P8XWX1DGjWz8eWhkcGyXqvlgOYW2CHgiHE3J+YJNgb7qlTLcNE=; X-YMail-OSG: WT1g0KoVM1kIEXE5qufWr_yB5UwQye88CcNSRUkKlED_8.M dbTgza8T.oXpRoZKfBcMPpeFkau8QND_SbP.F.g._G949SJ2JSxCOwGPhYbo FSH4pHqQsjsNJJOBM7owt_.rQKgVTQt52btPepUulRHRqgL2a3u3OxSTEelV 9vrvHNf5_kMgY0IKP4FwM.gSZAJatJijZHhvIqrLbjPfL2dMhGM2KOo1c6JB TQydBA4UbFDEbb8j5KJvamnQyAXweKn8cBrS6WXO0zoDrvSn6njS.xCwVRCY QI2kIdU7chO9I5jmdEEpHGhp3tw-- Original-Received: from [98.216.52.54] by web62507.mail.re1.yahoo.com via HTTP; Wed, 21 Apr 2010 21:25:24 PDT X-Mailer: YahooMailRC/348.5 YahooMailWebService/0.8.102.267879 In-Reply-To: <87zl0xdwce.fsf@mail.jurta.org> X-detected-operating-system: by eggs.gnu.org: FreeBSD 6.x (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124011 Archived-At: 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?