From: hrdl <git@hrdl.eu>
To: emacs-orgmode@gnu.org
Cc: hrdl <git@hrdl.eu>
Subject: [PATCH] ob-core: Fix `org-babel-result-names'
Date: Mon, 16 Oct 2023 11:53:25 +0200 [thread overview]
Message-ID: <20231016101503.776938-1-git@hrdl.eu> (raw)
* lisp/ob-core.el (org-babel-result-names): Do not change
visibility of windows when called.
TINYCHANGE
---
lisp/ob-core.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index a7c4f2cab..54dcf400e 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2015,12 +2015,12 @@ buffer or nil if no such result exists."
(defun org-babel-result-names (&optional file)
"Return the names of results in FILE or the current buffer."
- (save-excursion
- (when file (find-file file)) (goto-char (point-min))
- (let ((case-fold-search t) names)
+ (with-current-buffer (if file (find-file-noselect file) (current-buffer))
+ (org-with-point-at 1
+ (let ((case-fold-search t) names)
(while (re-search-forward org-babel-result-w-name-regexp nil t)
(setq names (cons (match-string-no-properties 9) names)))
- names)))
+ names))))
;;;###autoload
(defun org-babel-next-src-block (&optional arg)
--
2.42.0
next reply other threads:[~2023-10-16 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 9:53 hrdl [this message]
2023-10-16 13:07 ` [PATCH] ob-core: Fix `org-babel-result-names' 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=20231016101503.776938-1-git@hrdl.eu \
--to=git@hrdl.eu \
--cc=emacs-orgmode@gnu.org \
/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).