emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "András Major" <andras.g.major@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Wishlist: allow range of table elements to be filled by sbe
Date: Fri, 19 Aug 2011 18:59:58 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110819T205313-519@post.gmane.org> (raw)
In-Reply-To: 878vqpo39j.fsf@gmail.com

Hi Eric,

> sbe is just an elisp function which is called by the Org-mode
> spreadsheet's function evaluation mechanisms.  The spreadsheet does not
> allow for insertion of results into multiple cells and thus neither does
> the use of sbe.

Hmmm.  It appears that one can make sbe set multiple cells in the
table -- simply make your code block output multiple results separated
by "|" and set ":results table".  This, however, also shifts any
existing cells in the table, thus increasing the number of columns,
instead of just overwriting the given number of cells.

> I would recommend a solution like the following, which
> reads the /entire/ table into a code block, and writes the results out
> in place.

This isn't always practical.  In the case of the Org document I'm
writing at the moment, the computation is rather expensive, and my
goal is that you can edit a row in the table and run the calculation
just for that row to see the result.  Updating the entire table at
once would be much too slow.

> Every time the code block is evaluated multiple cells in the table are
> changed.  To only set specific table values use of the `setf' macro
> would probably be more appropriate.

How is setf used?  I haven't found it in the documentation.

  András

  reply	other threads:[~2011-08-19 19:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19  7:22 Wishlist: allow range of table elements to be filled by sbe András Major
2011-08-19 13:17 ` Eric Schulte
2011-08-19 18:59   ` András Major [this message]
2011-08-19 22:22     ` Eric Schulte
2011-08-19 20:46 ` Michael Brand

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=loom.20110819T205313-519@post.gmane.org \
    --to=andras.g.major@gmail.com \
    --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).