From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien Vauban Subject: Re: [BUG] src_blocks - :results raw and replace don't work together Date: Mon, 28 Jul 2014 15:59:45 +0200 Message-ID: <86ha21twha.fsf@somewhere.org> References: <87vbraroza.fsf@gmail.com> <87ion96zny.fsf@gmail.com> <87ion9gosi.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 Thorsten Jolitz wrote: > Nick Dokos writes: > >> Thorsten Jolitz writes: >> >>> Hi List, >>> >>> evaluating this 3 times does not work as expected: >>> >>> ,---- >>> | * A >>> | >>> | #+header: :results raw replace >>> | #+begin_src emacs-lisp >>> | (+ 2 2) >>> | #+end_src >>> | >>> | #+results: >>> | 4 >>> | 4 >>> | 4 >>> `---- >>> >>> Independent from argument order, 'replace' (which should be default >>> anyway) is ignored. >> >> Right - `raw' inserts results without delimiters so org has no idea >> where they end and cannot delete them (try org-babel-remove-result) >> or replace them. > > ok, I see > > from `org-babel-remove-result': > ,---- > | (when (looking-at (concat org-babel-result-regexp ".*$")) ...) > `---- > > seems a bit tricky to adapt this to 'raw results ... > > But at least there should be a hint in the manual that ':results raw > replace' is not supposed to work, and what would be a possible > workaround. Workarounds: - A block wrapper makes it possible for the entirety of the results to be clearly located, regardless of their contents, and replaced (with new results) by Babel upon code block re-evaluation, or - :results drawer Best regards, Seb -- Sebastien Vauban