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





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

Reply via email to