[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with sql mode
From: |
Richard Riley |
Subject: |
Re: Help with sql mode |
Date: |
Fri, 09 Apr 2010 13:28:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
"Gary ." <help-gnu-emacs@garydjones.name> writes:
> On Thu, Apr 8, 2010 at 9:27 PM, Richard Riley wrote:
>> "Gary ." writes:
>>> On Thu, Apr 8, 2010 at 7:14 PM, Richard Riley wrote:
>>>> Example:
>>>>
>>>> use mydatabase;
>>>> select name from phonerecords where name like "Ril%";
>>>
>>> Ah. Well I didn't do a use, I just tried
>>> SELECT VERSION(), CURRENT_DATE;
>>> and nothing happened.
>>>
>>
>> You don't need "use" for that. It should work.
>
> Well, yeah. That's why I asked :)
>
> Let me start from the beginning.
> 0. start emacs :)
> 1. `M-x sql-mysql' --> I am prompted for various connection infos
> which I answer, window is split into two, one showing the current
> buffer and one showing the *SQL* buffer
> 2. I type my query as shown previously into the *SQL* buffer --> I get
> some nice syntax highlighting
> 3. Press RET / ENTER --> the highlighting vanishes... no sign of any
> output anywhere...
>
> My config looks like:
> (require 'sql)
> (setq auto-mode-alist
> (append '(("\\.sql$" . sql-mode)
> ("\\.tbl$" . sql-mode)
> ("\\.sp$" . sql-mode))
> auto-mode-alist))
>
> That's it.
>
> The problem is I can't really find much documentation about this, it
> seems to one of the least documented modes I've come across :(
>
I simply have
(define-key mode-specific-map [?Q] 'sql-mysql)
in emacs 23.
I dont edit sql, tbl or sp files directly and only use the interpreter.
Try with a more minimised .emacs and check nothing else is clashing.