From: Ihor Radchenko <yantar92@posteo.net>
To: "Sebastian Wålinder" <s.walinder@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel results don't respect narrowing
Date: Thu, 04 May 2023 09:45:08 +0000 [thread overview]
Message-ID: <87a5ykph0b.fsf@localhost> (raw)
In-Reply-To: <87mt2r39ru.fsf@nixos.mail-host-address-is-not-set>
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>
next prev parent reply other threads:[~2023-05-04 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 22:46 Babel results don't respect narrowing Sebastian Wålinder
2023-05-04 9:45 ` Ihor Radchenko [this message]
[not found] ` <87r0qib3ri.fsf@nixos.mail-host-address-is-not-set>
2023-06-11 13:01 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5ykph0b.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=s.walinder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).