From mboxrd@z Thu Jan 1 00:00:00 1970 From: Slava Barinov Subject: [PATCH] org-collector.el: Add support for formulas appending Date: Sun, 17 Mar 2019 13:22:58 +0300 Message-ID: <87sgvl4wes.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:59140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5TCn-0002x6-8u for emacs-orgmode@gnu.org; Sun, 17 Mar 2019 06:39:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5TCm-0005ha-BV for emacs-orgmode@gnu.org; Sun, 17 Mar 2019 06:39:49 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:35441) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5TCl-0005gV-SG for emacs-orgmode@gnu.org; Sun, 17 Mar 2019 06:39:48 -0400 Received: by mail-lj1-x243.google.com with SMTP id t13so11487391lji.2 for ; Sun, 17 Mar 2019 03:39:47 -0700 (PDT) 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 Cc: rayslava+dev@gmail.com * 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 --- 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