From: Thomas Holst <thomas.holst@de.bosch.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: org mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Problems with capture
Date: Tue, 8 Dec 2015 13:29:23 +0100 [thread overview]
Message-ID: <ywodh9jtt97g@de.bosch.com> (raw)
In-Reply-To: <ywodlh95ti4k@de.bosch.com> (Thomas Holst's message of "Tue, 8 Dec 2015 10:16:43 +0100")
Hi Nicolas,
replying to myself :-),
I dug a little deeper into this.
· Thomas Holst <thomas.holst@de.bosch.com> wrote:
> Hi Nicolas,
> · Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> Thomas Holst <Thomas_Holst@gmx.de> writes:
>
>> [...snip...]
>
> after a git-pull the first error (about cache) is gone. The second error
> still is there:
>
>>> condition-case: Capture template `hr': Invalid table line specification "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. | wann erh. Vers | wann erh. Beih. |
> |---+-------+------+---------+--------+-----------+-------------+----------------+-----------------|
> |---+-------+------+---------+--------+-----------+-------------+----------------+-----------------|
> | # | | | | 0.00 | | | 0.00 | 0.00 |
> |---+-------+------+---------+--------+-----------+-------------+----------------+-----------------|
> #+TBLFM: $8=$5*0.2;%.2f::$9=$5*0.8;%.2f::@2$5=vsum(@-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
;; Check if the template is good
#+end_src
Maybe there is a better way to fix this.
Thanks again for lookint into this.
--
Mit freundlichen Grüßen / Best regards
Thomas Holst
prev parent reply other threads:[~2015-12-08 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 13:12 Problems with capture Thomas Holst
2015-12-07 18:05 ` Nicolas Goaziou
2015-12-08 9:16 ` Thomas Holst
2015-12-08 12:29 ` Thomas Holst [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ywodh9jtt97g@de.bosch.com \
--to=thomas.holst@de.bosch.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.