Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Emacs on SQLPlus, er uh... SQLPlus on emacs.

RE: Emacs on SQLPlus, er uh... SQLPlus on emacs.

From: Lee Cullip <Lee.Cullip_at_three.co.uk>
Date: Tue, 29 Jul 2003 02:44:23 -0800
Message-ID: <F001.005C7A28.20030729024423@fatcity.com>


Thanks for this David, it's given me somewhere to start!!!

Cheers
Lee

-----Original Message-----
Sent: 28 July 2003 17:35
To: Multiple recipients of list ORACLE-L

Here's mine with references to optional packages (mainly jde) removed. Its set up for windows and cygwin, so if you're using something else (better;) you can remove the cygwin bit at the end.

--x--x--x--x--x--cut-here--x--x--x--x--x--

(setq viper-mode t)
(require 'viper)
(custom-set-variables

  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!   ;; Your init file should contain only one such instance.
'(auto-compression-mode t nil (jka-compr))
'(case-fold-search t)
'(column-number-mode t)
'(current-language-environment "Latin-1")
'(default-input-method "latin-1-prefix")
'(fill-column 80)
'(font-lock-maximum-size 1048576)
'(frame-background-mode (quote dark))
'(global-font-lock-mode t nil (font-lock))
'(indent-tabs-mode nil)
'(mouse-wheel-mode t nil (mwheel))
'(perl-continued-brace-offset -3)
'(perl-continued-statement-offset 3)
'(perl-indent-level 3)
'(sgml-indent-data t t)
'(tab-width 3)
'(text-mode-hook (quote (turn-on-auto-fill (lambda nil (auto-fill-mode 1))
viper-mode text-mode-hook-identify)))
'(viper-auto-indent t)
'(viper-electric-mode nil)
'(viper-emacs-state-mode-list (quote (custom-mode dired-mode efs-mode
tar-mode mh-folder-mode gnus-group-mode gnus-summary-mode Info-mode Buffer-menu-mode view-mode vm-mode vm-summary-mode SQLi-mode sql-interactive-mode shell-mode csh-mode ksh-mode comint-mode telnet-mode rlogin-mode)))
'(viper-vi-state-mode-list (quote (fundamental-mode makefile-mode help-mode
awk-mode m4-mode html-mode emacs-lisp-mode lisp-mode lisp-interaction-mode java-mode cc-mode c-mode c++-mode fortran-mode f90-mode basic-mode bat-mode asm-mode prolog-mode text-mode indented-text-mode tex-mode latex-mode bibtex-mode completion-list-mode compilation-mode perl-mode javascript-mode tcl-mode python-mode gnus-article-mode mh-show-mode sql-mode sh-mode Man-mode man-mode))))

;; SQL/PL/SQL mode

(add-to-list 'auto-mode-alist '("\\.sql$" . sql-mode))
(add-to-list 'auto-mode-alist '("\\.pls$" . sql-mode))
(add-to-list 'auto-mode-alist '("\\.plb$" . sql-mode))
(eval-after-load "sql"

  '(font-lock-add-keywords
   'sql-mode  

'(("\\<\\(exception\\|notfound\\|pragma\\|cursor_already_open\\|dup_val_on_i ndex\\|invalid_cursor\\|invalid_number\\|login_denied\\|no_data_found\\|not_ logged_on\\|program_error\\|storage_error\\|timeout_on_resource\\|too_many_r ows\\|transaction_backed_out\\|value_error\\|zero_divide\\|others\\)\\>" . font-lock-warning-face)

    ("\\<loop\\>" . font-lock-keyword-face)     ("\\<\\(if\\|elsif\\|else\\|while\\|return\\)\\>" . font-lock-function-name-face))))
(autoload 'sql-oracle "sql" "Interactive SQL mode." t):w

;; Load dired-x
(require 'dired-x)

;; Another attept to get cygwin working

(setq binary-process-input t) 
(setq w32-quote-process-args ?\") 
(setq shell-file-name "bash") ;; or sh if you rename your bash executable to
sh.
(setenv "SHELL" shell-file-name) 
(setq explicit-shell-file-name shell-file-name) 
(setq explicit-sh-args '("-login" "-i"))
--x--x--x--x--x--cut-here--x--x--x--x--x--
> -----Original Message-----
> From: Lee Cullip [mailto:Lee.Cullip_at_three.co.uk]
> Sent: 28 July 2003 16:24
> To: Multiple recipients of list ORACLE-L
> Subject: RE: Emacs on SQLPlus, er uh... SQLPlus on emacs.
> 
> 
> Thanks David, that is pretty good stuff. Where would the 
> .emacs file be for
> this so that I can have a look and try and understand the 
> configuration?
> 
> Cheers
> Lee
> 
> -----Original Message-----
> Sent: 28 July 2003 14:14
> To: Multiple recipients of list ORACLE-L
> 
> 
> I know what you mean.  The best I can come up with is
> http://www.emacswiki.org/cgi-bin/wiki.pl?SqlMode.  My .emacs 
> has been built
> up over five years.   Its not pretty, but I'd be lost without it.
> 
> Fortunately, sql-mode comes with GNU emacs (and I'm almost 
> certain, with
> Xemacs) and doesn't need any setup beyond ensuring that Emacs 
> can find the
> oracle client installation.  Simply type M-x sql-oracle.  It 
> will prompt for
> the username, password and sqlnet alias and then try to log you in.
> 
> Regards
> David Lord
> 
> > -----Original Message-----
> > From: Lee Cullip [mailto:Lee.Cullip_at_three.co.uk]
> > Sent: 28 July 2003 13:49
> > To: Multiple recipients of list ORACLE-L
> > Subject: RE: Emacs on SQLPlus, er uh... SQLPlus on emacs.
> > 
> > 
> > I'd see myself as one of the old dinosaur type's!! (Been 
> > using vi since I
> > can remember) ;-) I've tried playing with emacs many times, 
> > but it's the
> > configuration that put's me off everytime. Is there a good source of
> > information for configuring emacs with sql support ?
> > 
> > Regards
> > Lee
> > 
> > -----Original Message-----
> > Sent: 28 July 2003 13:21
> > To: Multiple recipients of list ORACLE-L
> > 
> > 
> > I use sql-mode for local databases.  Its got the advantage 
> > that you can
> > 'pop' sql statements from another buffer into it, giving you 
> > something very
> > like the sqlplus worksheet.  Its great when you're fiddling 
> with a big
> > query.
> > 
> > Also, I use emacs with the vi emulation (viper) so I get the 
> > best of both
> > worlds;)
> > 
> > Regards
> > David Lord
> > 
> > > -----Original Message-----
> > > From: Jeremiah Wilton [mailto:jwilton_at_speakeasy.net]
> > > Sent: 26 July 2003 10:09
> > > To: Multiple recipients of list ORACLE-L
> > > Subject: RE: Emacs on SQLPlus, er uh... SQLPlus on emacs.
> > > 
> > > 
> > > I use SQL*Plus running under emacs shell every day.  It is my 
> > > preferred way of:
> > > 
> > > - Recording my sqlplus sessions so I can go back and search to see
> > >   what I did
> > > - having an up-arrow comand history capability
> > > - Having line editing capability
> > > - editing SQL scripts in the same window where I am running 
> > > - everything else
> > > 
> > > I came to prefer emacs because it has capabilities far in 
> > excess of vi
> > > or any other unix editor.  Because it is open source 
> software, many
> > > people have contributed over the years, making the 
> package extremely
> > > powerful.  Also, I started on Vax/VMS edt and eve/tpu, 
> > which are more
> > > like emacs than vi.
> > > 
> > > There is an emacs OracleSQL mode, but I don't use it.  I 
> just start
> > > emacs, META-X shell, then sqlplus...
> > > 
> > > --
> > > Jeremiah Wilton
> > > http://www.speakeasy.net/~jwilton
> > > 
> > > On Fri, 25 Jul 2003, Orr, Steve wrote:
> > > 
> > > > I agree with the developer vs. sysadmin generalization but 
> > > this was not
> > > > meant to be a post about favorite editors... It's about 
> > > whether anyone
> > > > has used or seen a SQLPlus "shell" running under emacs. 
> Has anyone
> > > > "witnessed" SQLPlus running under a well-configured emacs 
> > > session and
> > > > have impressions to share?
> > > > 
> > > > The statistics I've heard are that 9 out of 10 
> > > SysAdmin/DBA's use vi. I
> > > > wonder what the breakdown is for Linux admins? Since emacs 
> > > is easy to
> > > > implement I could see it gaining ground on Linux but 
> sometimes old
> > > > dinosaur type SysAdmins are slow to evolve. :-)
> > > 
> > > -- 
> > > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > > -- 
> > > Author: Jeremiah Wilton
> > >   INET: jwilton_at_speakeasy.net
> > > 
> > > Fat City Network Services    -- 858-538-5051 
> http://www.fatcity.com
> > > San Diego, California        -- Mailing list and web 
> > hosting services
> > > 
> > 
> ---------------------------------------------------------------------
> > > To REMOVE yourself from this mailing list, send an E-Mail message
> > > to: ListGuru_at_fatcity.com (note EXACT spelling of 
> 'ListGuru') and in
> > > the message BODY, include a line containing: UNSUB ORACLE-L
> > > (or the name of mailing list you want to be removed 
> from).  You may
> > > also send the HELP command for other information (like 
> subscribing).
> > > 
> > 
> > 
> > 
> **********************************************************************
> > This communication is intended for the addressee(s) named 
> > above only.  This
> > communication may contain confidential or privileged 
> > information.  If you
> > are not the intended recipient, please do not read, copy, use 
> > or disclose
> > this communication to others; also please notify the sender 
> > by replying to
> > the email communication or by telephone and then delete the 
> > communication
> > and any copies of it.
> > Viruses:  Although we have taken steps to ensure that this 
> e-mail and
> > attachments are free from any virus, we advise that in 
> > keeping with good
> > computing practice the recipient should ensure that they are 
> > actually virus
> > free.
> > 
> **********************************************************************
> > -- 
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > -- 
> > Author: Lord David
> >   INET: David.Lord_at_hays-ims.com
> > 
> > Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> > San Diego, California        -- Mailing list and web 
> hosting services
> > 
> ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
> > 
> > 
> > ______________________________________________________________
> > __________
> > 
> > This e-mail message (including any attachment) is intended 
> > only for the personal 
> > use of the recipient(s) named above. This message is 
> > confidential and may be 
> > legally privileged.  If you are not an intended recipient, 
> > you may not review, copy or 
> > distribute this message. If you have received this 
> > communication in error, please notify 
> > us immediately by e-mail and delete the original message.
> > 
> > Any views or opinions expressed in this message are those of 
> > the author only. 
> > Furthermore, this message (including any attachment) does not 
> > create any legally 
> > binding rights or obligations whatsoever, which may only be 
> > created by the exchange 
> > of hard copy documents signed by a duly authorised 
> > representative of Hutchison 
> > 3G UK Limited.
> > ______________________________________________________________
> > __________
> > 
> > -- 
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > -- 
> > Author: Lee Cullip
> >   INET: Lee.Cullip_at_three.co.uk
> > 
> > Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> > San Diego, California        -- Mailing list and web 
> hosting services
> > 
> ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
> > 
> 
> 
> **********************************************************************
> This communication is intended for the addressee(s) named 
> above only.  This
> communication may contain confidential or privileged 
> information.  If you
> are not the intended recipient, please do not read, copy, use 
> or disclose
> this communication to others; also please notify the sender 
> by replying to
> the email communication or by telephone and then delete the 
> communication
> and any copies of it.
> Viruses:  Although we have taken steps to ensure that this e-mail and
> attachments are free from any virus, we advise that in 
> keeping with good
> computing practice the recipient should ensure that they are 
> actually virus
> free.
> **********************************************************************
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Lord David
>   INET: David.Lord_at_hays-ims.com
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> 
> 
> ______________________________________________________________
> __________
> 
> This e-mail message (including any attachment) is intended 
> only for the personal 
> use of the recipient(s) named above. This message is 
> confidential and may be 
> legally privileged.  If you are not an intended recipient, 
> you may not review, copy or 
> distribute this message. If you have received this 
> communication in error, please notify 
> us immediately by e-mail and delete the original message.
> 
> Any views or opinions expressed in this message are those of 
> the author only. 
> Furthermore, this message (including any attachment) does not 
> create any legally 
> binding rights or obligations whatsoever, which may only be 
> created by the exchange 
> of hard copy documents signed by a duly authorised 
> representative of Hutchison 
> 3G UK Limited.
> ______________________________________________________________
> __________
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Lee Cullip
>   INET: Lee.Cullip_at_three.co.uk
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> 


**********************************************************************
This communication is intended for the addressee(s) named above only. This communication may contain confidential or privileged information. If you are not the intended recipient, please do not read, copy, use or disclose this communication to others; also please notify the sender by replying to the email communication or by telephone and then delete the communication and any copies of it.
Viruses: Although we have taken steps to ensure that this e-mail and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure that they are actually virus free.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Lord David
  INET: David.Lord_at_hays-ims.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


________________________________________________________________________

This e-mail message (including any attachment) is intended only for the personal 
use of the recipient(s) named above. This message is confidential and may be 
legally privileged.  If you are not an intended recipient, you may not review, copy or 
distribute this message. If you have received this communication in error, please notify 
us immediately by e-mail and delete the original message.

Any views or opinions expressed in this message are those of the author only. 
Furthermore, this message (including any attachment) does not create any legally 
binding rights or obligations whatsoever, which may only be created by the exchange 
of hard copy documents signed by a duly authorised representative of Hutchison 
3G UK Limited.
________________________________________________________________________

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Lee Cullip
  INET: Lee.Cullip_at_three.co.uk

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jul 29 2003 - 05:44:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US