* Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
@ 2003-05-16 21:07 Mamouliane
2003-05-17 7:12 ` Tim X
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mamouliane @ 2003-05-16 21:07 UTC (permalink / raw)
Oracle Pro*C is basically a pre-processor. It takes a source file
written in C and containing SQL statements. Hence the name embedded
SQL.
The pre-processor replaces all SQL statements by C statements &
function calls. In the end what you have is C source code that is
then compiled and linked with Oracle libraries.
This is a very basic description of what it does but you get the idea.
Is anyone aware of such a mode available for Pro*C? I know of a SQL
mode and PL/SQL mode but can't find a mode for Pro*C or embedded
SQL/C.
Should I write such a mode? Is it very difficult? It would basically
be an extension to the available C mode. There is already modes
for SQL and PL/SQL out there so I figure I would use that too.
What do you guys think?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
2003-05-16 21:07 Looking for mode for Oracle Pro*C. AKA embedded SQL/C Mamouliane
@ 2003-05-17 7:12 ` Tim X
2003-05-19 12:19 ` Kevin Dziulko
[not found] ` <873cjdsxz3.fsf@gnu.org>
2003-05-19 21:22 ` Robert Pollard
[not found] ` <mailman.6420.1053382303.21513.help-gnu-emacs@gnu.org>
2 siblings, 2 replies; 8+ messages in thread
From: Tim X @ 2003-05-17 7:12 UTC (permalink / raw)
>>>>> "Mamouliane" == Mamouliane <here@home.qc.ca> writes:
Mamouliane> Oracle Pro*C is basically a pre-processor. It takes a
Mamouliane> source file written in C and containing SQL
Mamouliane> statements. Hence the name embedded SQL. The
Mamouliane> pre-processor replaces all SQL statements by C statements
Mamouliane> & function calls. In the end what you have is C source
Mamouliane> code that is then compiled and linked with Oracle
Mamouliane> libraries. This is a very basic description of what it
Mamouliane> does but you get the idea.
Mamouliane> Is anyone aware of such a mode available for Pro*C? I
Mamouliane> know of a SQL mode and PL/SQL mode but can't find a mode
Mamouliane> for Pro*C or embedded SQL/C. Should I write such a mode?
Mamouliane> Is it very difficult? It would basically be an extension
Mamouliane> to the available C mode. There is already modes for SQL
Mamouliane> and PL/SQL out there so I figure I would use that too.
Before writing your own mode, maybe check out multi-mode-mode which
allows you to use multiple modes in one buffer. I've not used it
myself, but remember seeing an article in one of the newsgroups where
someone was using sql-mode and c-mode for Oracle proc.
Tim
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
2003-05-17 7:12 ` Tim X
@ 2003-05-19 12:19 ` Kevin Dziulko
[not found] ` <873cjdsxz3.fsf@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Kevin Dziulko @ 2003-05-19 12:19 UTC (permalink / raw)
On 17 May 2003, Tim X wrote:
> >>>>> "Mamouliane" == Mamouliane <here@home.qc.ca> writes:
>
> Mamouliane> Oracle Pro*C is basically a pre-processor. It takes a
> Mamouliane> source file written in C and containing SQL
> Mamouliane> statements. Hence the name embedded SQL. The
> Mamouliane> pre-processor replaces all SQL statements by C statements
> Mamouliane> & function calls. In the end what you have is C source
> Mamouliane> code that is then compiled and linked with Oracle
> Mamouliane> libraries. This is a very basic description of what it
> Mamouliane> does but you get the idea.
>
> Mamouliane> Is anyone aware of such a mode available for Pro*C? I
> Mamouliane> know of a SQL mode and PL/SQL mode but can't find a mode
> Mamouliane> for Pro*C or embedded SQL/C. Should I write such a mode?
> Mamouliane> Is it very difficult? It would basically be an extension
> Mamouliane> to the available C mode. There is already modes for SQL
> Mamouliane> and PL/SQL out there so I figure I would use that too.
>
> Before writing your own mode, maybe check out multi-mode-mode which
> allows you to use multiple modes in one buffer. I've not used it
> myself, but remember seeing an article in one of the newsgroups where
> someone was using sql-mode and c-mode for Oracle proc.
>
> Tim
>
>
Please let us know if this works well or not. I also write c code with
embedded SQL, and often get frustrated that indentation doesn't work the
way that I would like it too. I am using esqlc for ingres. Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
2003-05-16 21:07 Looking for mode for Oracle Pro*C. AKA embedded SQL/C Mamouliane
2003-05-17 7:12 ` Tim X
@ 2003-05-19 21:22 ` Robert Pollard
[not found] ` <mailman.6420.1053382303.21513.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 8+ messages in thread
From: Robert Pollard @ 2003-05-19 21:22 UTC (permalink / raw)
Cc: help-gnu-emacs
I am sorry I can't help you with your question but I believe you could
help me. I have been looking for a way to define my own colorization
scheme for a particular mode type. One of the ones I was needing to
define was PL/SQL. You indicated there was a SQL and PL/SQL mode in
Emacs. I was not aware that this existed. How can I get this mode?
And, maybe you can help me understand how I can define my own mode or
colorizations as well. I have bought books on Emacs (which are few and
far between) but none of them talk about defining your own mode.
I have asked this list the question of how you define your own colors.
After a few responses of RTFM to you can colorize text with the
font-lock-mode command I gave up on getting what I was looking for.
The manual describes and gives examples of adding keywords. This is
not what I am looking for. I want to know how adding keywords works.
It appears when you add keywords you use a type face definition like
font-lock-warning-face. I don't want to use whatever
font-lock-warning-face is using as a color or type definition. I want
to be able to use my own colors when defining patterns. This is what I
need to know.
Could/would you point me in a direction to find out how to define my
own colors for specific patterns?
Could/would you point me in a direction to understanding what it would
take to define my own mode?
Could/would you let me know how to use SQL or PL/SQL editing modes?
Thanks,
Robert Pollard
On Friday, May 16, 2003, at 02:07 PM, Mamouliane wrote:
>
> Oracle Pro*C is basically a pre-processor. It takes a source file
> written in C and containing SQL statements. Hence the name embedded
> SQL.
> The pre-processor replaces all SQL statements by C statements &
> function calls. In the end what you have is C source code that is
> then compiled and linked with Oracle libraries.
> This is a very basic description of what it does but you get the idea.
>
> Is anyone aware of such a mode available for Pro*C? I know of a SQL
> mode and PL/SQL mode but can't find a mode for Pro*C or embedded
> SQL/C.
> Should I write such a mode? Is it very difficult? It would basically
> be an extension to the available C mode. There is already modes
> for SQL and PL/SQL out there so I figure I would use that too.
>
> What do you guys think?
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
[not found] ` <mailman.6420.1053382303.21513.help-gnu-emacs@gnu.org>
@ 2003-05-19 23:31 ` Johan Bockgård
2003-05-20 9:43 ` Tim X
2003-05-20 16:13 ` Mamouliane
2 siblings, 0 replies; 8+ messages in thread
From: Johan Bockgård @ 2003-05-19 23:31 UTC (permalink / raw)
Robert Pollard <rpollard@apple.com> writes:
> Could/would you point me in a direction to find out how to define my
> own colors for specific patterns?
Make a face. See the elisp manual (info "(elisp)Faces").
Simple way:
M-x make-face RET foo RET
M-x customize-face RET foo RET
Save your changes.
> Could/would you point me in a direction to understanding what it would
> take to define my own mode?
http://two-wugs.net/emacs/mode-tutorial.html
--
The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners. -- Ernst Jan Plugge
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
[not found] ` <mailman.6420.1053382303.21513.help-gnu-emacs@gnu.org>
2003-05-19 23:31 ` Johan Bockgård
@ 2003-05-20 9:43 ` Tim X
2003-05-20 16:13 ` Mamouliane
2 siblings, 0 replies; 8+ messages in thread
From: Tim X @ 2003-05-20 9:43 UTC (permalink / raw)
>>>>> "Robert" == Robert Pollard <rpollard@apple.com> writes:
Robert> I am sorry I can't help you with your question but I believe
Robert> you could help me. I have been looking for a way to define
Robert> my own colorization scheme for a particular mode type. One
Robert> of the ones I was needing to define was PL/SQL. You
Robert> indicated there was a SQL and PL/SQL mode in Emacs. I was
Robert> not aware that this existed. How can I get this mode? And,
Robert> maybe you can help me understand how I can define my own mode
Robert> or colorizations as well. I have bought books on Emacs
Robert> (which are few and far between) but none of them talk about
Robert> defining your own mode.
Robert> I have asked this list the question of how you define your
Robert> own colors. After a few responses of RTFM to you can
Robert> colorize text with the font-lock-mode command I gave up on
Robert> getting what I was looking for. The manual describes and
Robert> gives examples of adding keywords. This is not what I am
Robert> looking for. I want to know how adding keywords works. It
Robert> appears when you add keywords you use a type face definition
Robert> like font-lock-warning-face. I don't want to use whatever
Robert> font-lock-warning-face is using as a color or type
Robert> definition. I want to be able to use my own colors when
Robert> defining patterns. This is what I need to know.
Robert> Could/would you point me in a direction to find out how to
Robert> define my own colors for specific patterns?
Robert> Could/would you point me in a direction to understanding what
Robert> it would take to define my own mode?
Robert> Could/would you let me know how to use SQL or PL/SQL editing
Robert> modes?
Robert> Thanks,
Robert> Robert Pollard
Robert> On Friday, May 16, 2003, at 02:07 PM, Mamouliane wrote:
>> Oracle Pro*C is basically a pre-processor. It takes a source file
>> written in C and containing SQL statements. Hence the name
>> embedded SQL. The pre-processor replaces all SQL statements by C
>> statements & function calls. In the end what you have is C source
>> code that is then compiled and linked with Oracle libraries. This
>> is a very basic description of what it does but you get the idea.
>>
>> Is anyone aware of such a mode available for Pro*C? I know of a
>> SQL mode and PL/SQL mode but can't find a mode for Pro*C or
>> embedded SQL/C. Should I write such a mode? Is it very difficult?
>> It would basically be an extension to the available C mode. There
>> is already modes for SQL and PL/SQL out there so I figure I would
>> use that too.
>>
>> What do you guys think?
>> _______________________________________________ Help-gnu-emacs
>> mailing list Help-gnu-emacs@gnu.org
>> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>>
Look at http://www.emacswiki.org - you can get PL/SQL mode there -
I've been using it daily - on the whole it works well - it does have
some minor bugs and I have sent some corrections and bug reports to
the author, but have never received a response and the mode has not
been updated since late last year.
There is also some info on running modes for Pro*C and other tips
relating to using sql mode, additional functions which are quite
useful and there is some information at this site on writing your own
mode etc.
Tim
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
[not found] ` <873cjdsxz3.fsf@gnu.org>
@ 2003-05-20 14:45 ` Mamouliane
0 siblings, 0 replies; 8+ messages in thread
From: Mamouliane @ 2003-05-20 14:45 UTC (permalink / raw)
On Sat, 17 May 2003 11:50:56 +0200, Alex Schroeder <alex@gnu.org>
wrote:
>Tim X <timx@spamto.devnul.com> writes:
>
>> Before writing your own mode, maybe check out multi-mode-mode which
>> allows you to use multiple modes in one buffer. I've not used it
>> myself, but remember seeing an article in one of the newsgroups where
>> someone was using sql-mode and c-mode for Oracle proc.
>
>http://www.emacswiki.org/cgi-bin/wiki.pl?OracleProC
>
>Alex.
Thank you Alex. I'll check it out.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
[not found] ` <mailman.6420.1053382303.21513.help-gnu-emacs@gnu.org>
2003-05-19 23:31 ` Johan Bockgård
2003-05-20 9:43 ` Tim X
@ 2003-05-20 16:13 ` Mamouliane
2 siblings, 0 replies; 8+ messages in thread
From: Mamouliane @ 2003-05-20 16:13 UTC (permalink / raw)
On Mon, 19 May 2003 14:22:48 -0700, Robert Pollard
<rpollard@apple.com> wrote:
>I am sorry I can't help you with your question but I believe you could
>help me. I have been looking for a way to define my own colorization
>scheme for a particular mode type. One of the ones I was needing to
>define was PL/SQL. You indicated there was a SQL and PL/SQL mode in
>Emacs. I was not aware that this existed. How can I get this mode?
>And, maybe you can help me understand how I can define my own mode or
>colorizations as well. I have bought books on Emacs (which are few and
>far between) but none of them talk about defining your own mode.
>
>I have asked this list the question of how you define your own colors.
>After a few responses of RTFM to you can colorize text with the
>font-lock-mode command I gave up on getting what I was looking for.
>The manual describes and gives examples of adding keywords. This is
>not what I am looking for. I want to know how adding keywords works.
>It appears when you add keywords you use a type face definition like
>font-lock-warning-face. I don't want to use whatever
>font-lock-warning-face is using as a color or type definition. I want
>to be able to use my own colors when defining patterns. This is what I
>need to know.
>
>Could/would you point me in a direction to find out how to define my
>own colors for specific patterns?
>
>Could/would you point me in a direction to understanding what it would
>take to define my own mode?
>
>Could/would you let me know how to use SQL or PL/SQL editing modes?
>
>Thanks,
>
>Robert Pollard
>
>On Friday, May 16, 2003, at 02:07 PM, Mamouliane wrote:
>
Hi Robert,
The sql-mode comes standard with Emacs and XEmacs. If you want
to take a look at it, it's in lisp/progmodes/sql.el. It's very well
documented so you may be able to find what you are looking for.
A PL/SQL mode can be found here:
http://www.emacswiki.org/cgi-bin/wiki.pl?PlsqlMode
By the way, you can find a lot of good stuff at
http://www.emacswiki.org. Thanks again Alex!
Mamou
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-05-20 16:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-16 21:07 Looking for mode for Oracle Pro*C. AKA embedded SQL/C Mamouliane
2003-05-17 7:12 ` Tim X
2003-05-19 12:19 ` Kevin Dziulko
[not found] ` <873cjdsxz3.fsf@gnu.org>
2003-05-20 14:45 ` Mamouliane
2003-05-19 21:22 ` Robert Pollard
[not found] ` <mailman.6420.1053382303.21513.help-gnu-emacs@gnu.org>
2003-05-19 23:31 ` Johan Bockgård
2003-05-20 9:43 ` Tim X
2003-05-20 16:13 ` Mamouliane
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).