From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: cleaning all the #+results from an org document Date: Fri, 29 Jul 2011 09:48:24 +0200 Message-ID: <80aabx5xyv.fsf@somewhere.org> References: <21734.1311841912@maps> <4E3154FA.5000606@gmail.com> <32216.1311857987@maps> <871uxadk3v.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Hi Eric, Eric Schulte wrote: > Ista Zahn writes: > >> On Thu, Jul 28, 2011 at 8:59 AM, Stephen Eglen >> wrote: >>> Thanks Torsten, you've expressed it elegantly! >>>> >>>> a) send it to someone without the results (to let him create his own) >>>> b) archive them without having possible huge amount of lines of >>>> results which can be reproduced any time by executing the block again. >>>> c) to delete all the old results and start "fresh" >> >> +1 for c. I often work with R objects that are simply too large to >> store in org tables, so I use babel caching + session + write / load R >> data files from disk. This works, but it becomes easy to get to an >> inconsistent state, and I would like to be able to delete the results >> blocks and run the whole thing fresh. > > You could try evaluating the following with "M-x :" in an Org-mode > buffer. If this works well then I'll give it its own function name and > key shortcut (key combo suggestions welcome). > > #+begin_src emacs-lisp > (org-babel-map-src-blocks nil (org-babel-remove-result)) > #+end_src On the file I took for testing, this works OK. Regarding a key binding, looking at =C-c C-v h=, this is already quite full. Though, =k= is free, and could be used for "killing the results". Best regards, Seb -- Sebastien Vauban