help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MySql on emacs -- just double checking ??


From: Tim X
Subject: Re: MySql on emacs -- just double checking ??
Date: Thu, 14 Jun 2007 23:27:34 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

William Case <billlinux@rogers.com> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]