[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Tentative patch to keep org-babel-results-keyword when calling o
From: |
Eric Schulte |
Subject: |
Re: [O] Tentative patch to keep org-babel-results-keyword when calling org-babel-remove-result |
Date: |
Fri, 20 Sep 2013 16:30:45 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Hi Daniele,
Thanks for catching this very large edge case which I completely
ignored. I've just pushed up a fix.
Best,
Daniele Pizzolli <address@hidden> writes:
> On 09/20/2013 11:13 PM, Eric Schulte wrote:
>> Hi Daniele,
>>
>> Thanks for the suggestion and the accompanying patch. I've just applied
>> a modified version of your patch (included below). Please let me know
>> if this is insufficient for your needs.
>
> Hello Eric,
>
> Wonderful! Your patch is perfect for my use case. Thanks for the
> quick improvement!
>
> I just re-discovered the amazing feature of "named source blocks".
> that unfortunately trigger a corner case:
>
> #+NAME: fig1
> #+BEGIN_SRC...
> #+END_SRC
>
> Some text
>
> #+RESULTS: fig1
>
> ** Other section
>
> After running:
>
> (org-babel-map-src-blocks nil (org-babel-remove-result nil t))
>
> Will result in:
>
> #+NAME: fig1
> #+BEGIN_SRC...
> #+END_SRC
>
> Some text
>
> #+RESULTS: f
> ** Other section
>
> I tried to look at the code, but the level of indirection you added
> makes me feel lost. I would be happy to help in testing, even with
> more use cases if needed. I just found that the section “Writing
> tests with minimal Emacs-lisp knowledge” at
> http://orgmode.org/worg/org-tests/index.html#sec-3 is not yet complete
> but I can have a look at the source code and follow your advises or
> examples.
>
> Thanks again,
> Daniele Pizzolli
>
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D