emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* using orgtbl-sqlinsert
@ 2013-05-26  6:56 Eric Abrahamsen
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2013-05-26  6:56 UTC (permalink / raw)
  To: emacs-orgmode

I've got a table I'm trying to insert into a sqlite database. I've been
looking at orgtbl-sqlinsert and this page[fn:1], but I suspect all that
is out of date. I haven't seen anyone talking about #+ORGTBL: keywords,
or things like "#+BEGIN RECEIVE ORGTBL exsql" in the past year or so.

Do those still work? I can't for the life of me get it to do anything.
I've got a sqlite database called "market.sqlite" in the same directory
as a file containing this:

#+TBLNAME: terms
#+ORGTBL: SEND market.sqlite orgtbl-to-sqlinsert :sqlname "terms"
| Chinese          | English                            |
|------------------+------------------------------------|
| 音像制品出版     | A/V Publishing                     |
| 定价总金额       | Aggregate Retail Price             |
(etc)

I've tried C-c C-c on that header, calling
`org-babel-execute-src-block', waving my fingers at it, and cursing
loudly, one of which usually works. But I get no error, no insertion
into the database, and no results block with INSERT statements (I tried
making a #+BEGIN RECEIVE ORGTBL marketdb.sqlite block as noted on worg).

Does this still work? Or is it still possible to jimmy orgtbl-sqlinsert
to either insert directly, or create a block of INSERT statements?

Thanks!

Footnotes:

[fn:1] http://orgmode.org/worg/org-tutorials/multitarget-tables.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* using orgtbl-sqlinsert
@ 2013-05-26  6:56 Eric Abrahamsen
  2013-06-02  5:25 ` Eric Abrahamsen
  2013-09-24 22:00 ` Carsten Dominik
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2013-05-26  6:56 UTC (permalink / raw)
  To: emacs-orgmode

I've got a table I'm trying to insert into a sqlite database. I've been
looking at orgtbl-sqlinsert and this page[fn:1], but I suspect all that
is out of date. I haven't seen anyone talking about #+ORGTBL: keywords,
or things like "#+BEGIN RECEIVE ORGTBL exsql" in the past year or so.

Do those still work? I can't for the life of me get it to do anything.
I've got a sqlite database called "market.sqlite" in the same directory
as a file containing this:

#+TBLNAME: terms
#+ORGTBL: SEND market.sqlite orgtbl-to-sqlinsert :sqlname "terms"
| Chinese          | English                            |
|------------------+------------------------------------|
| 音像制品出版     | A/V Publishing                     |
| 定价总金额       | Aggregate Retail Price             |
(etc)

I've tried C-c C-c on that header, calling
`org-babel-execute-src-block', waving my fingers at it, and cursing
loudly, one of which usually works. But I get no error, no insertion
into the database, and no results block with INSERT statements (I tried
making a #+BEGIN RECEIVE ORGTBL marketdb.sqlite block as noted on worg).

Does this still work? Or is it still possible to jimmy orgtbl-sqlinsert
to either insert directly, or create a block of INSERT statements?

Thanks!

Footnotes:

[fn:1] http://orgmode.org/worg/org-tutorials/multitarget-tables.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using orgtbl-sqlinsert
  2013-05-26  6:56 Eric Abrahamsen
@ 2013-06-02  5:25 ` Eric Abrahamsen
  2013-09-24 22:00 ` Carsten Dominik
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2013-06-02  5:25 UTC (permalink / raw)
  To: emacs-orgmode

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

A very quiet "bump", to see if anyone knows how to handle this...

> I've got a table I'm trying to insert into a sqlite database. I've been
> looking at orgtbl-sqlinsert and this page[fn:1], but I suspect all that
> is out of date. I haven't seen anyone talking about #+ORGTBL: keywords,
> or things like "#+BEGIN RECEIVE ORGTBL exsql" in the past year or so.
>
> Do those still work? I can't for the life of me get it to do anything.
> I've got a sqlite database called "market.sqlite" in the same directory
> as a file containing this:
>
> #+TBLNAME: terms
> #+ORGTBL: SEND market.sqlite orgtbl-to-sqlinsert :sqlname "terms"
> | Chinese          | English                            |
> |------------------+------------------------------------|
> | 音像制品出版     | A/V Publishing                     |
> | 定价总金额       | Aggregate Retail Price             |
> (etc)
>
> I've tried C-c C-c on that header, calling
> `org-babel-execute-src-block', waving my fingers at it, and cursing
> loudly, one of which usually works. But I get no error, no insertion
> into the database, and no results block with INSERT statements (I tried
> making a #+BEGIN RECEIVE ORGTBL marketdb.sqlite block as noted on worg).
>
> Does this still work? Or is it still possible to jimmy orgtbl-sqlinsert
> to either insert directly, or create a block of INSERT statements?
>
> Thanks!
>
> Footnotes:
>
> [fn:1] http://orgmode.org/worg/org-tutorials/multitarget-tables.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using orgtbl-sqlinsert
  2013-05-26  6:56 Eric Abrahamsen
  2013-06-02  5:25 ` Eric Abrahamsen
@ 2013-09-24 22:00 ` Carsten Dominik
  2013-09-25  0:31   ` Jason Riedy
  2013-09-25  2:29   ` Eric Abrahamsen
  1 sibling, 2 replies; 7+ messages in thread
From: Carsten Dominik @ 2013-09-24 22:00 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1786 bytes --]

Hi Eric,

do you have orgtbl-to-sqlite defined?  What does it look like?
Do you have the BEGIN RECEIVE and END RECEIVE lines in the buffer?
Are you working in a buffer that is not in Org-mode?  Do you have orgtbl-mode turned on?

Regards

- Carsten

On 26.5.2013, at 08:56, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:

> I've got a table I'm trying to insert into a sqlite database. I've been
> looking at orgtbl-sqlinsert and this page[fn:1], but I suspect all that
> is out of date. I haven't seen anyone talking about #+ORGTBL: keywords,
> or things like "#+BEGIN RECEIVE ORGTBL exsql" in the past year or so.
> 
> Do those still work? I can't for the life of me get it to do anything.
> I've got a sqlite database called "market.sqlite" in the same directory
> as a file containing this:
> 
> #+TBLNAME: terms
> #+ORGTBL: SEND market.sqlite orgtbl-to-sqlinsert :sqlname "terms"
> | Chinese          | English                            |
> |------------------+------------------------------------|
> | 音像制品出版     | A/V Publishing                     |
> | 定价总金额       | Aggregate Retail Price             |
> (etc)
> 
> I've tried C-c C-c on that header, calling
> `org-babel-execute-src-block', waving my fingers at it, and cursing
> loudly, one of which usually works. But I get no error, no insertion
> into the database, and no results block with INSERT statements (I tried
> making a #+BEGIN RECEIVE ORGTBL marketdb.sqlite block as noted on worg).
> 
> Does this still work? Or is it still possible to jimmy orgtbl-sqlinsert
> to either insert directly, or create a block of INSERT statements?
> 
> Thanks!
> 
> Footnotes:
> 
> [fn:1] http://orgmode.org/worg/org-tutorials/multitarget-tables.html
> 
> 


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using orgtbl-sqlinsert
  2013-09-24 22:00 ` Carsten Dominik
@ 2013-09-25  0:31   ` Jason Riedy
  2013-09-25  4:13     ` Carsten Dominik
  2013-09-25  2:29   ` Eric Abrahamsen
  1 sibling, 1 reply; 7+ messages in thread
From: Jason Riedy @ 2013-09-25  0:31 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Eric Abrahamsen, emacs-orgmode

And Eric Abrahamsen writes:
> I've got a table I'm trying to insert into a sqlite
> database. I've been looking at orgtbl-sqlinsert and this
> page[fn:1], but I suspect all that is out of date.

FYI, I have changed employers and thus no longer have up-to-date
paperwork at the FSF for assignment.  That is only one reason I
haven't updated anything relevant to the orgtbl-sqlinsert
procrasti-working hack...

A more important reason is that I suspect a method using
org-babel would be much better.

I was looking for a semi-one-off method to convert a table
definition into something within my workflow at the time.  Org
mode was somewhat new and seemed useful (now proven that it is
very useful).  I was focused on *my* workflow, but the mindset
behind org-babel is more general.  I apologize, but I have not
had the time to look into adapting the mechanism or pursuing the
generalization.
-- 
Jason

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using orgtbl-sqlinsert
  2013-09-24 22:00 ` Carsten Dominik
  2013-09-25  0:31   ` Jason Riedy
@ 2013-09-25  2:29   ` Eric Abrahamsen
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2013-09-25  2:29 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi Eric,
>
> do you have orgtbl-to-sqlite defined?  What does it look like?
> Do you have the BEGIN RECEIVE and END RECEIVE lines in the buffer?
> Are you working in a buffer that is not in Org-mode?  Do you have orgtbl-mode turned on?

Hi Carsten,

I later replied to that thread (at least, I think it should have been
part of the same thread) with a patch to orgtbl-to-sqlite. Bastien
applied it, and to my knowledge all is well. As Jason mentioned, this
and I guess the other orgtbl-* functions seem sort of out of date at
this point (should they all be replaced with Babel?), but the problem I
brought up here, at least, is fixed.

Thanks!
Eric

> On 26.5.2013, at 08:56, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:
>
>> I've got a table I'm trying to insert into a sqlite database. I've been
>> looking at orgtbl-sqlinsert and this page[fn:1], but I suspect all that
>> is out of date. I haven't seen anyone talking about #+ORGTBL: keywords,
>> or things like "#+BEGIN RECEIVE ORGTBL exsql" in the past year or so.
>> 
>> Do those still work? I can't for the life of me get it to do anything.
>> I've got a sqlite database called "market.sqlite" in the same directory
>> as a file containing this:
>> 
>> #+TBLNAME: terms
>> #+ORGTBL: SEND market.sqlite orgtbl-to-sqlinsert :sqlname "terms"
>> | Chinese          | English                            |
>> |------------------+------------------------------------|
>> | 音像制品出版     | A/V Publishing                     |
>> | 定价总金额       | Aggregate Retail Price             |
>> (etc)
>> 
>> I've tried C-c C-c on that header, calling
>> `org-babel-execute-src-block', waving my fingers at it, and cursing
>> loudly, one of which usually works. But I get no error, no insertion
>> into the database, and no results block with INSERT statements (I tried
>> making a #+BEGIN RECEIVE ORGTBL marketdb.sqlite block as noted on worg).
>> 
>> Does this still work? Or is it still possible to jimmy orgtbl-sqlinsert
>> to either insert directly, or create a block of INSERT statements?
>> 
>> Thanks!
>> 
>> Footnotes:
>> 
>> [fn:1] http://orgmode.org/worg/org-tutorials/multitarget-tables.html
>> 
>> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using orgtbl-sqlinsert
  2013-09-25  0:31   ` Jason Riedy
@ 2013-09-25  4:13     ` Carsten Dominik
  0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2013-09-25  4:13 UTC (permalink / raw)
  To: Jason Riedy; +Cc: Eric Abrahamsen, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]


On 25.9.2013, at 02:31, Jason Riedy <jason@lovesgoodfood.com> wrote:

> And Eric Abrahamsen writes:
>> I've got a table I'm trying to insert into a sqlite
>> database. I've been looking at orgtbl-sqlinsert and this
>> page[fn:1], but I suspect all that is out of date.
> 
> FYI, I have changed employers and thus no longer have up-to-date
> paperwork at the FSF for assignment.  That is only one reason I
> haven't updated anything relevant to the orgtbl-sqlinsert
> procrasti-working hack...
> 
> A more important reason is that I suspect a method using
> org-babel would be much better.
> 
> I was looking for a semi-one-off method to convert a table
> definition into something within my workflow at the time.  Org
> mode was somewhat new and seemed useful (now proven that it is
> very useful).  I was focused on *my* workflow, but the mindset
> behind org-babel is more general.  I apologize, but I have not
> had the time to look into adapting the mechanism or pursuing the
> generalization.

I must have overlooked this, my apologies.

Thanks!

Bug queue one down :)

- Carsten

> -- 
> Jason


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-25  4:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-26  6:56 using orgtbl-sqlinsert Eric Abrahamsen
  -- strict thread matches above, loose matches on Subject: below --
2013-05-26  6:56 Eric Abrahamsen
2013-06-02  5:25 ` Eric Abrahamsen
2013-09-24 22:00 ` Carsten Dominik
2013-09-25  0:31   ` Jason Riedy
2013-09-25  4:13     ` Carsten Dominik
2013-09-25  2:29   ` Eric Abrahamsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).