From mboxrd@z Thu Jan 1 00:00:00 1970 From: torys.anderson@gmail.com (Tory S. Anderson) Subject: Re: What to use for tables with lengthy text in cells? Date: Tue, 03 Mar 2015 14:19:57 -0500 Message-ID: <87oao9oplu.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSsMK-00088f-SO for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 14:20:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSsMJ-000760-Jm for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 14:20:00 -0500 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:42258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSsMJ-00075u-Fq for emacs-orgmode@gnu.org; Tue, 03 Mar 2015 14:19:59 -0500 Received: by qcvp6 with SMTP id p6so32254919qcv.9 for ; Tue, 03 Mar 2015 11:19:59 -0800 (PST) In-Reply-To: (Charles C. Berry's message of "Tue, 3 Mar 2015 10:08:13 -0800") 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: "Charles C. Berry" Cc: Org Mode It's not a perfect solution (many of us have wished for some way of doing multi-line cells in orgmode, but there's no clear solution...) but I use a combination of width restraints[1] and toggle-truncate-lines, which I've bound to . If it comes to the worst, I would probably pull out csv-mode and use a CSV file. I think the problem is that there's no simple way to wrap within just a cell in Emacs. "Charles C. Berry" writes: > On Mon, 2 Mar 2015, Charles C. Berry wrote: > >> On Mon, 2 Mar 2015, Matt Price wrote: >> >>> I have a project which will require me to enter about a paragraph in each >>> of 5 fields several times a day. I would use org tables, but I need to be >>> able to see the table contents in the buffer, and org hides long lines. I >>> tried using table.el but it feels incredibly clumsy - for instance, I can't >>> find a way to add a row to the end of the table, which seems crazy. >>> >>> I am wondering what other people do in this situation - I guess I could >>> use a spreadsheet or an odt document but I would much rather stay in emacs >>> if I can. >> >> I sometimes use babel blocks for this purpose. >> > > But I did not give an example of filling in a table using that > strategy. > > So here is an example of how you would use that strategy to fill out a > table with fields that get edited. Obviously, you can use the string > resulting from org-fill-template in other ways than in the example > below. > > > * Not exported :noexport: > > Define a table template (and put it out of the way in a subtree that > is not exported) > > #+name: tmplt > #+BEGIN_SRC org > | Never change me | %a | > | %b | Dont modify me either | > #+END_SRC > > Define the fill-in cells and be sure they are not exported: > > #+name: pcta > #+BEGIN_SRC org > this is ~a~. > #+END_SRC > > #+name: pctb > #+BEGIN_SRC org > this is *b*. > #+END_SRC > > > * This gets exported > > #+HEADER: :var a=pcta() :var b=pctb() :var tm=tmplt() > #+BEGIN_SRC emacs-lisp :wrap latex :exports results > (org-export-string-as > (org-fill-template tm `(("a" . ,a)("b" . ,b))) > 'latex t) > #+END_SRC > > #+RESULTS: > #+BEGIN_latex > \begin{center} > \begin{tabular}{ll} > Never change me & this is \verb~a~.\\ > this is \textbf{b}. & Dont modify me either\\ > \end{tabular} > \end{center} > #+END_latex > > HTH, > > Chuck Footnotes: [1] http://orgmode.org/manual/Column-width-and-alignment.html#Column-width-and-alignment