emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [RFC] removing all results WAS: Re: idempotency ... org-babel-remove


From: Charles C. Berry
Subject: [O] [RFC] removing all results WAS: Re: idempotency ... org-babel-remove-inline-result
Date: Fri, 30 Jan 2015 20:13:38 -0800
User-agent: Alpine 2.00 (OSX 1167 2008-08-23)


RFC: the patch to `org-babel-remove-inline-result-one-or-many' removes inline results, too.

Do you see any bad consequences?

On Fri, 30 Jan 2015, Daniele Pizzolli wrote:

Hello Charles,

"Charles C. Berry" writes:

On Fri, 30 Jan 2015, Daniele Pizzolli wrote:


[discussion of extra whitespace bug deleted]

There is now a bugfix on master. I've also added 'interactive' to `org-babel-remove-inline-result'.


Is there a way to evaluate a buffer an then remove inline results or
better, to get the very same buffer after:


Yes.

See attached patch which should clean *all* results (except `raw' results) from a buffer when `org-babel-remove-result-one-or-many' is called with a prefix.

Before pushing this, I'd like some feedback on the wisdom of doing what the patch does.

Wwhy not have also
org-babel-remove-inline-result-one-or-many and
org-babel-remove-all-result-one-or-many to remove all the babel result
with one function call?

Easy enough, but is this really needed? What about call block/line
results?

This is useful for me because I want to easily discard the results to
have the commit with only the changes in the source.  I hope others find
this a reasonable facility.  It is like a 'make clean' for your org
files.

I think extending `org-babel-remove-all-result-one-or-many' to cover inline results is innocuous. So if nobody raises an objection, I will push the patch.

I got that you want to clean up your buffer. But an issue with adding more functions is 'feature bloat'. If you really need `org-babel-remove-result-all' and `org-babel-remove-inline-result-one-or-many' you can have private functions.


Patch attached.

Thank you.

Regarding patches, if you haven't signed FSF copyright papers a TINYCHANGE is needed in the commit message.

I am not sure about the default of discarding keyword
Deleting the result line can cause some disorder, but it is the default
in org-babel-remove-result.  Also the naming can be confusing.

Alas. Then there is the user error I have made of re-using names.

Best,

Chuck

Attachment: 0002-ob-core.el-org-babel-remove-result-one-or-many-remov.patch
Description: remove inline results also


reply via email to

[Prev in Thread] Current Thread [Next in Thread]