Ihor Radchenko <yanta...@posteo.net> 于2023年7月3日周一 19:41写道:
> This already works, even without the patch. Yes. It means the patch doesn't break current usage. > > In this case, `graphics' can be removed too. > > May you elaborate? > > #+begin_src python :results file > implies that the result of execution is file _contents_. It is consistent with current behavior, e.g. `:results file' is used to produce graphics file https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html > This is not acceptable. If src blocks worked in the past, they should > continue working without adjustments in user' setup. We can only break > backwards-compatibility when there is a strong reason to do so. Adding a > new feature is not such a reason. Any src blocks worked in the past still work with this patch, without any adjustments. The patch only makes the following src block, which cannot produce `test.png' in the past, can produce `test.png'. #+begin_src python :file "test.png" :results graphics file import matplotlib.pyplot as plt plt.plot([1,2,3,4,5]) #+end_src