From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Huchler Subject: Re: org-capture template to type in bills from shops in ledger format Date: Tue, 04 Jun 2019 18:42:39 +0200 Message-ID: <877ea1qp34.fsf@mail.de> References: <87woi4rgwf.fsf@mail.de> <87imtoun07.fsf@luisa.c0t0d0s0.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:44079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYCWO-0005jp-0Q for emacs-orgmode@gnu.org; Tue, 04 Jun 2019 12:42:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYCWN-0008OX-47 for emacs-orgmode@gnu.org; Tue, 04 Jun 2019 12:42:47 -0400 Received: from [195.159.176.226] (port=43824 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYCWM-0008Mk-Tb for emacs-orgmode@gnu.org; Tue, 04 Jun 2019 12:42:47 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hYCWK-000wa9-Eo for emacs-orgmode@gnu.org; Tue, 04 Jun 2019 18:42:44 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Michael Welle writes: > nice. I do something similar with a simple Perl script and an SQL > database as a backend and sometimes I mull over about what's wrong > with me ;). On the other hand, I've Org tables telling me when I got > hair cuts in the last 10 years or so. Did find a Bug in my code, it only works if you have opened up the current buffer because %F only gives the path of the current open buffer. (default-directory (file-name-directory "%F")) The easiest solution would be to put the 2 functions from helper.el with a progn around it in the template file, then you don't need the load-file statement anymore.