Re: how to document/comment a complex org table formula

2021-07-08 Thread Nick Dokos
Uwe Brauer writes: "GdaO" == General discussions about Org-mode writes: > >> Limbic answer : >> - create an emacs-lisp function doing what you want >> - comment /ad libitum/ >> - call this function in your spreadsheet. > > I hoped such a function already existed and somebody would po

Re: how to document/comment a complex org table formula

2021-07-05 Thread Uwe Brauer
>>> "KV" == Karl Voit writes: Hi Karl, > Hi Uwe, > * Uwe Brauer wrote: >> >> Is there any way to document or comment such a formula, since I am sure >> that within days I don't remember why I chose that formula? > This is not a solution for really complex formulas. However, please > do note

Re: how to document/comment a complex org table formula

2021-07-05 Thread Jude DaShiell
So long as each piece of documentation has a continuation pointer to the next piece of documentation in the chain I think that would work. On Mon, 5 Jul 2021, Uwe Brauer wrote: > >>> "JD" == Jude DaShiell writes: > > > Why not use functional narrative form to document complex formulas? > > form

Re: how to document/comment a complex org table formula

2021-07-05 Thread Uwe Brauer
>>> "JD" == Jude DaShiell writes: > Why not use functional narrative form to document complex formulas? > formula name: > formula function: > formula uses: > formula returns: That would be also nice, however the problem I am facing to have a long and complicated expression with a lot of ifs, ma

Re: how to document/comment a complex org table formula

2021-07-05 Thread Karl Voit
Hi Uwe, * Uwe Brauer wrote: > > Is there any way to document or comment such a formula, since I am sure > that within days I don't remember why I chose that formula? This is not a solution for really complex formulas. However, please do note that standard org has: Named references: https://orgm

Re: how to document/comment a complex org table formula

2021-07-05 Thread Uwe Brauer
>>> "TV" == Tim Visher writes: > On Mon, Jul 5, 2021 at 10:14 AM Eric S Fraga wrote: >> Sorry; I cannot help you directly. >> >> My rule of thumb is that if formulas are getting too complex to >> understand/recall clearly, it's time to use a proper programming >> language instead. The nice thi

Re: how to document/comment a complex org table formula

2021-07-05 Thread Eric S Fraga
On Monday, 5 Jul 2021 at 10:55, Tim Visher wrote: > I had never heard of using an org table as input into a source block. > That's really interesting. Attached, for illustration, is a simple example, extracted from a paper I'm currently writing. The "input" to the awk script is the table at the

Re: how to document/comment a complex org table formula

2021-07-05 Thread Jude DaShiell
Why not use functional narrative form to document complex formulas? formula name: formula function: formula uses: formula returns: usually one line of text for each of those. I know, this comes from structured programming where no block of actual code is supposed to go above 50 lines and that for

Re: how to document/comment a complex org table formula

2021-07-05 Thread Tim Visher
On Mon, Jul 5, 2021 at 10:14 AM Eric S Fraga wrote: > Sorry; I cannot help you directly. > > My rule of thumb is that if formulas are getting too complex to > understand/recall clearly, it's time to use a proper programming > language instead. The nice thing about org is you can have tables as >

Re: how to document/comment a complex org table formula

2021-07-05 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga writes: > Sorry; I cannot help you directly. > My rule of thumb is that if formulas are getting too complex to > understand/recall clearly, it's time to use a proper programming > language instead. The nice thing about org is you can have tables as > inputs to and outpu

Re: how to document/comment a complex org table formula

2021-07-05 Thread Eric S Fraga
Sorry; I cannot help you directly. My rule of thumb is that if formulas are getting too complex to understand/recall clearly, it's time to use a proper programming language instead. The nice thing about org is you can have tables as inputs to and outputs of src blocks... My papers often have awk

Re: how to document/comment a complex org table formula

2021-07-04 Thread Uwe Brauer
>>> "GdaO" == General discussions about Org-mode writes: > Limbic answer : > - create an emacs-lisp function doing what you want > - comment /ad libitum/ > - call this function in your spreadsheet. I hoped such a function already existed and somebody would point it out to me (I searched t

how to document/comment a complex org table formula

2021-07-04 Thread General discussions about Org-mode.
Limbic answer : - create an emacs-lisp function doing what you want - comment /ad libitum/ - call this function in your spreadsheet. HTH,

how to document/comment a complex org table formula

2021-07-04 Thread Uwe Brauer
Hi It turns out that I have to deal with a bit more complex table formula of the form #+begin_src elisp #+TBLFM: $6=if($2>10,($2-10)*@2$7,0)+ min(10,$2)*@2$2+ min(10,$3)*@2$3 + if($4>10,($4-10)*@2$7,$4)+min(10,$4)*@2$4 +@2$5*$5;f1 #+end_src Is there any way to document or comment such a fo