Thread: colored PL with emacs

colored PL with emacs

From
Martin Marques
Date:
Does anyone know of a .el file that can be used with Emacs to get colored
coding when working with PL/pgSQL?

-- 08:40:01 up 8 days, 27 min,  1 user,  load average: 2.53, 2.09, 1.70
-----------------------------------------------------------------
Martín Marqués        | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador            Universidad Nacional                 del Litoral
-----------------------------------------------------------------


Re: colored PL with emacs

From
Stephen Quinney
Date:
On Tue, Aug 31, 2004 at 08:42:44AM -0300, Martin Marques wrote:
> Does anyone know of a .el file that can be used with Emacs to get colored 
> coding when working with PL/pgSQL?
> 

Emacs 21.3 (and possibly earlier versions) comes with an SQL mode
which I know has a PostgreSQL keyword highlighting option in the
menu. Just just need:

Meta-x sql-mode
Meta-x global-font-lock-mode

(and possibly select the postgres option in the highlighting bit of
the SQL menu that appears if you are using X)

I hope that helps,

Stephen Quinney




Re: colored PL with emacs

From
Martin Marques
Date:
El Mar 31 Ago 2004 09:11, Stephen Quinney escribió:
> On Tue, Aug 31, 2004 at 08:42:44AM -0300, Martin Marques wrote:
> > Does anyone know of a .el file that can be used with Emacs to get colored
> > coding when working with PL/pgSQL?
>
> Emacs 21.3 (and possibly earlier versions) comes with an SQL mode
> which I know has a PostgreSQL keyword highlighting option in the
> menu. Just just need:
>
> Meta-x sql-mode
> Meta-x global-font-lock-mode
>
> (and possibly select the postgres option in the highlighting bit of
> the SQL menu that appears if you are using X)

I have SQL highlighting, but what I want are colors for the PL/pgSQL key
words. It would make PL programming much easier.

-- 09:30:02 up 8 days,  1:17,  2 users,  load average: 0.70, 0.44, 0.54
-----------------------------------------------------------------
Martín Marqués        | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador            Universidad Nacional                 del Litoral
-----------------------------------------------------------------


Re: colored PL with emacs

From
Manuel Sugawara
Date:
Martin Marques <martin@bugs.unl.edu.ar> writes:

> I have SQL highlighting, but what I want are colors for the PL/pgSQL
> key words. It would make PL programming much easier.

Since the Pl/PgSQL code is quoted (x)emacs paints the whole thing
using the string face. Delete one of the apostrophes delimiting the
code while editing and you should get some highlighting.

Regards,
Manuel.


Re: colored PL with emacs

From
Josh Berkus
Date:
Martin,

> > I have SQL highlighting, but what I want are colors for the PL/pgSQL
> > key words. It would make PL programming much easier.

KDE's Kate has PostgreSQL highlighting.  Unfortunately, the config is XML so 
it's not transferrable to Emacs ...

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


Re: colored PL with emacs

From
"Greg Sabino Mullane"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I have SQL highlighting, but what I want are colors for the PL/pgSQL
> key words. It would make PL programming much easier.
There's nothing out there. but writing one is on my long-term TODO list.
> KDE's Kate has PostgreSQL highlighting.  Unfortunately, the config
> is XML so it's not transferrable to Emacs ...
Send me (or the list, of it's short) a copy, I'll see if I can
do anything with it.
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200408311920
-----BEGIN PGP SIGNATURE-----
iD8DBQFBNQfgvJuQZxSWSsgRAl8CAJ9bmcZG/pTx9Pg5H+sjxT77RbWsLwCg0b1u
oB/ZJocEC42tdahkIrlBIZs=
=eF8t
-----END PGP SIGNATURE-----




Re: colored PL with emacs

From
John DeSoi
Date:
On Aug 31, 2004, at 1:23 PM, Manuel Sugawara wrote:

>
>> I have SQL highlighting, but what I want are colors for the PL/pgSQL
>> key words. It would make PL programming much easier.
>
> Since the Pl/PgSQL code is quoted (x)emacs paints the whole thing
> using the string face. Delete one of the apostrophes delimiting the
> code while editing and you should get some highlighting.

I'm working on an editor specifically designed for PostgreSQL and 
plpgsql programming. It colors syntax within function strings and helps 
get the quoting right (8.0 dollar quoting is also supported). The 
editor is based on emacs but it also has emulation modes that are more 
friendly for those who are not familiar with emacs. I hope to start 
beta testing the Mac OS X version next week, followed by a Windows 
version probably in October. I have not yet decided if I will do a 
Linux version, but it should be possible. The estimated price for this 
product is $65.

Send me an email if you are interested in beta testing the Mac OS X 
version.

Best,

John DeSoi, Ph.D.