Nicolas Goaziou <n.goaz...@gmail.com> writes: > Nicolas Girard <girard.nico...@gmail.com> 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