From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [Babel] org-babel-execute-buffer gives different results than org-babel-exp-non-block-elements Date: Fri, 23 Aug 2013 08:55:59 -0600 Message-ID: <87fvu0tq0w.fsf@gmail.com> References: <87y57twot4.fsf@gmail.com> <87ppt5wjn1.fsf@gmail.com> <87siy1jpff.fsf@gmail.com> <87k3jckes7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCsmc-0000Xn-4n for emacs-orgmode@gnu.org; Fri, 23 Aug 2013 10:56:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCsmX-0007f9-0K for emacs-orgmode@gnu.org; Fri, 23 Aug 2013 10:56:14 -0400 Received: from mail-pd0-x22a.google.com ([2607:f8b0:400e:c02::22a]:50144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCsmW-0007do-QJ for emacs-orgmode@gnu.org; Fri, 23 Aug 2013 10:56:08 -0400 Received: by mail-pd0-f170.google.com with SMTP id x10so772506pdj.15 for ; Fri, 23 Aug 2013 07:56:07 -0700 (PDT) In-Reply-To: <87k3jckes7.fsf@gmail.com> (Nicolas Goaziou's message of "Fri, 23 Aug 2013 10:11:20 +0200") 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: Nicolas Goaziou Cc: emacs-orgmode , Nicolas Girard Nicolas Goaziou writes: > Nicolas Girard writes: > >>> `org-babel-exp-non-block-elements' and `org-babel-exp-process-buffer' >>> could probably check if code still exists before trying to remove (and >>> replace) it. >>> >> >> Yeah, I don't know how much work it would represent but it seems much >> more appropriate that my hack-ish solution. > > It might be tricky to set up. I'm not even sure Babel is meant for these > cases (where evaluating code removes its source). > > Another possibility is to have a "side-effect only" behaviour for export > where code block is not removed nor replaced. ":exports none" could be > a candidate for this. Maybe Eric Schulte has an opinion on it. > If I understand correctly, I think ":export both :results none" should have the desired effect of executing the code block, not inserting the results, and keeping the code block itself in place. If you want to run emacs lisp at export time but don't want the code or the results, maybe it would be a more natural fit for a filter function? -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D