From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: org-babel src block generated graphics included twice if CAPTION is added Date: Sun, 17 Mar 2013 19:59:13 -0500 Message-ID: <878v5l34m6.fsf@gmail.com> References: <87obei18b9.fsf@nus.edu.sg> <4211.1363558889@alphaville> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHOQ3-0001Mn-5m for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 20:59:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHOQ1-0003Bj-TO for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 20:59:19 -0400 Received: from mail-qc0-x230.google.com ([2607:f8b0:400d:c01::230]:46722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHOQ1-0003BW-PI for emacs-orgmode@gnu.org; Sun, 17 Mar 2013 20:59:17 -0400 Received: by mail-qc0-f176.google.com with SMTP id n41so2477015qco.7 for ; Sun, 17 Mar 2013 17:59:17 -0700 (PDT) In-Reply-To: (John Hendy's message of "Sun, 17 Mar 2013 19:32:36 -0500") 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: John Hendy Cc: Li Bowen , nicholas.dokos@hp.com, Jay Kerns , emacs-orgmode I just pushed up a patch which should allow code blocks to find un-named results even when there are comment lines (such as #+options or #+attr_backend) between the code block and the results. Hope this helps, John Hendy writes: > On Sun, Mar 17, 2013 at 6:20 PM, Jay Kerns wrote: >> On Sun, Mar 17, 2013 at 6:21 PM, Nick Dokos wrote: >> >> [snip] >> >>> I think the best way to deal with problems like this is to name your code blocks (and results blocks). >>> >> >> [snip] >> >> I can't speak for Li, but it works on my system and I like Nick's >> solution better than mine. > > This is my preferred syntax as well. This has come up before on the > list; essentially any #+options syntax before an un-named #+results > block will cause the results to be re-inserted. #+begin_center or any > #+attr_backend options result in the same duplicate insertion of > results. > > > Also, just in case it's not known, you don't have to manually name the > #+results block. Just create your babel block with a #+name: attribute > and when you run it with C-c C-c, a named #+result will automatically > be created. > > John > >> >> Cheers, >> >> -- >> Jay >> > -- Eric Schulte http://cs.unm.edu/~eschulte