Re: Cannot Start Notmuch (invalid-read-syntax "#")
On Mon, Sep 13 2021, Charles-André Roy wrote: > 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 ? The notmuch-config.el file is created by user; if it exists, notmuch emacs mua loads it. The following defines it (no notmuch.el) (defcustom notmuch-init-file (locate-user-emacs-file "notmuch-config") ...) In this case (locate-user-emacs-file new-file) tries to look notmuch-config files in user-emacs-directory (being ~/.emacs.d by default). As an example: when I tried: (locate-user-emacs-file ".zshrc") emacs printed "~/.emacs.d/.zshrc". ... anyway, whatever the user-emacs-directory is defined the combination of it and "notmuch-config" cannot resolve to ~/.notmuch-config... (I tried: (setq user-emacs-directory ".") (locate-user-emacs-file "zshrc") output was "~/zshrc" -- no . there) At the end of notmuch.el notmuch-config.el is attempted to be read with (when init-file-user ; don't load init file if the -q option was used. (load notmuch-init-file t t nil t)) load defined as: (load FILE NOERROR NOMESSAGE NOSUFFIX MUST-SUFFIX) which, if I understand(*) correctly, wants the .el or .elc suffix (*) and understood correctly, 2014-03-29 when I added this feature The purpose of notmuch-config.el is to put notmuch emacs configuration so that only those instances of emacs that load notmuch will configure. Also, notmuch-config.el is loaded *after* notmuch is loaded (so one can e.g. overwrite functions (which I have done...)). Tomi > > Thank you ! > > > Charles ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Cannot Start Notmuch (invalid-read-syntax "#")
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 (Today 12:50) (inbox unread) Subject: Re: Cannot Start Notmuch (invalid-read-syntax "#") From: David Bremner To: Charles-André Roy Cc: notmuch@notmuchmail.org Date: Mon, 13 Sep 2021 13:50:22 -0300 header} body{ part{ ID: 1, Content-type: text/plain Charles-André Roy 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é] ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Cannot Start Notmuch (invalid-read-syntax "#")
Charles-André Roy 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é] ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Cannot Start Notmuch (invalid-read-syntax "#")
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(#) eval-buffer(# 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 header} body{ part{ ID: 1, Content-type: text/plain David Bremner writes: >> Debugger entered--Lisp error: (invalid-read-syntax "#") >> read(#) >> eval-buffer(# 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 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Cannot Start Notmuch (invalid-read-syntax "#")
David Bremner writes: >> Debugger entered--Lisp error: (invalid-read-syntax "#") >> read(#) >> eval-buffer(# 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 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Cannot Start Notmuch (invalid-read-syntax "#")
Charles-André Roy writes: > 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. How is notmuch installed? Have you installed both CLI and emacs front-end from source? > I also have a problem with "cl library deprecated" but judging from my > searches on the Web this would be a different issue. I don't think those messages are notmuch related, since (current) notmuch uses cl the "modern" way by requiring cl-lib. One possibility is old .elc files. > Debugger entered--Lisp error: (invalid-read-syntax "#") > read(#) > eval-buffer(# 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. > > 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) To narrow things down, can you try without smex? It's probably not the issue, but it might simplify the backtrace. David ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Cannot Start Notmuch (invalid-read-syntax "#")
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(#) eval-buffer(# 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) ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org