unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Cannot Start Notmuch (invalid-read-syntax "#")
@ 2021-09-13  1:37 Charles-André Roy
  2021-09-13 11:45 ` David Bremner
  0 siblings, 1 reply; 9+ messages in thread
From: Charles-André Roy @ 2021-09-13  1:37 UTC (permalink / raw)
  To: notmuch

Hi,

I am using Debian.  I recently installed Bullseye with Emacs 27.1.  Now
I cannot start Notmuch in emacs anymore.  I can download my mail and
send them.  The commands in the terminal work as usual.

At first I would open the .notmuch-config file and make a little change
in the buffer than cancel that change and save the file and Notmuch
would start.  Now it does not start anymore.

I also have a problem with "cl library deprecated" but judging from my
searches on the Web this would be a different issue.

I tried changing the coding system of .notmuch-config but that did not
change the situation.

In my .emacs file I moved up the line

(autoload 'notmuch "notmuch" "notmuch mail" t)

close to the beginning but there was no change.

Any suggestions ?


Charles




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(("notmuch" "byte-compile-file" "package-delete" "list-packages" "man" "shell" "package-list-packages" "eshell" "nomPrenom" "spam" "battery" "olivetti-mode" "lbdb" "locate" "widen" "replace-string" "info" "emojify-mode" "count-matches" "séparateur" "eww" "calendar" "query-replace" "emms" "Info-menu" "now" "org-sort" "goto-char" "lisp-interaction-mode" "car--nettoyerFicheCarnetAdresses" "abbrev-mode" "sunrise-sunset" "insert-kbd-macro" "tramp-unload-tramp" "pdf-tools-customize" "org-element-update-syntax" "customize" "suiviPortions" "package-autoremove" "transient-mark-mode" "variable-pitch-mode" "term" "dired" "compile" "bookmark-set" "lunar-phases" "bookmark-save" "epa-list-keys" "2C-two-columns" "pdf-tools-help" ...))
  smex()
  funcall-interactively(smex)
  call-interactively(smex nil nil)
  command-execute(smex)

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Cannot Start Notmuch (invalid-read-syntax "#")
@ 2021-09-13 15:43 Charles-André Roy
  2021-09-13 16:50 ` David Bremner
  0 siblings, 1 reply; 9+ messages in thread
From: Charles-André Roy @ 2021-09-13 15:43 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

Hello David,

Thank you for your responses !

1. I looked at the load-path variable and the $HOME directory per se is
not in it.  There are many directories in $HOME/.emacs.d leading to
packages I have installed.

2. I installed notmuch-emacs through the Debian packages
apt list gives notmuch-emacs/now 0.28.4-1 all  [installé, local]
apt list also gives notmuch/stable,now 0.31.4-2 amd64  [installé]

3. After an updatedb I did a locate command and there is no
.notmuch-config.el file on my system.

4. Here is the backtrace of the M-notmuch command with smex turned off.
It is shorter.

==============================

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" "notmuch")
  funcall-interactively(execute-extended-command nil "notmuch" "notmuch")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

==============================

Regards,


Charles


Date: Mon, 13 Sep 2021 08:51:04 -0300
\fheader}
\fbody{
\fpart{ ID: 1, Content-type: text/plain
David Bremner <david@tethera.net> writes:

>> 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)
>
> The emacs function load is for lisp files. $HOME/.notmuch-config is an
> INI style config file, which does indeed have many '#' in it by
> default. Why emacs is trying to run .notmuch-config as lisp is currently
> a mystery to me.

Oh, I might know what is happening. notmuch-emacs is trying to load
.notmuch-config.el, and you (maybe?) have $HOME in your emacs load-path.
I guess I would pretty strongly recommmend not having $HOME in your
emacs load-path (at least I just end up with random files in my $HOME).
If it's important to you to have $HOME in your load-path, you can use
the XDG location for your config file: put it in
$HOME/.config/notmuch/default/config.

d

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Cannot Start Notmuch (invalid-read-syntax "#")
@ 2021-09-13 19:43 Charles-André Roy
  2021-09-13 21:32 ` Tomi Ollila
  0 siblings, 1 reply; 9+ messages in thread
From: Charles-André Roy @ 2021-09-13 19:43 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

Hello David,

I have removed and purged the notmuch-emacs package.

elpa-notmuch/stable,now 0.31.4-2 was already installed.

On the notmuchmail.org Web site, I looked at the pages "Notmuch Emacs
Interface" and "Tips and Tricks".  The only configuration file mentioned
on these pages is ~/.emacs.d/notmuch-config.el

And I agree with you that the backtrace reports a Lisp reading error. I
created an empty ~/.emacs.d/notmuch-config.el, tried to start Notmuch
and it WORKED.  I could see the beautiful notmuch-hello screen again.

I wanted to make sure it was a steady fix.  I closed all my opened Emacs
and started them again.  On the first try I got the same *Backtrace*.
On the second try it worked.  So the fix does not seem too stable.

In one session, does Notmuch en Emacs first try to look at the file in
~/.  On another try, does it skip that step and go directly to the
programme ?  That would also explain why some time ago a small
change in the file made a difference.  The change in the file would not have made the difference but
the second try would.  I wonder ?

I am wondering also how come I did not have a the
~/.emacs.d/notmuch-config.el Notmuch is trying to read.

In trying to solve the problem I deleted the ~/.notmuch-config file.
Notmuch produced the message that it was not setup.  I did the command
"notmuch setup" in a terminal.  It created again the config file that
starts with the character # and placed it in ~/.

C-h a did not show any setup command inside Emacs, how is the
notmuch-config.el file created and what goes in it ?  Is it what I put
about Notmuch in my .emacs file ?

Thank you !


Charles





David Bremner <david@tethera.net> (Today 12:50) (inbox unread)
Subject: Re: Cannot Start Notmuch (invalid-read-syntax "#")
From: David Bremner <david@tethera.net>
To: Charles-André Roy <caroy47@videotron.ca>
Cc: notmuch@notmuchmail.org
Date: Mon, 13 Sep 2021 13:50:22 -0300
\fheader}
\fbody{
\fpart{ ID: 1, Content-type: text/plain
Charles-André Roy <caroy47@videotron.ca> writes:

> Hello David,
>
> Thank you for your responses !
>
> 1. I looked at the load-path variable and the $HOME directory per se is
> not in it.  There are many directories in $HOME/.emacs.d leading to
> packages I have installed.
>
> 2. I installed notmuch-emacs through the Debian packages
> apt list gives notmuch-emacs/now 0.28.4-1 all  [installé, local]

That is quite old (from buster I guess?). Can you try elpa-notmuch 0.31.4-2
from bullseye?  That version you have of notmuch-emacs should be a dummy package
depending on elpa-notmuch, so safe to remove.

> apt list also gives notmuch/stable,now 0.31.4-2 amd64  [installé]\r

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-14 14:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13  1:37 Cannot Start Notmuch (invalid-read-syntax "#") Charles-André Roy
2021-09-13 11:45 ` David Bremner
2021-09-13 11:51   ` David Bremner
  -- strict thread matches above, loose matches on Subject: below --
2021-09-13 15:43 Charles-André Roy
2021-09-13 16:50 ` David Bremner
2021-09-13 19:43 Charles-André Roy
2021-09-13 21:32 ` Tomi Ollila
2021-09-14 12:16   ` David Bremner
2021-09-14 14:47     ` Charles-André Roy

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).