Subject: bug#50173: 27.1; M-x notmuch fails with 'Invalid read syntax: "#"'

From: Charles-André Roy <[email-masked]>
Date: Mon, 23 Aug 2021 14:31:45 -0400

Hello,

I tried to answer your email but I think I filed another bug instead.
First time doing bug report and difficulty managing emails without
notmuch in emacs.

1.
I did do M-x recover-this-file on bookmarks.  The file is empty;  I do
not use bookmarks.  I think I pressed the wrong keys once and probably
added some hidden bytes in it.

2.
With debug-on-error non-nil the backtrace is the following :

M-x notmuch

Debugger entered--Lisp error: (invalid-read-syntax "#")
  read(#<buffer  *load*>)
  eval-buffer(#<buffer  *load*> nil "/home/charles/.notmuch-config" nil t)  ; Reading at buffer position 2
  load-with-code-conversion("/home/charles/.notmuch-config" "/home/charles/.notmuch-config" t t)
  load("~/.notmuch-config" t t nil t)
  byte-code("\303\20\304\305!\210\11\203\22\0\306\n\307\211\310\307%\210\310\207" [mail-user-agent init-file-user notmuch-init-file notmuch-user-agent provide notmuch load t nil] 6)
  autoload-do-load((autoload "notmuch" "notmuch mail" t nil) notmuch)
  command-execute(notmuch record)
  execute-extended-command(nil "notmuch")
  smex-read-and-run(("customize" "notmuch" "recover-this-file" "man" "battery" "shell" "dired-quick-sort" "eshell" "nomPrenom" "spam" "lbdb" "olivetti-mode" "widen" "locate" "replace-string" "emojify-mode" "count-matches" "info" "séparateur" "eww" "calendar" "query-replace" "emms" "Info-menu" "package-list-packages" "now" "org-sort" "goto-char" "lisp-interaction-mode" "car--nettoyerFicheCarnetAdresses" "sudoku" "abbrev-mode" "sunrise-sunset" "insert-kbd-macro" "tramp-unload-tramp" "pdf-tools-customize" "org-element-update-syntax" "suiviPortions" "transient-mark-mode" "variable-pitch-mode" "term" "dired" "compile" "bookmark-set" "lunar-phases" "epa-list-keys" "list-packages" "2C-two-columns" "pdf-tools-help" "dired-next-line" ...))
  smex()
  funcall-interactively(smex)
  call-interactively(smex nil nil)
  command-execute(smex)

3.
emacs -Q

I am not at all familiar with emacs -Q and could not find documentation
on it.

In a terminal, if I put emacs -Q, an emacs session is started.

M-x notmuch produces the message [No match] in the Minibuffer.

Thank you !

Charles

On Mon, 23 Aug 2021 19:37:19 +0300, Eli Zaretskii <[email-masked]> wrote:
> > From: Charles-André Roy <[email-masked]>
> > Date: Mon, 23 Aug 2021 12:01:45 -0400
> > 
> > 
> > After having installed Debian 11 Bullseye, I tried to lauch Notmuch with
> > 
> > M-x notmuch
> > 
> > The following message appeared in the mini-buffer :
> > 
> > Invalid read syntax: "#"
> > 
> > and the processing of the command stopped.
> 
> Please set debug-on-error non-nil, repeat the recipe, and post the
> backtrace.
> 
> Also, I see this error message in your session:
> 
>   bookmarks has auto save data; consider M-x recover-this-file
>   Error: (error "File not in bookmark format: /home/charles/.emacs.d/bookmarks")
> 
> Could this be related?
> 
> Thanks.
>