all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bruno Barbier <perso.bruno.barbier@free.fr>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-babel-insert-result: Fix wrong-type-argument markerp nil
Date: Tue, 08 Nov 2022 19:17:50 +0100	[thread overview]
Message-ID: <E1osT57-0000BJ-OT@lists.gnu.org> (raw)

[-- 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


             reply	other threads:[~2022-11-08 20:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 18:17 Bruno Barbier [this message]
2022-11-09  2:33 ` [PATCH] org-babel-insert-result: Fix wrong-type-argument markerp nil 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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1osT57-0000BJ-OT@lists.gnu.org \
    --to=perso.bruno.barbier@free.fr \
    --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 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.