GNU bug report logs - #80063
31.0.50; End of file during parsing does not report a file name

Previous Next

Package: emacs;

Reported by: Christoph Göttschkes <christoph.goettschkes <at> posteo.net>

Date: Tue, 23 Dec 2025 14:02:02 UTC

Severity: normal

Found in version 31.0.50

To reply to this bug, email your comments to 80063 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#80063; Package emacs. (Tue, 23 Dec 2025 14:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christoph Göttschkes <christoph.goettschkes <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 23 Dec 2025 14:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christoph Göttschkes <christoph.goettschkes <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; End of file during parsing does not report a file name
Date: Tue, 23 Dec 2025 12:54:03 +0000
During startup, if a file is loaded using `load' and that file has a
missing ), such that the parser reports an end of file during parsing,
the error message does not indicate which file was loaded.  Since during
startup, a lot of files might get loaded, it can be very difficult to
figure out which file contained the error.

Have two files, 'test-init.el' and 'test.el'.
test-init.el:

;;; test-init.el -*- coding: utf-8; lexical-binding: t; -*-
(load "~/test.el")

test.el:

;;; test.el -*- coding: utf-8; lexical-binding: t; -*-
(defun testing ()


Starting Emacs via emacs -Q -l test-init.el shows the error message:
End of file during parsing: #<killed buffer>
Also works with emacs -Q -l test.el, but not sure if that uses the same
`load' function or not, hence I created this setup which tries to
replicate my init procedure.  It happened to me, when loading my real
init.el, which happens to load an abbrev file using `load'.


In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.51, cairo version 1.18.4) of 2025-12-22 built on marilyn
Repository revision: 998584eaad44bbfcc898ab86891bfa1137ae0396
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101021
System Description: Arch Linux

Configured using:
 'configure --with-cairo --with-harfbuzz --without-modules
 --with-x-toolkit=gtk3 --with-xft --with-sound=alsa --with-imagemagick
 --with-mailutils --with-tree-sitter --with-small-ja-dic
 --without-compress-install --with-native-compilation=aot
 --prefix=/opt/emacs 'CFLAGS=-mtune=native -march=native -O2 -g3 -pipe
 -fomit-frame-pointer --param=ssp-buffer-size=4 -fno-plt'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,--sort-common,--as-needed,-z,relro,-z,now'

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

Important settings:
  value of $LC_COLLATE: C
  value of $LC_TIME: en_DK.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Elisp/d

Minor modes in effect:
  global-evil-collection-unimpaired-mode: t
  evil-collection-unimpaired-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  which-key-mode: t
  evil-mode: t
  evil-local-mode: t
  vertico-multiform-mode: t
  vertico-mode: t
  marginalia-mode: t
  global-ligature-mode: t
  ligature-mode: t
  delete-selection-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  electric-pair-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  flymake-mode: t
  display-fill-column-indicator-mode: t
  origami-mode: t
  flyspell-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  savehist-mode: t
  save-place-mode: t
  recentf-mode: t
  minibuffer-electric-default-mode: t
  minibuffer-depth-indicate-mode: t
  global-hl-line-mode: t
  completion-preview-mode: t
  global-corfu-mode: t
  corfu-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  minibuffer-nonselected-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow sort display-line-numbers company-oddmuse company-keywords
company-etags etags fileloop generator evil-collection-xref xref
company-gtags company-dabbrev-code company-dabbrev company-files
company-clang company-capf company-cmake company-semantic
company-template company-bbdb evil-collection-company company mail-extr
evil-collection-notmuch notmuch notmuch-tree notmuch-jump notmuch-hello
notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message
notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company
notmuch-parser notmuch-wash coolj goto-addr icalendar diary-lib
diary-loaddefs evil-collection-calendar cal-menu calendar cal-loaddefs
notmuch-tag notmuch-lib notmuch-compat mm-view mml-smime smime gnutls
dig evil-collection-vc-git vc-git evil-collection-diff-mode diff-mode
track-changes files-x vc-dispatcher evil-collection-consult consult
evil-collection-bookmark +bookmark bookmark emacsbug message yank-media
puny evil-collection-dired dired-hide-dotfiles dired-quick-sort hydra lv
ls-lisp +dired dired dired-loaddefs rfc822 mml mml-sec
evil-collection-epa epa derived epg rfc6068 epg-config gnus-util
mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils evil-collection-shortdoc shortdoc mule-util help-fns
evil-collection-outline noutline outline autoinsert vertico-directory
vertico-sort time evil-collection-unimpaired evil-collection-with-editor
evil-collection-which-key evil-collection-vertico
evil-collection-tabulated-list evil-collection-tab-bar
evil-collection-simple evil-collection-replace
evil-collection-process-menu evil-collection-package-menu
evil-collection-minibuffer evil-collection-kmacro evil-collection-indent
evil-collection-flymake evil-collection-elisp-mode evil-collection-eldoc
evil-collection-custom evil-collection-corfu evil-collection-compile
evil-collection-comint evil-collection-buff-menu evil-collection
annalist evil-surround which-key evil-easymotion +evil evil
evil-integration evil-maps evil-commands reveal evil-jumps
evil-command-window evil-types evil-search evil-ex evil-macros
evil-repeat evil-states evil-core evil-common rect evil-vars
vertico-multiform vertico +marginalia marginalia ligature delsel hi-lock
cape elec-pair checkdoc lisp-mnt undo-tree diff queue flymake project
compile text-property-search thingatpt display-fill-column-indicator
origami origami-parsers cl dash flyspell ispell magit-autorevert
autorevert filenotify magit-process with-editor shell pcomplete comint
ansi-osc server ansi-color magit-mode transient pcase edmacro kmacro
benchmark magit-git magit-base magit-section format-spec cursor-sensor
crm llama cond-let savehist saveplace recentf tree-widget minibuf-eldef
mb-depth hl-line completion-preview corfu +elisp-mode +yasnippet +abbrev
yasnippet s face-remap modus-themes orderless compat +mode-line +window
finder-inf my-utils +loaddefs delight comp comp-cstr cl-extra help-mode
comp-run comp-common rx general info adoc-mode-autoloads
all-the-icons-autoloads better-jumper-autoloads cape-autoloads
cmake-mode-autoloads consult-eglot-autoloads corfu-terminal-autoloads
corfu-autoloads dape-autoloads delight-autoloads
dired-hide-dotfiles-autoloads dired-narrow-autoloads
dired-open-autoloads dired-hacks-utils-autoloads
dired-quick-sort-autoloads dune-autoloads elpy-autoloads
company-autoloads embark-consult-autoloads consult-autoloads
embark-autoloads evil-collection-autoloads annalist-autoloads
evil-easymotion-autoloads evil-mc-autoloads evil-org-autoloads
evil-surround-autoloads evil-autoloads expand-region-autoloads
flyspell-correct-autoloads free-keys-autoloads fzf-autoloads
general-autoloads ggtags-autoloads git-modes-autoloads go-mode-autoloads
goto-chg-autoloads gruber-darker-theme-autoloads gruvbox-theme-autoloads
autothemer-autoloads highlight-indentation-autoloads htmlize-autoloads
i3wm-config-mode-autoloads imenu-list-autoloads
jenkinsfile-mode-autoloads groovy-mode-autoloads json-mode-autoloads
keycast-autoloads ligature-autoloads link-hint-autoloads
marginalia-autoloads naysayer-theme-autoloads notmuch-autoloads
orderless-autoloads org-roam-autoloads emacsql-autoloads
origami-autoloads pcache-autoloads popon-autoloads pos-tip-autoloads
pyvenv-autoloads rg-autoloads rustic-autoloads markdown-mode-autoloads
f-autoloads rust-mode-autoloads sexy-monochrome-theme-autoloads
sly-autoloads solarized-theme-autoloads spinner-autoloads
standard-themes-autoloads modus-themes-autoloads
string-inflection-autoloads toml-mode-autoloads treemacs-magit-autoloads
magit-autoloads magit-section-autoloads llama-autoloads
cond-let-autoloads treemacs-persp-autoloads persp-mode-autoloads
treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads
hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads
avy-autoloads s-autoloads dash-autoloads undo-tree-autoloads
queue-autoloads utop-autoloads tuareg-autoloads caml-autoloads
vertico-autoloads wgrep-autoloads with-editor-autoloads
xterm-color-autoloads yaml-mode-autoloads yasnippet-capf-autoloads
yasnippet-autoloads zenburn-theme-autoloads zig-mode-autoloads
reformatter-autoloads use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core cus-edit pp cus-load wid-edit time-date warnings ring
radix-tree 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 native-compile emacs)

Memory information:
((conses 16 874016 561654) (symbols 48 43447 12)
 (strings 32 245512 13586) (string-bytes 1 7421273) (vectors 16 63981)
 (vector-slots 8 937366 112675) (floats 8 280 6783)
 (intervals 56 2146 604) (buffers 1064 17))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#80063; Package emacs. (Tue, 23 Dec 2025 15:41:01 GMT) Full text and rfc822 format available.

Message #8 received at 80063 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Christoph Göttschkes <christoph.goettschkes <at> posteo.net>
Cc: 80063 <at> debbugs.gnu.org
Subject: Re: bug#80063: 31.0.50;
 End of file during parsing does not report a file name
Date: Tue, 23 Dec 2025 17:39:53 +0200
> From: Christoph Göttschkes <christoph.goettschkes <at> posteo.net>
> Date: Tue, 23 Dec 2025 12:54:03 +0000
> 
> 
> During startup, if a file is loaded using `load' and that file has a
> missing ), such that the parser reports an end of file during parsing,
> the error message does not indicate which file was loaded.  Since during
> startup, a lot of files might get loaded, it can be very difficult to
> figure out which file contained the error.
> 
> Have two files, 'test-init.el' and 'test.el'.
> test-init.el:
> 
> ;;; test-init.el -*- coding: utf-8; lexical-binding: t; -*-
> (load "~/test.el")
> 
> test.el:
> 
> ;;; test.el -*- coding: utf-8; lexical-binding: t; -*-
> (defun testing ()
> 
> 
> Starting Emacs via emacs -Q -l test-init.el shows the error message:
> End of file during parsing: #<killed buffer>
> Also works with emacs -Q -l test.el, but not sure if that uses the same
> `load' function or not, hence I created this setup which tries to
> replicate my init procedure.  It happened to me, when loading my real
> init.el, which happens to load an abbrev file using `load'.

When I perform this experiment with my real init file, I get a
*Warnings* buffer shown to me saying

  End of file during parsing: #<killed buffer>

  To ensure normal operation, you should investigate and remove the
  cause of the error in your initialization file.  Start Emacs with
  the ‘--debug-init’ option to view a complete error backtrace.

And if I then invoke Emacs with --debug-init, I get a detailed
*Backtrace* buffer with a full Lisp backtrace which tells me which
file was loaded that signaled the error.  Does that work for you?

We added the --debug-init command-line option precisely for this
purpose.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#80063; Package emacs. (Tue, 23 Dec 2025 20:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 80063 <at> debbugs.gnu.org (full text, mbox):

From: Christoph Göttschkes <christoph.goettschkes <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 80063 <at> debbugs.gnu.org
Subject: Re: bug#80063: 31.0.50; End of file during parsing does not report
 a file name
Date: Tue, 23 Dec 2025 20:04:26 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

> When I perform this experiment with my real init file, I get a
> *Warnings* buffer shown to me saying
>
>   End of file during parsing: #<killed buffer>
>
>   To ensure normal operation, you should investigate and remove the
>   cause of the error in your initialization file.  Start Emacs with
>   the ‘--debug-init’ option to view a complete error backtrace.
>
> And if I then invoke Emacs with --debug-init, I get a detailed
> *Backtrace* buffer with a full Lisp backtrace which tells me which
> file was loaded that signaled the error.  Does that work for you?
>
> We added the --debug-init command-line option precisely for this
> purpose.

When I try it with a real .emacs.d/init.el setup, I see what you are
saying.  It seems you have to use `use-package' (maybe setting
`abbrev-file-name' with something like `custom-set-variable' is also
good enough) and the error has to be in an abbrev file.  Maybe it also
happens in other places, but that was my setup.  Here is a way you
should hopefully be able to reproduce it, which replicates my real
init.el:

Create an init.el:

;;; init.el -*- coding: utf-8; lexical-binding: t -*-
(use-package abbrev
  :ensure nil
  :custom
  (abbrev-file-name "~/.emacs.d/test.el"))

and a test.el:

(define-abbrev-table 'new-abbrev-table
  '(()
  "A new abbrev table")

and early-init.el:

;;; early-init.el -*- coding: utf-8; lexical-binding: t -*-
(setq inhibit-x-resources t)

With this setup, I don't get any warnings buffer or a debugger when
running with --debug-init.  The early-init.el is not needed (works
without it in emacs -nw), but Emacs doesn't like my .Xresources.




This bug report was last modified 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.