Org-mode mailing list
 help / color / mirror / 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
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 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://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

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git