emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* orgmode and a database
@ 2016-04-04 19:46 Uwe Brauer
  2016-04-04 20:19 ` Ken Mankoff
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Uwe Brauer @ 2016-04-04 19:46 UTC (permalink / raw)
  To: emacs-orgmode

Hello

I am looking for a sort of database I could use with orgmode. Anybody
has a suggestion? What's about recutils?

thanks

Uwe Brauer 

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

* Re: orgmode and a database
  2016-04-04 19:46 orgmode and a database Uwe Brauer
@ 2016-04-04 20:19 ` Ken Mankoff
  2016-04-05 10:31   ` Uwe Brauer
  2016-04-04 20:27 ` Charles Millar
  2016-04-05 10:43 ` Colin Baxter
  2 siblings, 1 reply; 24+ messages in thread
From: Ken Mankoff @ 2016-04-04 20:19 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode


On 2016-04-04 at 15:46, Uwe Brauer <oub@mat.ucm.es> wrote:
> I am looking for a sort of database I could use with orgmode. Anybody
> has a suggestion? What's about recutils?

Can you be more specific?

Org tables? They can be joined...

Org supports SQLite http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-sqlite.html
http://howardism.org/Technical/Emacs/literate-database.html

And many use Org PROPERTY drawers as a database (for example, the address book support/examples).

  -k.

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

* Re: orgmode and a database
  2016-04-04 19:46 orgmode and a database Uwe Brauer
  2016-04-04 20:19 ` Ken Mankoff
@ 2016-04-04 20:27 ` Charles Millar
  2016-04-05 10:32   ` Uwe Brauer
  2016-04-05 20:32   ` Charles Millar
  2016-04-05 10:43 ` Colin Baxter
  2 siblings, 2 replies; 24+ messages in thread
From: Charles Millar @ 2016-04-04 20:27 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

On 04/04/2016 03:46 PM, Uwe Brauer wrote:
> Hello
>
> I am looking for a sort of database I could use with orgmode. Anybody
> has a suggestion? What's about recutils?
>
>
>
I have been using recutils with orgmode for more than year - still 
learning of course. So far, my experience has been fine. I am still 
developing some sort of standard databases, e.g. one for contacts, 
another for finance type of records, etc.

Have you checked out the two recutils mailing lists? Not very active at 
the moment. I mentioned in those lists that perhaps some sort of capture 
much like org-capture might be useful, but have made no further effort 
in that regards.

I picked up a excellent pointers as to using recutils to create org-mode 
tables from Jose Marchesi's and Eric Shulte's ob-rec.el discussion on 
this list back in 2011. I ultimately export the tables and related text 
to LaTeXpdf docs.

A few months ago I added recutils or "rec" to the Babel:languages, Emacs 
Package section - still haven't provided an example though. (It may have 
been Eric who encouraged me to post my entry to Worg, but at the moment 
I cannot recall for sure.)

Charlie Millar

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

* Re: orgmode and a database
  2016-04-04 20:19 ` Ken Mankoff
@ 2016-04-05 10:31   ` Uwe Brauer
  2016-04-05 13:01     ` Russell Adams
  0 siblings, 1 reply; 24+ messages in thread
From: Uwe Brauer @ 2016-04-05 10:31 UTC (permalink / raw)
  To: emacs-orgmode

>>> "Ken" == Ken Mankoff <mankoff@gmail.com> writes:

    > On 2016-04-04 at 15:46, Uwe Brauer <oub@mat.ucm.es> wrote:
    >> I am looking for a sort of database I could use with orgmode. Anybody
    >> has a suggestion? What's about recutils?

    > Can you be more specific?

Well my first shot would be something like a mediawiki software which is
connected say to a mysql server. I can search wiki, but then most likely
I could move files in a directory and run grep.


So what about some functionally openoffice or filemaker (a commercial
software which runs on Mac or on Windows) provide. You write data in a
table and then can run searches which produce new (smaller tables).


    > Org tables? They can be joined...

Now I don't understand what you mean be joined, linked?

    > Org supports SQLite
    > http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-sqlite.html
    > http://howardism.org/Technical/Emacs/literate-database.html

Yeah that looks a bit to hackerish to me.

    > And many use Org PROPERTY drawers as a database (for example, the
    > address book support/examples).

That is maybe more what I need, could that be used in tables?

Uwe 

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

* Re: orgmode and a database
  2016-04-04 20:27 ` Charles Millar
@ 2016-04-05 10:32   ` Uwe Brauer
  2016-04-05 13:12     ` Jose E. Marchesi
  2016-04-05 20:01     ` Charles Millar
  2016-04-05 20:32   ` Charles Millar
  1 sibling, 2 replies; 24+ messages in thread
From: Uwe Brauer @ 2016-04-05 10:32 UTC (permalink / raw)
  To: emacs-orgmode


   > Hi,
   > On 04/04/2016 03:46 PM, Uwe Brauer wrote:

   > I have been using recutils with orgmode for more than year - still
   > learning of course. So far, my experience has been fine. I am still
   > developing some sort of standard databases, e.g. one for contacts,
   > another for finance type of records, etc.

Do you have some example or a pointer or so. I don't know even how to
start. 

   > Have you checked out the two recutils mailing lists? Not very
   > active at the moment. I mentioned in those lists that perhaps some
   > sort of capture much like org-capture might be useful, but have
   > made no further effort in that regards.

   > I picked up a excellent pointers as to using recutils to create
   > org-mode tables from Jose Marchesi's and Eric Shulte's ob-rec.el
   > discussion on this list back in 2011. I ultimately export the tables
   > and related text to LaTeXpdf docs.

Could you provide me a link, please?

Uwe Brauer 

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

* Re: orgmode and a database
  2016-04-04 19:46 orgmode and a database Uwe Brauer
  2016-04-04 20:19 ` Ken Mankoff
  2016-04-04 20:27 ` Charles Millar
@ 2016-04-05 10:43 ` Colin Baxter
  2016-04-05 11:41   ` Charles Millar
  2016-04-05 13:02   ` Jose E. Marchesi
  2 siblings, 2 replies; 24+ messages in thread
From: Colin Baxter @ 2016-04-05 10:43 UTC (permalink / raw)
  To: emacs-orgmode

> Hello
>
> I am looking for a sort of database I could use with orgmode. Anybody
> has a suggestion? What's about recutils?
>
> thanks
>
> Uwe Brauer 

I've just installed recutils from source. If you do the same then be
aware that as well as the usual linux packages, you will also need
"check", "uuid-dev" and "bash-builtins" for a successful build. Perhaps
its obvious that they would be required, but its certainly not
documented - at least as far as I could discover. Sorry that this was
perhaps off-topic, but it might be useful for others.

Colin.

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

* Re: orgmode and a database
  2016-04-05 10:43 ` Colin Baxter
@ 2016-04-05 11:41   ` Charles Millar
  2016-04-05 13:04     ` Colin Baxter
  2016-04-05 13:02   ` Jose E. Marchesi
  1 sibling, 1 reply; 24+ messages in thread
From: Charles Millar @ 2016-04-05 11:41 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

On 04/05/2016 06:43 AM, Colin Baxter wrote:
>> Hello
>>
>> I am looking for a sort of database I could use with orgmode. Anybody
>> has a suggestion? What's about recutils?
>>
>> thanks
>>
>> Uwe Brauer
> I've just installed recutils from source. If you do the same then be
> aware that as well as the usual linux packages, you will also need
> "check", "uuid-dev" and "bash-builtins" for a successful build. Perhaps
> its obvious that they would be required, but its certainly not
> documented - at least as far as I could discover. Sorry that this was
> perhaps off-topic, but it might be useful for others.
>
> Colin.
What flavor or OS are you using? I had a Debian Jessie desktop (recently 
relegated to the junk heap; it was a reclaimed from a 2000 - 2001 
machine which originally came with WindowsXT) and a LMDE2 laptop (still 
in use and which I believe is based on Jessie) both of which came with 
recutils-1.6, so last year  installed 1.7 from source on both. As I 
recall I had no problems. Perhaps I loaded the packages you mentioned at 
earlier time.

Charlie Millar

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

* Re: orgmode and a database
  2016-04-05 10:31   ` Uwe Brauer
@ 2016-04-05 13:01     ` Russell Adams
  0 siblings, 0 replies; 24+ messages in thread
From: Russell Adams @ 2016-04-05 13:01 UTC (permalink / raw)
  To: emacs-orgmode

> So what about some functionally openoffice or filemaker (a commercial
> software which runs on Mac or on Windows) provide. You write data in a
> table and then can run searches which produce new (smaller tables).

I've been wishing for a dbase III clone or something fast, Postgres
backed, that I could use in a terminal only for CRUD. I'm sick of
webapps for everything.

I may have to check out recutils.

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

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

* Re: orgmode and a database
  2016-04-05 10:43 ` Colin Baxter
  2016-04-05 11:41   ` Charles Millar
@ 2016-04-05 13:02   ` Jose E. Marchesi
  2016-04-05 13:49     ` Colin Baxter
  2016-04-05 13:49     ` Colin Baxter
  1 sibling, 2 replies; 24+ messages in thread
From: Jose E. Marchesi @ 2016-04-05 13:02 UTC (permalink / raw)
  To: Colin Baxter; +Cc: emacs-orgmode


    > I am looking for a sort of database I could use with orgmode. Anybody
    > has a suggestion? What's about recutils?
    >
    > thanks
    >
    > Uwe Brauer 
    
    I've just installed recutils from source. If you do the same then be
    aware that as well as the usual linux packages, you will also need
    "check", "uuid-dev" and "bash-builtins" for a successful build. Perhaps
    its obvious that they would be required, but its certainly not
    documented - at least as far as I could discover. Sorry that this was
    perhaps off-topic, but it might be useful for others.
    
These dependencies are documented in the README-dev file at the top
directory of the recutils source distribution.  Excerpt:

Dependencies
------------
There are some third party dependencies needed to build some of the
utilities shipped in this distribution.  The configure script checks
for the needed packages and drives the conditional compilation of the
impacted utitilities.  The dependencies are:
- The testing infrastructure uses the Check library.  At the moment
  the svn version of the library if needed.  The configure script will
  check if you have the right version.  libcheck can be obtained at
  http://sourceforge.net/projects/check/.

The following dependencies are optional.  Missing them will result in
a less capable software:
- The GNU Privacy Guard (gnupg) is required in order to support
  encryption.  The following libraries are required: libgpg-error and
  libgcrypt.  Any recent version of those libraries will work.  gnupg
  can be obtained at http://gnupg.org.
- libcurl is required for supporting remote descriptors.  Any
  recent version must work.  The library can be obtained at
  http://curl.haxx.se/libcurl/.
- The mdbtools are required for building the mdb2rec utility.
  mdbtools can be obtained at http://mdbtools.sourceforge.net.
- The UUID library from Theodore Ts'o is required for the uuid type.
  In Debian-like systems that library is packaged under the name
  uuid-dev and the runtime under the name libuuid1.
- The algol68toc compiler is required for building the Algol68
  bindings.

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

* Re: orgmode and a database
  2016-04-05 11:41   ` Charles Millar
@ 2016-04-05 13:04     ` Colin Baxter
  2016-04-05 14:02       ` Charles Millar
  2016-04-05 14:03       ` Eric S Fraga
  0 siblings, 2 replies; 24+ messages in thread
From: Colin Baxter @ 2016-04-05 13:04 UTC (permalink / raw)
  To: emacs-orgmode

> Hi,
>
> On 04/05/2016 06:43 AM, Colin Baxter wrote:
>>> Hello
>>>
>>> I am looking for a sort of database I could use with orgmode. Anybody
>>> has a suggestion? What's about recutils?
>>>
>>> thanks
>>>
>>> Uwe Brauer
>> I've just installed recutils from source. If you do the same then be
>> aware that as well as the usual linux packages, you will also need
>> "check", "uuid-dev" and "bash-builtins" for a successful build. Perhaps
>> its obvious that they would be required, but its certainly not
>> documented - at least as far as I could discover. Sorry that this was
>> perhaps off-topic, but it might be useful for others.
>>
>> Colin.
> What flavor or OS are you using? I had a Debian Jessie desktop
> (recently relegated to the junk heap; it was a reclaimed from a 2000 -
> 2001 machine which originally came with WindowsXT) and a LMDE2 laptop
> (still in use and which I believe is based on Jessie) both of which
> came with recutils-1.6, so last year  installed 1.7 from source on
> both. As I recall I had no problems. Perhaps I loaded the packages you
> mentioned at earlier time.
>
>

Hi Charlie,

recutils-1.7 on Debian 3.2.78-1 i686 GNU/Linux. It installed ok, but
gave warnings on "make test". These disappeared on installing the
packages I mentioned.

Cheers, Colin.

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

* Re: orgmode and a database
  2016-04-05 10:32   ` Uwe Brauer
@ 2016-04-05 13:12     ` Jose E. Marchesi
  2016-04-05 16:37       ` Uwe Brauer
  2016-04-05 20:01     ` Charles Millar
  1 sibling, 1 reply; 24+ messages in thread
From: Jose E. Marchesi @ 2016-04-05 13:12 UTC (permalink / raw)
  To: emacs-orgmode

    
       > I have been using recutils with orgmode for more than year - still
       > learning of course. So far, my experience has been fine. I am still
       > developing some sort of standard databases, e.g. one for contacts,
       > another for finance type of records, etc.
    
    Do you have some example or a pointer or so. I don't know even how to
    start.

AFAIK you can read data from a recfile and generate org-mode tables
dynamically in at least two ways:

1) Using ob-rec.el (part of recutils)

   #+begin_src rec :data mydata.rec :type milestone :fields ProjectID,Name
     Year == 2014
   #+end_src


2) Using babel and sh blocks (I found this example in [1])
   ):

   #+begin_src sh :exports results :results output replace :results value table
     recsel -t milestone -e "Year == 2014"  -p 'ProjectID,Name' milestones.rec | rec2csv
   #+end_src

In both cases evaluating these blocks with C-cC-c must give you a nice
table that then you can export to a report.

The recutils manual is available at the recutils webpage [2].

[1] https://www.reddit.com/r/emacs/comments/1u52eu/can_people_share_their_orgmode_workflows/
[2] http://www.gnu.org/software/recutils

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

* Re: orgmode and a database
  2016-04-05 13:02   ` Jose E. Marchesi
@ 2016-04-05 13:49     ` Colin Baxter
  2016-04-05 13:49     ` Colin Baxter
  1 sibling, 0 replies; 24+ messages in thread
From: Colin Baxter @ 2016-04-05 13:49 UTC (permalink / raw)
  To: emacs-orgmode

>     > I am looking for a sort of database I could use with orgmode. Anybody
>     > has a suggestion? What's about recutils?
>     >
>     > thanks
>     >
>     > Uwe Brauer 
>     
>     I've just installed recutils from source. If you do the same then be
>     aware that as well as the usual linux packages, you will also need
>     "check", "uuid-dev" and "bash-builtins" for a successful build. Perhaps
>     its obvious that they would be required, but its certainly not
>     documented - at least as far as I could discover. Sorry that this was
>     perhaps off-topic, but it might be useful for others.
>     
> These dependencies are documented in the README-dev file at the top
> directory of the recutils source distribution.  Excerpt:
>
> Dependencies
> ------------
> There are some third party dependencies needed to build some of the
> utilities shipped in this distribution.  The configure script checks
> for the needed packages and drives the conditional compilation of the
> impacted utitilities.  The dependencies are:
> - The testing infrastructure uses the Check library.  At the moment
>   the svn version of the library if needed.  The configure script will
>   check if you have the right version.  libcheck can be obtained at
>   http://sourceforge.net/projects/check/.
>
> The following dependencies are optional.  Missing them will result in
> a less capable software:
> - The GNU Privacy Guard (gnupg) is required in order to support
>   encryption.  The following libraries are required: libgpg-error and
>   libgcrypt.  Any recent version of those libraries will work.  gnupg
>   can be obtained at http://gnupg.org.
> - libcurl is required for supporting remote descriptors.  Any
>   recent version must work.  The library can be obtained at
>   http://curl.haxx.se/libcurl/.
> - The mdbtools are required for building the mdb2rec utility.
>   mdbtools can be obtained at http://mdbtools.sourceforge.net.
> - The UUID library from Theodore Ts'o is required for the uuid type.
>   In Debian-like systems that library is packaged under the name
>   uuid-dev and the runtime under the name libuuid1.
> - The algol68toc compiler is required for building the Algol68
>   bindings.

I'm afraid my recutils from http://ftp.gnu.org/gnu/recutils/recutils-1.7.tar.gz had no REDADME.dev. It did have a README, which mentions README.dev but no README.dev.

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

* Re: orgmode and a database
  2016-04-05 13:02   ` Jose E. Marchesi
  2016-04-05 13:49     ` Colin Baxter
@ 2016-04-05 13:49     ` Colin Baxter
  2016-04-05 14:04       ` Jose E. Marchesi
  1 sibling, 1 reply; 24+ messages in thread
From: Colin Baxter @ 2016-04-05 13:49 UTC (permalink / raw)
  To: jemarch@gnu.org; +Cc: emacs-orgmode@gnu.org

I'm afraid my recutils from http://ftp.gnu.org/gnu/recutils/recutils-1.7.tar.gz had no REDADME.dev. It did have a README, which mentions README.dev but no README.dev. 

Best wishes,

Colin.

05.04.2016, 13:54, "Jose E. Marchesi" <jemarch@gnu.org>:
>     > I am looking for a sort of database I could use with orgmode. Anybody
>     > has a suggestion? What's about recutils?
>     >
>     > thanks
>     >
>     > Uwe Brauer
>
>     I've just installed recutils from source. If you do the same then be
>     aware that as well as the usual linux packages, you will also need
>     "check", "uuid-dev" and "bash-builtins" for a successful build. Perhaps
>     its obvious that they would be required, but its certainly not
>     documented - at least as far as I could discover. Sorry that this was
>     perhaps off-topic, but it might be useful for others.
>
> These dependencies are documented in the README-dev file at the top
> directory of the recutils source distribution. Excerpt:
>
> Dependencies
> ------------
> There are some third party dependencies needed to build some of the
> utilities shipped in this distribution. The configure script checks
> for the needed packages and drives the conditional compilation of the
> impacted utitilities. The dependencies are:
> - The testing infrastructure uses the Check library. At the moment
>   the svn version of the library if needed. The configure script will
>   check if you have the right version. libcheck can be obtained at
>   http://sourceforge.net/projects/check/.
>
> The following dependencies are optional. Missing them will result in
> a less capable software:
> - The GNU Privacy Guard (gnupg) is required in order to support
>   encryption. The following libraries are required: libgpg-error and
>   libgcrypt. Any recent version of those libraries will work. gnupg
>   can be obtained at http://gnupg.org.
> - libcurl is required for supporting remote descriptors. Any
>   recent version must work. The library can be obtained at
>   http://curl.haxx.se/libcurl/.
> - The mdbtools are required for building the mdb2rec utility.
>   mdbtools can be obtained at http://mdbtools.sourceforge.net.
> - The UUID library from Theodore Ts'o is required for the uuid type.
>   In Debian-like systems that library is packaged under the name
>   uuid-dev and the runtime under the name libuuid1.
> - The algol68toc compiler is required for building the Algol68
>   bindings.

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

* Re: orgmode and a database
  2016-04-05 13:04     ` Colin Baxter
@ 2016-04-05 14:02       ` Charles Millar
  2016-04-05 14:03       ` Eric S Fraga
  1 sibling, 0 replies; 24+ messages in thread
From: Charles Millar @ 2016-04-05 14:02 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

On 04/05/2016 09:04 AM, Colin Baxter wrote:
>> Hi,
>>
>> On 04/05/2016 06:43 AM, Colin Baxter wrote:
>>>> Hello
>>>>
>>>> I am looking for a sort of database I could use with orgmode. Anybody
>>>> has a suggestion? What's about recutils?
>>>>
>>>> thanks
>>>>
>>>> Uwe Brauer
>>> I've just installed recutils from source. If you do the same then be
>>> aware that as well as the usual linux packages, you will also need
>>> "check", "uuid-dev" and "bash-builtins" for a successful build. Perhaps
>>> its obvious that they would be required, but its certainly not
>>> documented - at least as far as I could discover. Sorry that this was
>>> perhaps off-topic, but it might be useful for others.
>>>
>>> Colin.
>> What flavor or OS are you using? I had a Debian Jessie desktop
>> (recently relegated to the junk heap; it was a reclaimed from a 2000 -
>> 2001 machine which originally came with WindowsXT) and a LMDE2 laptop
>> (still in use and which I believe is based on Jessie) both of which
>> came with recutils-1.6, so last year  installed 1.7 from source on
>> both. As I recall I had no problems. Perhaps I loaded the packages you
>> mentioned at earlier time.
>>
>>
> Hi Charlie,
>
> recutils-1.7 on Debian 3.2.78-1 i686 GNU/Linux. It installed ok, but
> gave warnings on "make test". These disappeared on installing the
> packages I mentioned.
>
> Cheers, Colin.
>
I forgot!! Very conveniently, i might add. Last fall I discovered that 
although recutils-1.7 was apparently installed correctly, it was not. I 
could not use the readrec bash built-in. So I had to reinstall making 
sure that I downloaded all the other required packages that listed in 
the README-dev which Jose mentions in his recent message to this thread.

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

* Re: orgmode and a database
  2016-04-05 13:04     ` Colin Baxter
  2016-04-05 14:02       ` Charles Millar
@ 2016-04-05 14:03       ` Eric S Fraga
  2016-04-05 14:40         ` Jose E. Marchesi
  1 sibling, 1 reply; 24+ messages in thread
From: Eric S Fraga @ 2016-04-05 14:03 UTC (permalink / raw)
  To: Colin Baxter; +Cc: emacs-orgmode

On Tuesday,  5 Apr 2016 at 14:04, Colin Baxter wrote:

[...]

> Hi Charlie,
>
> recutils-1.7 on Debian 3.2.78-1 i686 GNU/Linux. It installed ok, but
> gave warnings on "make test". These disappeared on installing the
> packages I mentioned.

Colin et al.,

All this talk of recutils motivated me to try it again as I do have a
task that would benefit from this, currently managed using org
properties but unwieldy as a result.

However, I cannot get it working in emacs.  There is a (setq) line in
rec-mode that is ill-formed and I cannot navigate through a database.  I
am using

ii  recutils       1.7-1+b1     amd64        text-based databases called recfiles

on Debian testing.

How do others actually create and manage the rec databases in Emacs?

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83

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

* Re: orgmode and a database
  2016-04-05 13:49     ` Colin Baxter
@ 2016-04-05 14:04       ` Jose E. Marchesi
  0 siblings, 0 replies; 24+ messages in thread
From: Jose E. Marchesi @ 2016-04-05 14:04 UTC (permalink / raw)
  To: Colin Baxter; +Cc: emacs-orgmode@gnu.org


    I'm afraid my recutils from
    http://ftp.gnu.org/gnu/recutils/recutils-1.7.tar.gz had no
    REDADME.dev. It did have a README, which mentions README.dev but no
    README.dev.

Aha, looks like README.dev is not included in the distribution tarball.
Time to fix that :)

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

* Re: orgmode and a database
  2016-04-05 14:03       ` Eric S Fraga
@ 2016-04-05 14:40         ` Jose E. Marchesi
  2016-04-05 16:18           ` Eric S Fraga
  0 siblings, 1 reply; 24+ messages in thread
From: Jose E. Marchesi @ 2016-04-05 14:40 UTC (permalink / raw)
  To: Colin Baxter; +Cc: emacs-orgmode


    > Hi Charlie,
    >
    > recutils-1.7 on Debian 3.2.78-1 i686 GNU/Linux. It installed ok, but
    > gave warnings on "make test". These disappeared on installing the
    > packages I mentioned.
    
    Colin et al.,
    
    All this talk of recutils motivated me to try it again as I do have a
    task that would benefit from this, currently managed using org
    properties but unwieldy as a result.
    
    However, I cannot get it working in emacs.  There is a (setq) line in
    rec-mode that is ill-formed and I cannot navigate through a database.  I
    am using

You could try to use rec-mode.el from the git version of recutils, as it
contains several fixes since the 1.7 release:

http://git.savannah.gnu.org/cgit/recutils.git/tree/etc/rec-mode.el

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

* Re: orgmode and a database
  2016-04-05 14:40         ` Jose E. Marchesi
@ 2016-04-05 16:18           ` Eric S Fraga
  0 siblings, 0 replies; 24+ messages in thread
From: Eric S Fraga @ 2016-04-05 16:18 UTC (permalink / raw)
  To: Jose E. Marchesi; +Cc: Colin Baxter, emacs-orgmode

On Tuesday,  5 Apr 2016 at 16:40, Jose E. Marchesi wrote:

[...]

> You could try to use rec-mode.el from the git version of recutils, as it
> contains several fixes since the 1.7 release:
>
> http://git.savannah.gnu.org/cgit/recutils.git/tree/etc/rec-mode.el

Thanks.  I'll give that a shot.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83

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

* Re: orgmode and a database
  2016-04-05 13:12     ` Jose E. Marchesi
@ 2016-04-05 16:37       ` Uwe Brauer
  2016-04-05 17:03         ` Jose E. Marchesi
  0 siblings, 1 reply; 24+ messages in thread
From: Uwe Brauer @ 2016-04-05 16:37 UTC (permalink / raw)
  To: emacs-orgmode

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

>>> "Jose" == Jose E Marchesi <jemarch@gnu.org> writes:

   >> I have been using recutils with orgmode for more than year - still
   >> learning of course. So far, my experience has been fine. I am still
   >> developing some sort of standard databases, e.g. one for contacts,
   >> another for finance type of records, etc.
    
   >     Do you have some example or a pointer or so. I don't know even how to
   >     start.

   > AFAIK you can read data from a recfile and generate org-mode tables
   > dynamically in at least two ways:

   > 1) Using ob-rec.el (part of recutils)

   >    #+begin_src rec :data mydata.rec :type milestone :fields ProjectID,Name
   >      Year == 2014
   >    #+end_src

Thanks. Could you please send me the mydate file otherwise that will not
work (and I don't know enough recfiles syntax to cook up my own.

   > 2) Using babel and sh blocks (I found this example in [1])
   >    ):

   >    #+begin_src sh :exports results :results output replace :results value table
   >      recsel -t milestone -e "Year == 2014"  -p 'ProjectID,Name' milestones.rec | rec2csv
   >    #+end_src


That is odd, since I obtain an error which I attach: of  course I have
sh installed on my system

Which sh

/bin/sh





   > The recutils manual is available at the recutils webpage [2].

thanks

Uwe 

   > [1] https://www.reddit.com/r/emacs/comments/1u52eu/can_people_share_their_orgmode_workflows/
   > [2] http://www.gnu.org/software/recutils



[-- Attachment #2: rec-bug1.txt --]
[-- Type: text/plain, Size: 550 bytes --]

Debugger entered--Lisp error: (error "No org-babel-execute function for sh!")
  signal(error ("No org-babel-execute function for sh!"))
  error("No org-babel-execute function for %s!" "sh")
  org-babel-execute-src-block(nil)
  org-babel-execute-src-block-maybe()
  org-babel-execute-maybe()
  org-babel-execute-safely-maybe()
  run-hook-with-args-until-success(org-babel-execute-safely-maybe)
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)

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

* Re: orgmode and a database
  2016-04-05 16:37       ` Uwe Brauer
@ 2016-04-05 17:03         ` Jose E. Marchesi
  2016-04-05 17:36           ` Uwe Brauer
  2016-04-05 21:27           ` Uwe Brauer
  0 siblings, 2 replies; 24+ messages in thread
From: Jose E. Marchesi @ 2016-04-05 17:03 UTC (permalink / raw)
  To: emacs-orgmode

    
       > 1) Using ob-rec.el (part of recutils)
    
       >    #+begin_src rec :data mydata.rec :type milestone :fields ProjectID,Name
       >      Year == 2014
       >    #+end_src
    
    Thanks. Could you please send me the mydate file otherwise that will not
    work (and I don't know enough recfiles syntax to cook up my own.

Sure.  This could be an example of a recfile:

-- mydata.rec --
%rec: milestone

ProjectID: 1
Name: GNU Recutils
Year: 2012

ProjectID: 2
Name: Another
Year: 2014

ProjectID: 3
Name: GNU Emacs
Year: 1985

ProjectID: 4
Name: Foo
Year: 2014
-- end of mydata.rec --

Evaluating this block from an org file (note the 's around 2014 that I
forgot to use in the example above):

#+begin_src rec :data mydata.rec :type milestone :fields ProjectID,Name
 Year == '2014'
#+end_src

It produces:

#+RESULTS:
| ProjectID | Name    |
|-----------+---------|
|         2 | Another |
|         4 | Foo     |

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

* Re: orgmode and a database
  2016-04-05 17:03         ` Jose E. Marchesi
@ 2016-04-05 17:36           ` Uwe Brauer
  2016-04-05 21:27           ` Uwe Brauer
  1 sibling, 0 replies; 24+ messages in thread
From: Uwe Brauer @ 2016-04-05 17:36 UTC (permalink / raw)
  To: emacs-orgmode


    
    
   >     Thanks. Could you please send me the mydate file otherwise that
   >     will not work (and I don't know enough recfiles syntax to cook
   >     up my own.

   > Sure.  This could be an example of a recfile:

Thanks that worked nicely!

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

* Re: orgmode and a database
  2016-04-05 10:32   ` Uwe Brauer
  2016-04-05 13:12     ` Jose E. Marchesi
@ 2016-04-05 20:01     ` Charles Millar
  1 sibling, 0 replies; 24+ messages in thread
From: Charles Millar @ 2016-04-05 20:01 UTC (permalink / raw)
  To: emacs-orgmode

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

Uwe,

On 04/05/2016 06:32 AM, Uwe Brauer wrote:
>     > Hi,
>     > On 04/04/2016 03:46 PM, Uwe Brauer wrote:
>
>     > I have been using recutils with orgmode for more than year - still
>     > learning of course. So far, my experience has been fine. I am still
>     > developing some sort of standard databases, e.g. one for contacts,
>     > another for finance type of records, etc.
>
> Do you have some example or a pointer or so. I don't know even how to
> start.
>
>     
A caveat - I am slowly learning lisp - of any kind - and I have not 
programmed in over 45 years (college).

See the attached files - one is a template for entering data into a 
recfile and the other is a sample of how I use some of the data in that 
recfile. I also have a couple of remote-descriptors so that I don't have 
reinvent the wheel for every recfile.

Originally I set up an org capture template and switched modes for 
entries into a refile, but this was not a "good" solution. In the 
recutils list I mentioned org capture and perhaps it could be modified 
to recutils, but I never sent Jose a use case.

> > Have you checked out the two recutils mailing lists? Not very
>     > active at the moment. I mentioned in those lists that perhaps some
>     > sort of capture much like org-capture might be useful, but have
>     > made no further effort in that regards.
>
>     > I picked up a excellent pointers as to using recutils to create
>     > org-mode tables from Jose Marchesi's and Eric Shulte's ob-rec.el
>     > discussion on this list back in 2011. I ultimately export the tables
>     > and related text to LaTeXpdf docs.
>
> Could you provide me a link, please?

Here's the thread on Gmane

http://article.gmane.org/gmane.emacs.orgmode/37697/match=ob+rec+el
> Uwe Brauer
Charlie Millar

[-- Attachment #2: cm-estate-recfile-entries.el --]
[-- Type: text/x-emacs-lisp, Size: 1796 bytes --]


(defun cm-estate-rec-entries (Description File &optional Memo AccountDate AccountAmount Shares AccountSchedule1 AccountSchedule2 EstateTaxSchedule FiduciaryTaxSchedule ProceedsDate ProceedsAmount AccountSchedule3 AccountSchedule4 Beneficiary OtherAccount1 &optional CheckDate CheckNumber CheckAmount)
  (goto-char (point-max))
  (newline)
  (interactive "sDescription:  \nsFile: \nsMemo: \nsAccountDate: \nsAccountAmount: \nsShares: \nsAccountSchedule: \nsAccountSchedule:  \nsEstateTaxSchedule: \nsFiduciaryTaxSchedule: \nsProceedsDate: \nsProceedsAmount: \nsAccountSchedule: \nsAccountSchedule: \nsBeneficiary: \nsOtherAccount: \nsCheckDate:  \nsCheckNumber: \nsCheckAmount: ")
  (insert "Description: " Description) (newline)
  (insert "File: " File) (newline)
  (insert "Memo: " Memo) (newline)
  (insert "AccountDate: " AccountDate) (newline)
  (insert "AccountAmount: " AccountAmount) (newline)
  (insert "Shares: " Shares) (newline)
  (insert "AccountSchedule: " AccountSchedule1) (newline)
  (insert "AccountSchedule: " AccountSchedule2) (newline)
  (insert "EstateTaxSchedule: " EstateTaxSchedule) (newline)
  (insert "FiduciaryTaxSchedule: " FiduciaryTaxSchedule) (newline)
  (insert "ProceedsDate: " ProceedsDate) (newline)
  (insert "Proceeds: " ProceedsAmount) (newline)
  (insert "AccountSchedule: " AccountSchedule3) (newline)
  (insert "AccountSchedule: " AccountSchedule4) (newline)
  (insert "Beneficiary: " Beneficiary) (newline)
  (insert "OtherAccount: " OtherAccount1)
  (if (y-or-n-p "Are those checkbook entries necessary?")
      (progn
	(newline)
	(insert "OtherAccount: Checkbook") (newline)
	(insert "CheckDate: " CheckDate) (newline)
	(insert "CheckNumber: " CheckNumber) (newline)
	(insert "CheckAmount: " CheckAmount) (newline))
    (progn
      (newline))))






[-- Attachment #3: cm-sample-recutil-latex.org --]
[-- Type: text/plain, Size: 1436 bytes --]

Not sure if this will help, but here is a sample set up for one of my documents that usually have 15 - 20 tables which first are called from a recutils and then passed to a source block for the table. (Please note that I use the numprint package, which does not "like" any text in a number only column, so there is a separate line for the initial row. I am still playing wihtthis)

#+Begin_example

Some text here which is followed by a table

#+LATEX:
\label{SCHEDA}
\begin{center}
\textbf{SCHEDULE A\\PRINCIPAL RECEIVED}
\end{center}
\setlength{\extrarowheight}{8pt}
\vspace{-3.0ex}
\ofoot{Schedule A}

#+NAME: SCHEDAP
#+ATTR_LATEX: :mode table :environment longtable :align p{60pt}p{60pt}p{240pt}p{60pt}
|       Date | {{{cmhfill}}} Shares | Description                                              | Inventory {{{cm2space}}} Value |
#+begin_src rec :data foo.rec :type Finance :fields AccountDate,Description,AccountAmount :results silent
 (File = 'bar' && AccountSchedule = 'A')
#+end_src
#+RESULTS: SCHEDAP
#+NAME: SCHEDA
#+HEADER: :eval no
#+begin_src emacs-lisp :var table=SCHEDAP :exports results
  (setq table (cons 'hline table))
  (setq table (append table '(("|Total Schedule A"))))
  (setq table (append table '(("\n#+TBLFM: at>$>=vsum(atI$>..at>>$>);%.2f::"))))
  table
#+end_src
#+ATTR_LATEX: :mode table :environment longtable :align p{60pt}N{6}{3}p{250pt}N{8}{2}
#+RESULTS: SCHEDA

Some  more text here

#+End_example

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

* Re: orgmode and a database
  2016-04-04 20:27 ` Charles Millar
  2016-04-05 10:32   ` Uwe Brauer
@ 2016-04-05 20:32   ` Charles Millar
  1 sibling, 0 replies; 24+ messages in thread
From: Charles Millar @ 2016-04-05 20:32 UTC (permalink / raw)
  To: emacs-orgmode



On 04/04/2016 04:27 PM, Charles Millar wrote:
> Hi,
>
> On 04/04/2016 03:46 PM, Uwe Brauer wrote:
>> Hello
>>
>> I am looking for a sort of database I could use with orgmode. Anybody
>> has a suggestion? What's about recutils?
>>
>>
>>
>
> A few months ago I added recutils or "rec" to the Babel:languages, 
> Emacs Package section - still haven't provided an example though. (It 
> may have been Eric who encouraged me to post my entry to Worg, but at 
> the moment I cannot recall for sure.)
>
It was Nick Dokos.

Charlie Millar

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

* Re: orgmode and a database
  2016-04-05 17:03         ` Jose E. Marchesi
  2016-04-05 17:36           ` Uwe Brauer
@ 2016-04-05 21:27           ` Uwe Brauer
  1 sibling, 0 replies; 24+ messages in thread
From: Uwe Brauer @ 2016-04-05 21:27 UTC (permalink / raw)
  To: emacs-orgmode

>>> "Jose" == Jose E Marchesi <jemarch@gnu.org> writes:

   >> 1) Using ob-rec.el (part of recutils)
    
   >> #+begin_src rec :data mydata.rec :type milestone :fields ProjectID,Name
   >> Year == 2014
   >> #+end_src
    

   > #+begin_src rec :data mydata.rec :type milestone :fields ProjectID,Name
   >  Year == '2014'
   > #+end_src

   > It produces:

   > #+RESULTS:
   > | ProjectID | Name    |
   > |-----------+---------|
   > |         2 | Another |
   > |         4 | Foo     |



BTW is the inverse operation possible:

from an orgtable to one or more fields in a recfile?

Uwe 

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

end of thread, other threads:[~2016-04-05 21:27 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04 19:46 orgmode and a database Uwe Brauer
2016-04-04 20:19 ` Ken Mankoff
2016-04-05 10:31   ` Uwe Brauer
2016-04-05 13:01     ` Russell Adams
2016-04-04 20:27 ` Charles Millar
2016-04-05 10:32   ` Uwe Brauer
2016-04-05 13:12     ` Jose E. Marchesi
2016-04-05 16:37       ` Uwe Brauer
2016-04-05 17:03         ` Jose E. Marchesi
2016-04-05 17:36           ` Uwe Brauer
2016-04-05 21:27           ` Uwe Brauer
2016-04-05 20:01     ` Charles Millar
2016-04-05 20:32   ` Charles Millar
2016-04-05 10:43 ` Colin Baxter
2016-04-05 11:41   ` Charles Millar
2016-04-05 13:04     ` Colin Baxter
2016-04-05 14:02       ` Charles Millar
2016-04-05 14:03       ` Eric S Fraga
2016-04-05 14:40         ` Jose E. Marchesi
2016-04-05 16:18           ` Eric S Fraga
2016-04-05 13:02   ` Jose E. Marchesi
2016-04-05 13:49     ` Colin Baxter
2016-04-05 13:49     ` Colin Baxter
2016-04-05 14:04       ` Jose E. Marchesi

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