From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Holst Subject: Re: Problems with capture Date: Tue, 8 Dec 2015 13:29:23 +0100 Message-ID: References: <87fuzeh07w@gmx.de> <87r3iym8x1.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6HOZ-0006R4-Sd for emacs-orgmode@gnu.org; Tue, 08 Dec 2015 07:29:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6HOY-00080W-Qy for emacs-orgmode@gnu.org; Tue, 08 Dec 2015 07:29:27 -0500 Received: from smtp6-v.fe.bosch.de ([2a03:cc00:ff0:100::2]:39861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6HOY-0007zU-F6 for emacs-orgmode@gnu.org; Tue, 08 Dec 2015 07:29:26 -0500 In-Reply-To: (Thomas Holst's message of "Tue, 8 Dec 2015 10:16:43 +0100") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: org mode mailing list Hi Nicolas, replying to myself :-), I dug a little deeper into this. =B7 Thomas Holst wrote: > Hi Nicolas, > =B7 Nicolas Goaziou wrote: >> Thomas Holst writes: > >> [...snip...] > > after a git-pull the first error (about cache) is gone. The second erro= r > still is there: > >>> condition-case: Capture template `hr': Invalid table line specifica= tion "III-1" > > The table which was inserted looks like this: > #+begin_src org > ** OPEN [2015-12-08 Di] Rechnungen > #+NAME: akt-vers-rechnungen > |---+-------+------+---------+--------+-----------+-------------+----= ------------+-----------------| > | ! | Datum | Arzt | f+r wen | Betrag | wann bez. | wann bearb. | wan= n erh. Vers | wann erh. Beih. | > |---+-------+------+---------+--------+-----------+-------------+----= ------------+-----------------| > |---+-------+------+---------+--------+-----------+-------------+----= ------------+-----------------| > | # | | | | 0.00 | | | = 0.00 | 0.00 | > |---+-------+------+---------+--------+-----------+-------------+----= ------------+-----------------| > #+TBLFM: $8=3D$5*0.2;%.2f::$9=3D$5*0.8;%.2f::@2$5=3Dvsum(@-II..@-I);%= .2f > #+end_src > After creation point is at beginning of headline (left of the two *). > From my point of view table line specification "III-1" is ok. > > Thanks for looking into this. The culprit is `org-capture-place-table-line'. It narrows the buffer to relevant table but leaves point at the beginning of an empty line. `org-table-analyze' does not any table and exits with nil. For me the following patch fixes the problem: #+begin_src diff 1 file changed, 1 insertion(+) lisp/org-capture.el | 1 + modified lisp/org-capture.el @@ -1156,6 +1156,7 @@ may have been stored before." (goto-char end) (insert "\n| |\n|----|\n| |\n") (narrow-to-region (1+ end) (point))) + (goto-char (point-min)) ;; We are narrowed to the table, or to an empty line if there was no= table =20 ;; Check if the template is good #+end_src Maybe there is a better way to fix this. Thanks again for lookint into this. --=20 Mit freundlichen Gr=FC=DFen / Best regards=20 Thomas Holst=20