tecosaur / emacs-config

My configuration for Doom Emacs. Mirror of https://git.tecosaur.net/tec/emacs-config.
MIT License
1.04k stars 119 forks source link

Cannot find pdftotext file or directory #42

Closed JxJxxJxJ closed 1 year ago

JxJxxJxJ commented 1 year ago

After a clean install (Only change made was removing the snippet from #40) and doom sync without errors, it was not until restarting emacs with SPC q R the following error appeared asking for pdftotext:

Warning (initialization): An error occurred while loading ‘/home/jx/.emacs.d/.local/etc/@/init.28.elc’:

Error caused by user's config or system: /home/jx/.config/doom/config.el, (file-missing Cannot open load file No existe el fichero o el directorio pdftotext)

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. Disable showing Disable logging

Then I saw that it was installed as a local repo and the ~/.config/doom/lisp/pdftotext lisp folder was empty.

I tried cloning this repo into this folder but after doom sync and restarting emacs the error is still there.

Doom doctor gives no output about it (which makes me thing it's not that bad?).

Currently, ~/.config/doom directory structure looks like this: https://pastebin.com/tyT8cWRa (only change was ~/.config/doom/lisp/pdftotext).

I suspect that, given this snippet of code:

+begin_src emacs-lisp :tangle (if (executable-find "pdftotext") "packages.el" "no")

(package! pdftotext :recipe (:local-repo "lisp/pdftotext"))

+end_src

It's trying to install it from lisp/pdftotext but somehow it doesn't see the files?

Edit: Config loads successfully after SPC h r r even though it gives the following Warning (initialization):

Warning (initialization): An error occurred while loading ‘/home/jx/.emacs.d/.local/etc/@/init.28.elc’:

Error caused by user's config or system: /home/jx/.config/doom/config.el, (wrong-type-argument consp nil)

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. Disable showing Disable logging

Running emacs --debug-init opens a buffer with the following output: https://pastebin.com/4ajsu6Je

Commenting out the whole Language configuration -> PDF -> Terminal viewing module lets do doom/reload and SPC q Rto start a new emacs session without any errors nor warnings (which is awesome :smile: ).

Just in case I redid emacs --debug-init to check things out and this was the output: https://pastebin.com/64Bujzzb.

Notice how there re only two problems: with beamer and latex exports. I don't know how important they are, guess I'll see in the future.

Edit: It is not until I modify and SPC h r r the config that (even though it finishes with "Config successfully reloaded!" the following minibuffer appears:

Warning (initialization): An error occurred while loading ‘/home/jx/.emacs.d/.local/etc/@/init.28.elc’:

Error caused by user's config or system: /home/jx/.config/doom/config.el, (wrong-type-argument consp nil)

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. Disable showing Disable logging

Might I disable the showing / logging? Would it be problematic?

tecosaur commented 1 year ago

Yea, this looks like a failure to clone/initialise the submodules properly.