From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: changing cells in an org-mode table with Emacs lisp Date: Sun, 28 Dec 2014 19:38:00 +0100 Message-ID: References: <87vbkxgibh.fsf@tamas.ihs.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5Ij4-00065A-Ac for emacs-orgmode@gnu.org; Sun, 28 Dec 2014 13:38:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y5Ij3-0005FZ-Iw for emacs-orgmode@gnu.org; Sun, 28 Dec 2014 13:38:02 -0500 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:58972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5Ij3-0005FQ-EO for emacs-orgmode@gnu.org; Sun, 28 Dec 2014 13:38:01 -0500 Received: by mail-qc0-f179.google.com with SMTP id c9so8886956qcz.10 for ; Sun, 28 Dec 2014 10:38:00 -0800 (PST) In-Reply-To: <87vbkxgibh.fsf@tamas.ihs.ac.at> 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: Tamas Papp Cc: Org Mode Hi Tamas On Sat, Dec 27, 2014 at 5:37 PM, Tamas Papp wrote: > | a | a | > | aa | aa | > | aaa | aaa | > > would be replaced by > > | *a* | *a* | > | aa | *aa* | > | aaa | aaa | #+BEGIN_SRC emacs-lisp :results silent (defun format-cell (cell row col) (if (<= (length cell) col) (concat "*" cell "*") cell)) #+END_SRC | *a* | *a* | | aa | *aa* | | aaa | aaa | #+TBLFM: @<$<..@>$> = '(format-cell @0$0 (org-table-current-dline) (org-table-current-column)) or #+TBLFM: @<$<..@>$> = '(format-cell @0$0 @# $#) For explanations please see the manual. Michael