Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-04-13 Thread Ihor Radchenko
Charles Millar writes: > In response to his original proposal in 2021 I forwarded some of my > personal code for his consideration. see > > https://lists.gnu.org/archive/html/emacs-orgmode/2021-08/msg00431.html > > It not only added a #+TBLFM but also a table name, etc. > > My use case is I may

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-03-20 Thread Charles Millar
Hi, On 2/27/25 1:17 PM, Ihor Radchenko wrote: Slava Barinov writes: Okay, let's merge this one, so it'll be available if someone wants to use it. Sure. Applied. https://git.sr.ht/~bzg/org-contrib/commit/f1f6b6ec812803ff9969325a82960fb3545a The recent exchange concerning Slava's propo

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-27 Thread Ihor Radchenko
Slava Barinov writes: > Okay, let's merge this one, so it'll be available if someone wants to use it. Sure. Applied. https://git.sr.ht/~bzg/org-contrib/commit/f1f6b6ec812803ff9969325a82960fb3545a -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-27 Thread Slava Barinov
Hello, Okay, let's merge this one, so it'll be available if someone wants to use it. And I'll spend some time to set up the correct environment, prepare package, tests and so on. Will be back in a while when the package has an appropriate state. Best Regards, Slava Barinov Ihor Radchenko write

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-26 Thread Ihor Radchenko
Slava Barinov writes: > Okay, agreed. Thanks! I have no further comments. Do you want me to commit this to org-contrib, or maybe you prefer to create the new repository for org-collector and continue from there? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-26 Thread Slava Barinov
Hello, Okay, agreed. Best Regards, Slava Barinov Ihor Radchenko writes: > Slava Barinov writes: > >> Ah! At last I've got the concern. >> >> You said about the situation where we want to save the manually inserted >> TBLFM >> when regenerating the table? > > Yup. That's what people expect

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-25 Thread Ihor Radchenko
Slava Barinov writes: > Ah! At last I've got the concern. > > You said about the situation where we want to save the manually inserted TBLFM > when regenerating the table? Yup. That's what people expect in Org dynamic blocks. > + (when tblfm > + (unless (looking-back "\n" 1) `looking

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-25 Thread Slava Barinov
Hello, Ah! At last I've got the concern. You said about the situation where we want to save the manually inserted TBLFM when regenerating the table? Best Regards, Slava Barinov Ihor Radchenko writes: > Slava Barinov writes: > >> Oh, right, I messed the scopes. > > Is your new patch version c

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-24 Thread Ihor Radchenko
Slava Barinov writes: > Oh, right, I messed the scopes. Is your new patch version correct? I still see #+TBLFM stripped unconditionally even when :tblfm parameter is not specified. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-23 Thread Slava Barinov
Hello, Oh, right, I messed the scopes. Best Regards, Slava Barinov Ihor Radchenko writes: > Slava Barinov writes: > >> Okay, in that case we can just merge two loops into one and filter out the >> #+TBLFM line. This version works for me. >> + (when (and (string-match-p "^#" (substring-no

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-22 Thread Ihor Radchenko
Slava Barinov writes: > Okay, in that case we can just merge two loops into one and filter out the > #+TBLFM line. This version works for me. > + (when (and (string-match-p "^#" (substring-no-properties line)) > + (not (string-match-p "^#\\+TBLFM:" > (substring-no-properti

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-22 Thread Slava Barinov
Hello, Okay, in that case we can just merge two loops into one and filter out the #+TBLFM line. This version works for me. Best Regards, Slava Barinov Ihor Radchenko writes: > Slava Barinov writes: > >> Yes, the block is cleaned but the #+TBLFM line is included into >> `content-lines' >> so

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-22 Thread Ihor Radchenko
Slava Barinov writes: > Yes, the block is cleaned but the #+TBLFM line is included into > `content-lines' > so it's duplicated unless removed manually. > > The solution with `save-excursion' looks more reliable but we can use just > `looking-back' in the end of block to check if the last line is

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-22 Thread Slava Barinov
Hello, Yes, the block is cleaned but the #+TBLFM line is included into `content-lines' so it's duplicated unless removed manually. The solution with `save-excursion' looks more reliable but we can use just `looking-back' in the end of block to check if the last line is a #+TBLFM. Not sure if #+TB

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-22 Thread Ihor Radchenko
Slava Barinov writes: > Okay, in that case bounded re-search-forward up to the next paragraph should > work. Hmm. I am wondering why you need that re-search-forward at all. AFAIK, dblock write function is called with dynamic block body emptied: #+BEGIN: ... #+END: There should be no TBLFM pre

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-21 Thread Slava Barinov
Hello, Oh! Sorry, it seems I missed the last email. Okay, in that case bounded re-search-forward up to the next paragraph should work. And as for maintenance, I think I can allocate some time for that. What activities are expected from a script maintainer? Best Regards, Slava Barinov Ihor Radc

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-02-20 Thread Ihor Radchenko
Ihor Radchenko writes: > I am not familiar with org-collector code, but (goto-char (point-min)) > seems dangerous - what if current Org buffer has multiple tables with > TBLFM lines? It has been a while since the last message in this thread. Have you had a chance to look into my comment? -- Ih

Re: [PATCH] lisp/org-collector.el: Add support for TBLFM

2025-01-12 Thread Ihor Radchenko
Slava Barinov writes: > The :tblfm keyword adds formulas to the end of table so they are applied right > after collection is done and the table is generated. > > * lisp/org-collector.el (org-dblock-write:propview): Add support for the > :tblfm keyword. Thanks for the patch, and do note that org-

[PATCH] lisp/org-collector.el: Add support for TBLFM

2024-12-06 Thread Slava Barinov
The :tblfm keyword adds formulas to the end of table so they are applied right after collection is done and the table is generated. * lisp/org-collector.el (org-dblock-write:propview): Add support for the :tblfm keyword. --- lisp/org-collector.el | 10 ++ 1 file changed, 10 insertions(+)