Calc’c elisp functions (imho) all have the prefix calcFunc-. So in order to use a calc function like vlen in an org table lisp formula, one could use calcFunc-vlen. That’s nice.

What bothers me is the lack of “on-line” documentation (i.e. usable with eldoc or completion frameworks).

All calc functions are nicely documented here: https://www.gnu.org/software/emacs/manual/html_mono/calc.html , thats good.

It is possible to modify a elisp’s function documentation. e.g. like so:

(put 'calcFunc-vlen 'function-documentation
     "Computes the length of a vector.
The length of a non-vector is considered to be zero.
Note that matrices are just vectors of vectors for the purposes of this command.")

Now calcFunc-vlen would have a nice “on-line” documentation, usable with C-h f, autocompletion and eldoc.

Has anyone already bothered to gather some of those strings from the manual, in a more machine processable form? So I could save some work to create “on-line” documentation of the calc functions?

  • Ok_Advisor1053@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    You can use the helpful library, which puts links to the calc manual in the function documentation, among other things. What you call online documentation is just the package manual.

    • SlowValue@alien.topOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      Thanks for your answer, though it does not help me with the issue (read below , why). I updated my question with screenshots.

      What you call online documentation is just the package manual.

      I wrote “on-line” within quotation marks. What I called “on-line” documentation is the function documentation (aka docstring). But I feared, when I would use function documentation every one would point me to the official calc manual …
      “On-line documentation” is (imho) just 1980s terminology for documentation readable within the program.

      […] helpful […] puts links to the calc manual in the function documentation […].

      I updated my Question with screenshots, those screenshots are intended to make it more clear. Using helpful’s WWW link in an emacs help buffer is like walking to the public library and reading a book (for my intended use case). (Don’t get me wrong, reading a book from a public library is nice, I’m glad such things are possible.)