From: Tim X <timx@nospam.dev.null>
Subject: Re: configuring emacs as a programmer's editor
Date: Tue, 04 Jul 2006 18:34:00 +1000 [thread overview]
Message-ID: <87wtatydjb.fsf@tiger.rapttech.com.au> (raw)
In-Reply-To: 1151957748.309174.266320@p79g2000cwp.googlegroups.com
"Ted" <r.ted.byers@rogers.com> writes:
> Ted wrote:
>> [snip]
>> Compiling file c:/emacs-21.3/mode-compile.el at Fri Jun 30 11:54:37
>> 2006
>> !! End of file during parsing
>>
>> This looks like an error message, but it doesn't make sense given that
>> the last line in the file is:
>>
>> ;;; mode-compile.el ends here
>>
>> This tells me that the file I'm working with has not been truncated.
>>
>> Why does byte-compiling this file fail? Is the file on the above site
>> defective? Is the file available elsewhere?
>>
> I found out why. When I go to the website and save the file directly
> from within Internet Explorer, I invariably get the end of file
> nonsense. I also have to delete some HTML tags both at the beginning
> and end of the file, along with the ^L characters. If, instead, I
> right-click the web page and select "view source", I get a window in
> which there are no HTML tags, but I still have to delete the ^L
> characters. But in doing this, the file compiles properly, with only
> the warnings you mentioned. Now emacs behaves as I wish, at least for
> Perl programming.
>
> Now, all I need is to find out how to slightly alter how SQL is
> handled. I'd like to be able to use Emacs as a client for MySQL and
> for PostgreSQL. Can Emacs be set up to ease submitting SQL statements
> to either MySQL or PostgreSQL as I wish? If so, how? I have done a
> number of searches on this, but the signal to noise ratio is extremely
> low.
>
Emacs comes with sql.el - an sql mode which will allow you to send sql
statements to various database backends including postgres, mysql,
oracle, ms sql server etc.
,----[ C-h f sql-mode RET ]
| sql-mode is an interactive autoloaded Lisp function in `sql'.
| (sql-mode)
|
| Major mode to edit SQL.
|
| You can send SQL statements to the SQLi buffer using
| M-x sql-send-region. Such a buffer must exist before you can do this.
| See `sql-help' on how to create SQLi buffers.
|
|
| Uses keymap "sql-mode-map", which is not currently defined.
|
| Customization: Entry to this mode runs the `sql-mode-hook'.
|
| When you put a buffer in SQL mode, the buffer stores the last SQLi
| buffer created as its destination in the variable `sql-buffer'. This
| will be the buffer M-x sql-send-region sends the region to. If this
| SQLi buffer is killed, M-x sql-send-region is no longer able to
| determine where the strings should be sent to. You can set the
| value of `sql-buffer' using M-x sql-set-sqli-buffer.
|
| For information on how to create multiple SQLi buffers, see
| `sql-interactive-mode'.
|
| Note that SQL doesn't have an escape character unless you specify
| one. If you specify backslash as escape character in SQL,
| you must tell Emacs. Here's how to do that in your `~/.emacs' file:
|
| (add-hook 'sql-mode-hook
| (lambda ()
| (modify-syntax-entry ?\\ "." sql-mode-syntax-table)))
`----
Tim
--
tcross (at) rapttech dot com dot au
next prev parent reply other threads:[~2006-07-04 8:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-30 0:38 configuring emacs as a programmer's editor Ted
2006-06-30 7:03 ` David Kastrup
2006-06-30 7:04 ` Andreas Roehler
2006-06-30 8:02 ` Le Wang
2006-06-30 12:13 ` Eli Zaretskii
[not found] ` <mailman.3562.1151669638.9609.help-gnu-emacs@gnu.org>
2006-07-01 4:20 ` Le Wang
2006-06-30 7:37 ` Le Wang
2006-06-30 16:14 ` Ted
2006-07-01 23:19 ` Le Wang
2006-07-02 3:46 ` B. T. Raven
2006-07-02 8:32 ` Tim X
2006-07-03 20:15 ` Ted
2006-07-04 8:34 ` Tim X [this message]
2006-07-03 22:09 ` Jason Rumney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wtatydjb.fsf@tiger.rapttech.com.au \
--to=timx@nospam.dev.null \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.