From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [babel] Output table Date: Mon, 02 Dec 2013 22:04:51 +0100 Message-ID: <86y543q80c.fsf@somewhere.org> References: <86txerrzx4.fsf@somewhere.org> <87txerf663.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Eric, Eric Schulte wrote: > "Sebastien Vauban" writes: >> I'm trying to generate R graphs from lines found in the *Messages* buffer with >> the following code of mine: >> >> #+begin_src emacs-lisp :results output table >> (setq txt nil) >> (with-current-buffer "*Messages*" >> (goto-char (point-min)) >> (while (re-search-forward >> "^Retrieving newsgroup: \\(.+\\)" >> nil t) >> (setq txt (concat txt (format "%s" (match-string 1)) "\n")) >> (princ txt))) >> #+end_src >> >> However, the results is always an example block, NEVER in an Org _table_ -- and >> I don't understand why. Does anybody? > > I bet because ":results output" in Emacs Lisp is only interpreted as a > string. You're better off just returning a list with something like the > following. > > #+begin_src emacs-lisp :results output table > (let (txts) > (with-current-buffer "*Messages*" > (goto-char (point-min)) > (while (re-search-forward > "^Retrieving newsgroup: \\(.+\\)" > nil t) > (push (match-string 1) txts))) > txts) > #+end_src I guess you meant ":results value", then? Because "output" does not return anything with your code. As you can imagine, though the list could be processed by R, the fact it's not a table makes it unreadable as is in the Org buffer and in a generated PDF (at least, without extra conversion blocks). See http://screencast.com/t/QVd0VDLYE1. Would there be a way to get a proper table more directly? Best regards, Seb -- Sebastien Vauban