From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Case Newsgroups: gmane.emacs.help Subject: Re: MySql on emacs -- just double checking ?? Date: Thu, 14 Jun 2007 09:54:08 -0400 Message-ID: <1181829248.2832.17.camel@CASE> References: <87vedqu0mx.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181829423 1183 80.91.229.12 (14 Jun 2007 13:57:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2007 13:57:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Tim X Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 14 15:57:02 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 1Hypop-00029T-83 for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jun 2007 15:56:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hypoo-0003IC-Ou for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jun 2007 09:56:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HypoW-0003GX-Ty for help-gnu-emacs@gnu.org; Thu, 14 Jun 2007 09:56:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HypoW-0003G0-BF for help-gnu-emacs@gnu.org; Thu, 14 Jun 2007 09:56:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HypoW-0003Fw-1j for help-gnu-emacs@gnu.org; Thu, 14 Jun 2007 09:56:40 -0400 Original-Received: from smtp107.rog.mail.re2.yahoo.com ([68.142.225.205]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HypoV-0003bf-KH for help-gnu-emacs@gnu.org; Thu, 14 Jun 2007 09:56:39 -0400 Original-Received: (qmail 13966 invoked from network); 14 Jun 2007 13:56:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=kiodiUur8rKnUnrCgPb5O7x+bEFIS1i10CSqEivZHXlCAWhnHZxvX5uMJESEJ1IoNcVfVicK+T5FUENFuoWM0u7QiViGnvwaynVlQ+ST25XLglIWfftWD3x/KbCmgyGAlKQxMHtjcmt/3LhzfgkqIrhNISMhBJtX+WZ4SkAHarU= ; Original-Received: from unknown (HELO ?192.168.1.4?) (billlinux@rogers.com@74.104.51.86 with plain) by smtp107.rog.mail.re2.yahoo.com with SMTP; 14 Jun 2007 13:56:38 -0000 X-YMail-OSG: 41F1YHoVM1mDJdWXFw2tjUBNDmMvk46CFyjOS0KI0z4yIKnPMZDv3C83tnbU_pmnxA-- In-Reply-To: <87vedqu0mx.fsf@lion.rapttech.com.au> X-Mailer: Evolution 2.10.1 (2.10.1-4.fc7) X-detected-kernel: Genre and OS details not recognized. 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:45063 Archived-At: Thanks Tim; On Thu, 2007-06-14 at 23:27 +1000, Tim X wrote: > William Case writes: > > > Hi; > > 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. Those are the very things I wanted to check about. I could have spent a year playing around re-inventing the wheel. I probably would have ended up with a square wheel. -- Regards Bill