emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Daniele Nicolodi <daniele@grinta.net>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] doc/org-manual.org: Extend table formulas Lisp form documentation
Date: Tue, 24 Nov 2020 23:37:08 -0500	[thread overview]
Message-ID: <87im9u832j.fsf@kyleam.com> (raw)
In-Reply-To: <f3aa101b-8b3e-746e-20a3-3a938e9a3b7a@grinta.net>

Daniele Nicolodi writes:

> Hello,
>
> I always found the description of Lisp forms in Org table formulas not
> extremely clear, especially in regard to the use of mode flags. The
> attached patch tries to clarify the manual a bit.

Thanks.

> Would it be worth to mention org-sbe in the same section of the manual?

Yeah, it looks like there's no mention of org-sbe in the manual, so I
think so (as a separate patch).

> Subject: [PATCH] doc/org-manual.org: Extend table formulas Lisp form
>  documentation
>
> Be more explicit about how fields are interpolated into the Lisp
> forms, clarify the use of mode flags, and add a cuple more examples.

s/cuple/couple/

Typically a manual change will get a "* doc/org-manual.org (<section>):"
entry in the commit message.

> ---
>  doc/org-manual.org | 60 +++++++++++++++++++++++++++-------------------
>  1 file changed, 36 insertions(+), 24 deletions(-)
[...]
> +By default, references are interpolated as literal Lisp strings: the
> +field content is replaced in the Lisp form stripped of leading and
> +trailing white space and surrounded in double-quotes.  For example:
>  
> -Here are a few examples---note how the =N= mode is used when we do
> -computations in Lisp:
> +: '(concat $1 $2)
>  
> -- ='(concat (substring $1 1 2) (substring $1 0 1) (substring $1 2))= ::
> +concatenates the content of columns 1 and column 2.

This and similar spots in this patch produce incorrect indentation in
the info output:

  trailing white space and surrounded in double-quotes.  For example:
  
       '(concat $1 $2)
  
     concatenates the content of columns 1 and column 2.

Adding "#+texinfo: @noindent" above the line would prevent that.  To
check the result, you can generate the info output with `make info' and
then visit it with `C-u C-h i doc/org'.

Aside from that, the changes here look like an improvement to me.  As
far as "interpolated" goes, this patch adds one more instance to a
section that carries 4 of the 5 occurrences in the code base, so I'd say
it's fine to leave as is.  I think the "replaced" or "substituted"
suggestions by Tim Cross are good ones, though, if anyone cares to send
a follow-up patch.


  parent reply	other threads:[~2020-11-25  4:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 18:06 [PATCH] doc/org-manual.org: Extend table formulas Lisp form documentation Daniele Nicolodi
2020-11-16 10:25 ` Eric S Fraga
2020-11-16 10:51   ` Daniele Nicolodi
2020-11-16 12:35     ` Tim Cross
2020-11-18 19:42       ` TEC
2020-11-18 20:15         ` Charles Millar
2020-11-25  4:37 ` Kyle Meyer [this message]
2020-11-25 20:44   ` Daniele Nicolodi
2020-11-27  6:40     ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87im9u832j.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=daniele@grinta.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).