[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Babel results don't respect narrowing
From: |
Ihor Radchenko |
Subject: |
Re: Babel results don't respect narrowing |
Date: |
Thu, 04 May 2023 09:45:08 +0000 |
Sebastian Wålinder <s.walinder@gmail.com> writes:
> When org-babel inserts results after evaluating a org-babel block, the
> current narrowing isn't respected.
>
> Org searches outside of the current narrowing to find a result block, then
> updates that.
Yes, it is on purpose:
2f2a80fe062df5eaacbd5bc3a34a52f6684dcee9
Author: Nicolas Goaziou <n.goaziou@gmail.com>
AuthorDate: Wed Oct 24 17:23:20 2012 +0200
ob: Fix block evaluation in a narrowed buffer
* lisp/ob.el (org-babel-where-is-src-block-result): Insert new results
keyword in current narrowed part of buffer, if necessary. Small
refactoring.
(org-babel-insert-result): Do not widen buffer when new results have
to be inserted. Therefore, results inserted after the last block of
a narrowed buffer still belong to the narrowed part of the buffer.
* testing/lisp/test-ob.el: Add tests.
* testing/lisp/test-ob-exp.el: Move test to test-ob.el
> This is an issue primarily with libraries that insert IDs where the results
> are.
>
> Then, when the library searches for that ID it inserted in the narrowed
> buffer that doesn't contain the RESULTS tag, it won't be able to find it, as
> it's outside the view.
May you elaborate about what kind of library you are referring to?
Please describe the actual problem you ran into.
--
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>