From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hannon Subject: Tag individual output lines from source block? Date: Wed, 25 Jan 2012 18:47:48 -0800 Message-ID: <20120126024748.GA13143@mikehppc.gh.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqFNW-0004aV-VV for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 21:48:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqFNW-00017g-2Z for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 21:47:58 -0500 Received: from nm28-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.234]:38072) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RqFNV-00016z-JV for emacs-orgmode@gnu.org; Wed, 25 Jan 2012 21:47:57 -0500 Content-Disposition: inline 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 Greetings. I'd like to know if there is some way to "tag" the output of a source-code block so as to indicate which line of the source-code block produced the output. In the appended example, the results of computing both "myMat" and "diag(myMat)" are juxtaposed. I'm looking for a way to indicate that the first part of the output is from "myMat", and the second is from "diag(myMat)". I understand that I could achieve the effect by using separate source-code blocks and/or just inserting print statements into the source-code block. I just thought that there might be some Org-mode feature that I've overlooked. (And, of course, the situation is not always as simple as in this example.) Thanks, -- Mike #+PROPERTY: session *R* #+PROPERTY: cache yes #+PROPERTY: results output verbatim #+PROPERTY: exports both #+PROPERTY: tangle yes * Test #+BEGIN_SRC R myMat <- matrix(c(1, 2, 3, 4, 5, 6, 7, 8, 9), nrow=3) myMat diag(myMat) #+END_SRC #+RESULTS[3ac776362ed92ae4090c997f1b7b1922ee565681]: : [,1] [,2] [,3] : [1,] 1 4 7 : [2,] 2 5 8 : [3,] 3 6 9 : [1] 1 5 9 Org-mode version 7.8.03 (release_7.8.03.237.g674bb)