Hello Achim,

Achim Gratz wrote:
> Nicolas Goaziou writes:
>> It's very easy to have a caption on the generated output: name the code.
>> Hence, the following code block:
>>
>>   #+NAME: calculation
>>   #+BEGIN_SRC emacs-lisp
>>   (+ 1 1)
>>   #+END_SRC
>>
>> will produce:
>>
>>   #+RESULTS: calculation
>>   2
>>
>> If you add a caption to the results, like:
>>
>>   #+CAPTION: Basic arithmetic
>>   #+RESULTS: calculation
>>   2
>>
>> you can update the source block without ever needing to remove the
>> caption.
>
> Great.  I could swear the last time I was trying this it would add a new
> result block on top of the old one, but I may have changed the name
> inbetween.

The thing is:

- you try with an unnamed block
- you get an unnamed result block inserted
- you name the block
- you get a named result block inserted
- you have to manually remove the unnamed result block

> It would still be nice (I think) if an unnamed source block would
> simply replace the next unnamed result block if there is one.

I think this is a great proposition, which would make a lot of sense.

Best regards,
  Seb

-- 
Sebastien Vauban


Reply via email to