From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?b?QW5kcsOhcw==?= Major Subject: Re: Wishlist: allow range of table elements to be filled by sbe Date: Fri, 19 Aug 2011 18:59:58 +0000 (UTC) Message-ID: References: <878vqpo39j.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuUIg-0002do-25 for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 15:00:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuUIe-0004XS-JX for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 15:00:13 -0400 Received: from lo.gmane.org ([80.91.229.12]:47568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuUIe-0004Wd-DL for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 15:00:12 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QuUId-0000DV-4P for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 21:00:11 +0200 Received: from dslb-092-074-177-167.pools.arcor-ip.net ([92.74.177.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Aug 2011 21:00:11 +0200 Received: from andras.g.major by dslb-092-074-177-167.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Aug 2011 21:00:11 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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