赵一宇 <zhy...@163.com> writes: > When I try to execute ob-block in a narrowed buffer, there seems to have > a error on org-babel-result-to-file, with msg "wrong argument type > stringp, nil" > .... > and the reason is at line marked as -2->, which "buffer-file-name" would > be nil when in narrowed buffer.
Thanks for the report, but there seems to be either some terminology issue of a problem with analysis. Narrowing a buffer (`narrow-to-region') definitely does not change `buffer-file-name'; it just limits the visible and accessible text in buffer to a subset of text in buffer. Maybe you mean indirect buffer? But `buffer-base-buffer' should take care about this. So, may you please provide a reproducer, so that I can see and investigate the problem on my side? See https://orgmode.org/worg/org-faq.html#bug-reporting -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>