all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] org-babel-insert-result: Fix wrong-type-argument markerp nil
@ 2022-11-08 18:17 Bruno Barbier
  2022-11-09  2:33 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Bruno Barbier @ 2022-11-08 18:17 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 85 bytes --]


Hi,

Here is a small patch for a corner case in `org-babel-insert-result'.

Bruno



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch org-babel-insert-result: Fix wrong-type-argument markerp nil --]
[-- Type: text/x-diff, Size: 1092 bytes --]

From 288e2631ef60eeaee32f1107754aeb521247d54b Mon Sep 17 00:00:00 2001
From: Bruno BARBIER <brubar.cs@gmail.com>
Date: Sun, 6 Nov 2022 13:57:40 +0100
Subject: [PATCH] org-babel-insert-result: Fix wrong-type-argument markerp nil

lisp/ob-core.el (org-babel-insert-result): Don't reset the marker
`end' if it is not defined.
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 22d60cfe6..91938d7e5 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2596,7 +2596,7 @@ (defun org-babel-insert-result (result &optional result-params info hash lang ex
                           (message "Code block returned no value%s." time-info)
                         (message "Code block produced no output%s." time-info))
                     (message "Code block evaluation complete%s." time-info))))
-	    (set-marker end nil)
+	    (when end (set-marker end nil))
 	    (when outside-scope (narrow-to-region visible-beg visible-end))
 	    (set-marker visible-beg nil)
 	    (set-marker visible-end nil)))))))
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-09  6:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-08 18:17 [PATCH] org-babel-insert-result: Fix wrong-type-argument markerp nil Bruno Barbier
2022-11-09  2:33 ` Ihor Radchenko
2022-11-09  6:37   ` Bruno Barbier
2022-11-09  6:42     ` Ihor Radchenko
2022-11-09  6:44       ` Ihor Radchenko
2022-11-09  6:59         ` Bruno Barbier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.