Ihor Radchenko 于2023年7月4日周二 19:29写道: > That said, your patch should still work fine even with these > considerations. But we may need to sort out this undocumented behaviour. > Probably, an error like in `org-babel-graphical-output-file' should be > thrown by `org-babel-generate-file-param'. Yes. The main concern is that some users may rely on the undocumented behavior. > What about > > #+begin_src python :file "test.png" :results graphics file > import matplotlib.pyplot as plt > plt.plot([1,2,3,4,5]) > plt.savefig('test.png') > plt.plot([5,4,3,2,1]) > plt.show() > #+end_src OK, I think that it is better to turn off the feature by default and I have updated the patch. Inspired by ob-R, some extra header arguments are supported. Thanks.