I can trigger it reliably using the following skeleton init.el: (setq savehist-autosave-interval 10) (savehist-mode) (setq epg-pinentry-mode 'loopback) Visiting a test.gpg file and afterwards encrypting it symmetrically gives the following error: Debugger entered--Lisp error: (wrong-type-argument listp t) savehist-save(t) savehist-autosave() apply(savehist-autosave nil) timer-event-handler([t 23821 9812 623801 10 savehist-autosave nil nil 712000]) read-string("Confirm password: " nil t nil) read-passwd("Confirm password: " nil nil) read-passwd("Passphrase for symmetric encryption for /home/drot..." t) epa-passphrase-callback-function(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/drot/test.gpg") :progress-callback (epa-progress-callback-function . "Encrypting /home/drot/test.gpg") :edit-callback nil :signers nil :sig-notations nil :process # :output-file "/tmp/epg-outputk8NwaR" :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #) SYM "/home/drot/test.gpg") epa-file-passphrase-callback-function(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/drot/test.gpg") :progress-callback (epa-progress-callback-function . "Encrypting /home/drot/test.gpg") :edit-callback nil :signers nil :sig-notations nil :process # :output-file "/tmp/epg-outputk8NwaR" :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #) SYM "/home/drot/test.gpg") epg--status-GET_HIDDEN(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/drot/test.gpg") :progress-callback (epa-progress-callback-function . "Encrypting /home/drot/test.gpg") :edit-callback nil :signers nil :sig-notations nil :process # :output-file "/tmp/epg-outputk8NwaR" :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #) "passphrase.enter") epg--process-filter(# "[GNUPG:] INQUIRE_MAXLEN 100\n[GNUPG:] GET_HIDDEN pa...") accept-process-output(# 1) epg-wait-for-status(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/drot/test.gpg") :progress-callback (epa-progress-callback-function . "Encrypting /home/drot/test.gpg") :edit-callback nil :signers nil :sig-notations nil :process # :output-file "/tmp/epg-outputk8NwaR" :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #) ("BEGIN_ENCRYPTION")) epg-start-encrypt(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/drot/test.gpg") :progress-callback (epa-progress-callback-function . "Encrypting /home/drot/test.gpg") :edit-callback nil :signers nil :sig-notations nil :process # :output-file "/tmp/epg-outputk8NwaR" :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #) #s(epg-data :file nil :string "hello") nil nil nil) epg-encrypt-string(#s(epg-context :protocol OpenPGP :program "/usr/bin/gpg2" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/home/drot/test.gpg") :progress-callback (epa-progress-callback-function . "Encrypting /home/drot/test.gpg") :edit-callback nil :signers nil :sig-notations nil :process # :output-file "/tmp/epg-outputk8NwaR" :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #) "hello" nil) epa-file-write-region(nil nil "/home/drot/test.gpg" nil t "~/test.gpg" nil) apply(epa-file-write-region (nil nil "/home/drot/test.gpg" nil t "~/test.gpg" nil)) epa-file-handler(write-region nil nil "/home/drot/test.gpg" nil t "~/test.gpg" nil) write-region(nil nil "/home/drot/test.gpg" nil t "~/test.gpg") basic-save-buffer-2() basic-save-buffer-1() basic-save-buffer(t) save-buffer(1) funcall-interactively(save-buffer 1) call-interactively(save-buffer nil nil) command-execute(save-buffer) Attempting to quit Emacs after that gives the following error: Debugger entered--Lisp error: (wrong-type-argument listp t) savehist-save(t) savehist-autosave() kill-emacs() save-buffers-kill-emacs(nil) save-buffers-kill-terminal(nil) funcall-interactively(save-buffers-kill-terminal nil) call-interactively(save-buffers-kill-terminal nil nil) command-execute(save-buffers-kill-terminal) These errors start to happen every time there's a minibuffer prompt for GPG decryption. In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2019-06-21 built on lambda Repository revision: 869cf5cbc0721bbe9e4df557f4ed3633fb13c05f Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Debian GNU/Linux 10 (buster)