Jason-S-Ross / ox-context

An Org Mode export backend for ConTeXt
13 stars 4 forks source link

No such file or directory: context #31

Closed xeruf closed 2 years ago

xeruf commented 2 years ago

I have two computers with a synchronised Doom Emacs configuration, the AUR context package installed to /usr/share/context and TEXMF set to that, I have ran updates and restarts on both, but it remains - on one it runs fine, on the other I get the following error on startup with --debug-init:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "context")
  require(context)
  eval-buffer(#<buffer  *load*-823938> nil "/home/janek/.local/state/emacs/straight/build-27.2/ox-context/ox-context.el" nil t)  ; Reading at buffer position 11098
xeruf commented 2 years ago

Nevermind, after an update of doom packages on the other machine the issue is now there as well...

Jason-S-Ross commented 2 years ago

Not familiar with TEXMF. Is that an environment variable used by texlive? Regardless, this problem is occurring because Emacs doesn't have the same shell environment as your terminal. The path to the ConTeXt executable needs to be in Emacs' exec-path.

xeruf commented 2 years ago

Yes, but TEXMF is only used by context internally, so that shouldn't matter here actually.

❯ which context
/usr/bin/context

Emacs exec-path includes /usr/bin. It is really weird that it used to work about one or two weeks ago though, and only broke after I ran doom sync -u... What could I do to debug this?

xeruf commented 2 years ago

M-! (shell-command) and then typing context works fine, too:

image
xeruf commented 2 years ago

So, if I modify the package to remove (require 'context) everything works fine...

Jason-S-Ross commented 2 years ago

I should have read the error message more carefully. Since the context package is only used to call context-mode when displaying the export buffer, there's no need for the entire package to depend on it. 19b2b37 checks if context-mode is defined before trying to call it.

xeruf commented 2 years ago

yes, just found out the same as well - you should add in the readme that auctex is recommended but not required ;)