From: Slava Barinov <rayslava@gmail.com>
To: emacs-orgmode@gnu.org
Cc: rayslava+dev@gmail.com
Subject: [PATCH] org-collector.el: Add support for formulas appending
Date: Sun, 17 Mar 2019 13:22:58 +0300 [thread overview]
Message-ID: <87sgvl4wes.fsf@gmail.com> (raw)
* contrib/lisp/org-collector.el (org-dblock-write:propview): add
:tblfm keyword parameter support
This adds possiblity to append formula line to table which is useful
in certain cases, especially during updates and recalculation of whole
table.
Signed-off-by: Slava Barinov <rayslava@gmail.com>
---
contrib/lisp/org-collector.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/contrib/lisp/org-collector.el b/contrib/lisp/org-collector.el
index 833ecbf51..5270ede6d 100644
--- a/contrib/lisp/org-collector.el
+++ b/contrib/lisp/org-collector.el
@@ -122,6 +122,7 @@ preceeding the dblock, then update the contents of the dblock."
(noquote (plist-get params :noquote))
(colnames (plist-get params :colnames))
(defaultval (plist-get params :defaultval))
+ (tblfm (plist-get params :tblfm))
(content-lines (org-split-string (plist-get params :content) "\n"))
id table line pos)
(save-excursion
@@ -148,6 +149,8 @@ preceeding the dblock, then update the contents of the dblock."
(while (setq line (pop content-lines))
(when (string-match "^#" line)
(insert "\n" line)))
+ (when tblfm
+ (insert "\n#+TBLFM: " tblfm))
(goto-char pos)
(org-table-recalculate 'all))
(org-collector-error (widen) (error "%s" er))
--
2.21.0
next reply other threads:[~2019-03-17 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-17 10:22 Slava Barinov [this message]
2019-03-21 20:56 ` [PATCH] org-collector.el: Add support for formulas appending Nicolas Goaziou
2019-03-22 6:33 ` Slava Barinov
2019-03-22 11:59 ` Nicolas Goaziou
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=87sgvl4wes.fsf@gmail.com \
--to=rayslava@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rayslava+dev@gmail.com \
/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.