Subject: [BUG] 31.0.50; org-babel-execute-src-block: Wrong type argument: integer-or-marker-p, nil
From: Antero Mejr <[email-masked]>
To: [email-masked],[email-masked]
Date: Wed, 18 Jun 2025 03:31:17 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

When exporting this Org buffer with org-html-export-to-html:

#+begin_src emacs-lisp :exports results
  (org-table-convert-region
   (point)
   (+ (point) (cadr (insert-file-contents "my-table.csv"))))
#+end_src

The export operation fails with a type error:

org-babel-execute-src-block: Wrong type argument: integer-or-marker-p, nil

The expected behavior is that the converted table will be inserted into
the document and exported by the backend.

While trying to debug this, I noticed that when
org-babel-execute-src-block is executed with the cursor inside the
#+begin_src block, the snippet runs and inserts the text content as
expected. However, when org-babel-execute-src-block is run with the
cursor just before the #+begin_src block, the same type error occurs.
That was also unexpected.

In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.33, cairo version 1.16.0) of 2025-05-04 built on pop-os
Repository revision: 159e3a981ed5482393182b036e38818d42405c90
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Pop!_OS 22.04 LTS

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Messages

Minor modes in effect:
  pixel-scroll-precision-mode: t
  global-auto-revert-mode: t
  server-mode: t
  global-hide-mode-line-mode: t
  hide-mode-line-mode: t
  hexl-follow-ascii: t
  csv-field-index-mode: t
  override-global-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-regexp-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow mail-extr emacsbug lisp-mnt vc-git diff-mode track-changes
vc-dispatcher oc-basic ol-eww eww vtable mule-util url-queue mm-url
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015
mm-view mml-smime smime dig gnus-sum shr pixel-fill kinsoku url-file svg
dom gnus-demon nntp gnus-group gnus-undo gnus-start gnus-dbus dbus xml
gnus-cloud nnimap nnmail mail-source utf7 gnus-spec gnus-win nnoo
gnus-int gnus-range message sendmail yank-media rfc822 mml mml-sec epa
derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus
nnheader gnus-util mail-utils range mm-util mail-prsvr wid-edit
ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs
ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi em-unix em-term term
disp-table ehelp em-script em-prompt em-pred em-ls em-hist em-glob
em-extpipe em-cmpl em-dirs em-basic em-banner em-alias em-tramp tramp
trampver tramp-integration tramp-message tramp-compat shell parse-time
iso8601 tramp-loaddefs esh-mode esh-var eshell esh-cmd esh-ext esh-proc
esh-opt esh-io esh-arg esh-module esh-module-loaddefs esh-util files-x
display-fill-column-indicator exwm exwm-input xcb-keysyms xcb-xkb
exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout
exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types
xcb-debug kmacro compat pixel-scroll cua-base advice autorevert
filenotify pcase server ox-man ox-odt rng-loc rng-uri rng-parse
rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok
nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii
ox-publish ox org-attach org-element org-persist org-id org-refile
org-element-ast inline org ob ob-tangle ob-ref ob-lob ob-table org-macro
org-src sh-script treesit executable ob-comint org-pcomplete pcomplete
org-list org-footnote org-faces org-entities time-date org-version
ob-emacs-lisp org-table org-keys org-loaddefs find-func cal-menu
calendar cal-loaddefs avl-tree generator ol oc ob-exp ob-core org-cycle
org-fold org-fold-core org-compat ob-eval org-macs format-spec
hide-mode-line org-present visual-fill-column sml-mode compile
text-property-search comint ansi-osc ansi-color ring smie proof-general
totp hexl gnutls puny bindat markdown-mode rx color thingatpt noutline
outline csv-mode sort cl-extra help-mode use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core finder-inf csv-mode-autoloads exwm-autoloads
hide-mode-line-autoloads markdown-mode-autoloads org-present-autoloads
info proof-general-autoloads proof-site proof-autoloads
sml-mode-autoloads totp-autoloads visual-fill-column-autoloads
xelb-autoloads package browse-url xdg url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt
gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process tty-child-frames emacs)

Memory information:
((conses 16 561181 53214) (symbols 48 44667 1) (strings 32 194210 2237)
 (string-bytes 1 4770369) (vectors 16 78918) (vector-slots 8 712653 11540)
 (floats 8 531 77) (intervals 56 466 0) (buffers 984 15))