From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: MySql on emacs -- just double checking ?? Date: Thu, 14 Jun 2007 23:27:34 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87vedqu0mx.fsf@lion.rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181828584 30245 80.91.229.12 (14 Jun 2007 13:43:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2007 13:43:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 14 15:43:03 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HypbG-0006wm-RH for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jun 2007 15:42:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HypbG-0005wj-6w for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jun 2007 09:42:58 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!sn-xt-sjc-02!sn-xt-sjc-07!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:TZY6GvdoEiYXUoEFQBZzR1nMBik= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 40 Original-Xref: shelby.stanford.edu gnu.emacs.help:149472 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45058 Archived-At: William Case writes: > Hi; > > I want to write some mysql procedures on emacs . I have found the > sql-mysql interactive mode and the sql-mode. Is there a mysql > text/procedure writing mode or is the sql mode applicable to both. > > And, is there an .el that has a specialized font-lock for data bases > (particularly mysql). > > I have checked info and the wiki. I may have misunderstood but the > suggested patches seem to be included in emacs22 and don't *seem* to > directly address my questions? > > Would appreciate any answers or pointers to where I might have missed > something. > > -- I use sql-mode for this. When you open a file with a .sql extension, you will proably be put into sql mode. Once there, you can select 'mysql' as the product and get the appropriate keyword highlighting. then, when you open an sqli buffer (SQL interactive buffer), you can send the code or regions of code from your sql buffer to the interactive buffer to have it executed. Now, sql mode is not specialised for writing procedures, but you can try something like I have done for working with PL/SQL (Oracle's procedural sql used for writing stored procedures etc). I have defined a plsql mode which is derived from sql mode. All I've really done is define a few extra keywords and some formatting rules (and some align rules for nicely formatting embedded SQL for cursors etc). This was fairly easy to do. Have a look at the derived mode entry on the emacs wiki for an example. regards, Tim -- tcross (at) rapttech dot com dot au