From: Thomas Holst <Thomas_Holst@gmx.de>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Bug: org-capture with template for a table
Date: Wed, 16 Jan 2019 13:05:21 +0100 [thread overview]
Message-ID: <87zhs0n6ym@boerne> (raw)
Hello,
recently I encountered a bug with capturing table lines. Here is a ECM
to reproduce it:
- org-mode file (testing.org):
#+begin_src org
* Headline
|---+------+--------|
| | Name | Amount |
|---+------+--------|
|---+------+--------|
| | | |
|---+------+--------|
#+TBLFM: @2$3=vsum(@-II..@-I);%.2f
#+end_src
- settings (init-file)
#+begin_src emacs-lisp
;; path settings for git repo
(add-to-list 'load-path "~/git-emacs/org-mode/contrib/lisp")
(add-to-list 'load-path "~/git-emacs/org-mode/contrib/babel/lisp")
;;; add org-mode/lisp as last
(add-to-list 'load-path "~/git-emacs/org-mode/lisp")
(require 'org)
(require 'org-capture)
(setq org-capture-templates
'(("t" "testing" table-line (file+headline "~/Dropbox/emacs-testing/19-01-16-capture-table-line/testing.org" "Headline")
"|#| |%^{amount}|" :table-line-pos "III-1" :immediate-finish t)))
#+end_src
I start emacs as follows:
: emacs -Q -l init-file.el --find-file testing.org
When I evaluate capture template I get following result:
#+begin_src org
* Headline
|---+------+--------|
| | Name | Amount |
|---+------+--------|
| # | | 33.00 |
|---+---+---|
| | | |
|---+---+---|
#+TBLFM: @2$3=vsum(@-II..@-I);%.2f
#+end_src
First there is an empty line which breaks the table in two and secondly
the formula is not updated. This also happens when I delete the empty
line, correct formula and evaluate org-capture again.
With git-bisect I found that
commit c76486d4e431bf0c67d371341eb28445e7de4517
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Tue Oct 23 01:32:55 2018 +0200
org-capture: Fix off-by-one error
* lisp/org-capture.el (org-capture-place-table-line): Fix narrowing.
produces the error.
emacs-version:
"GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2018-05-29"
org-version:
Org mode version 9.2 (release_9.2-194-g955044 @
/home/thommy/git-emacs/org-mode/lisp/)
Thank you for looking into this.
--
Bis neulich ...
Thomas
next reply other threads:[~2019-01-16 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 12:05 Thomas Holst [this message]
2019-01-17 13:51 ` Bug: org-capture with template for a table Nicolas Goaziou
2019-01-17 18:56 ` Thomas Holst
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhs0n6ym@boerne \
--to=thomas_holst@gmx.de \
--cc=emacs-orgmode@gnu.org \
/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 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).