* [PATCH] org-collector.el: Add support for formulas appending
@ 2019-03-17 10:22 Slava Barinov
2019-03-21 20:56 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Slava Barinov @ 2019-03-17 10:22 UTC (permalink / raw)
To: emacs-orgmode; +Cc: rayslava+dev
* 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] org-collector.el: Add support for formulas appending
2019-03-17 10:22 [PATCH] org-collector.el: Add support for formulas appending Slava Barinov
@ 2019-03-21 20:56 ` Nicolas Goaziou
2019-03-22 6:33 ` Slava Barinov
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2019-03-21 20:56 UTC (permalink / raw)
To: Slava Barinov; +Cc: rayslava+dev, emacs-orgmode
Hello,
Slava Barinov <rayslava@gmail.com> writes:
> * 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.
Thank you. Would it make sense to document it somewhere?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] org-collector.el: Add support for formulas appending
2019-03-21 20:56 ` Nicolas Goaziou
@ 2019-03-22 6:33 ` Slava Barinov
2019-03-22 11:59 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Slava Barinov @ 2019-03-22 6:33 UTC (permalink / raw)
To: emacs-orgmode
Hello,
So these options have to be documented?
I think there'll be more than one update then, for example :noquote and :scope
options were not documented as well. I've been sure that it's okay to check
source code and find all possible features.
Anyway, where should documentation be added? I can prepare additional patch.
Best Regards,
Slava Barinov.
Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> Slava Barinov <rayslava@gmail.com> writes:
>
> > * 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.
>
> Thank you. Would it make sense to document it somewhere?
>
> Regards,
>
> --
> Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] org-collector.el: Add support for formulas appending
2019-03-22 6:33 ` Slava Barinov
@ 2019-03-22 11:59 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2019-03-22 11:59 UTC (permalink / raw)
To: Slava Barinov; +Cc: emacs-orgmode
Hello,
Slava Barinov <rayslava@gmail.com> writes:
> So these options have to be documented?
I don't know, hence my question :) However, it is a good habit to
document features, IMO.
> I think there'll be more than one update then, for example :noquote and :scope
> options were not documented as well. I've been sure that it's okay to check
> source code and find all possible features.
OK.
> Anyway, where should documentation be added? I can prepare additional
> patch.
I see there is some documentation in the commentary part. Maybe that
could be a good place. If we move it into core, it would go in the
manual.
Speaking about "org-collector.el", it seems unmaintained. So we should
either move it into core, which may be a good idea, if it is useful
enough, or find a maintainer and move it elswhere (some ELPA, preferably
Org's or GNU's).
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-22 12:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-17 10:22 [PATCH] org-collector.el: Add support for formulas appending Slava Barinov
2019-03-21 20:56 ` Nicolas Goaziou
2019-03-22 6:33 ` Slava Barinov
2019-03-22 11:59 ` Nicolas Goaziou
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).