daviwil / emacs-from-scratch

An example of a fully custom Emacs configuration developed live on YouTube!
https://youtube.com/c/SystemCrafters
1.76k stars 307 forks source link

"No such file or directory" "org-tempo" #25

Open gh4dp opened 3 years ago

gh4dp commented 3 years ago

I did following: (1) cloned repo - renamed to .emacs.d/ (2) Loaded missing fonts : cantarell and fonts-firacode

then I ran into this - I am not sure how to fix it:

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "org-tempo") require(org-tempo) eval-buffer(#<buffer load> nil "/home/user1/.emacs.d/init.el" nil t) ; Reading at buffer position 12352 load-with-code-conversion("/home/user1/.emacs.d/init.el" "/home/user1/.emacs.d/init.el" t t) load("/home/user1/.emacs.d/init" t t)

f(compiled-function () #<bytecode 0x1e0f4d>)()

command-line() normal-top-level()

sr105 commented 3 years ago

The problem is that you have org installed, but not from the org repo. Run list-packages and install org-mode from org. Maybe there's a way to tell use-package to install the correct one from the start.

daviwil commented 3 years ago

@sr105 is correct, I've run into this issue inconsistently when setting it up on machines. Even using :pin org in the use-package expression doesn't seem to fix it. Manually installing it via M-x package-install will definitely help to ensure that you're using the latest version.

sr105 commented 3 years ago

Maybe some lisp is in order to handle this the first time. Perhaps something to see if org is installed and from the correctly named "org" repository. I use something similar for all-the-icons fonts since I want to be able to run the config on a new machine and have it just work.

  (defun aorst/font-installed-p (font-name)
    "Check if font with FONT-NAME is available."
    (find-font (font-spec :name font-name)))

  ;; Install all-the-icons fonts if needed. Doom modeline uses them.
  (use-package all-the-icons
    :config
    (when (and (window-system)      ; Install fonts if missing
               (not (aorst/font-installed-p "all-the-icons")))
      (all-the-icons-install-fonts t)))
valsen commented 3 years ago

I have the same problem but as a total noob I haven't been able to succeed with the suggested solutions. There is no org-mode or org option in the list returned by package-install. However, using list-packages I can scroll down and see that org is already installed from org archive.

UPDATE: Manually installing emacs 27.1 seems to have done the trick. I'm on Ubuntu 20.04, and using apt install emacs only gave me version 26.3 as well as org 9.1.9. After installing emacs 27.1 from source I now have org 9.3, and no more errors.