help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comint or start-process


From: Xavier Maillard
Subject: Re: comint or start-process
Date: Thu, 10 Dec 2009 13:00:39 +0100
User-agent: Rmail/23.1.1 Emacs/23.1.1 (gnu/linux)

   > My plans are quite simple:
   > 
   > - connect to my db
   > - execute queries
   > - parse the output to retrieve my data
   > - disconnect
   > 
   > The retrieved data will be used later in my mode.
   > 
   > Questions: do I really need to do something with start-process
   > and friends or do you think I can hack around comint (and/or
   > sql-sqlite) ?

   I'd start with sql-sqlite: you should be able to get something working
   pretty quickly, and if it turns out to have features that get in the way
   you'll be familiar enough with it to drop down a level to comint.

Ok. I have tried to get something but failed:

 (defun sqlite-connect (db)
   (let ((sql-database db))
     (sql-connect-sqlite)))

 (sqlite-connect "/tmp/foo.db")
 (with-current-buffer (process-buffer (get-process "SQL")))
   (sql-send-string "select * from foo;"))

=>

No SQL process started.

M-x list-process:

Proc      Status   Buffer        Tty        Command
----      ------   ------        ---        -------
SQL       run      *SQL*         /dev/pts/2 sqlite /tmp/foot.db

What is the problem ?

Thank you

        Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]