Emacs Asked on November 10, 2021
After upgrading my OS (Ubuntu, from 18.04 to 19.04), my favorite text editor was automatically upgraded from Emacs 25 to Emacs 26. I then encountered a familiar error message at start-up:
File is missing: Cannot open load file, No such file or directory, color-theme
The relevant portion of my configuration file, .emacs
, is the
following:
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(add-to-list 'load-path "/path/to/color-theme.el/file")
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-subtle-hacker)))
This works fine with emacs 25 or earlier versions, under Ubuntu
18.04. Naturally, the relevant file, color-theme-subtle-hacker.el
is
located in ~/.emacs.d/themes/
.
I imagine that there are at least two possible solutions to this problem:
(i) There is a way to “tell” Emacs 26 where is the relevant
color-theme package. The problem could, in fact, be due to the
OS upgrade.
(ii) I could also force Ubuntu 19.04 to use Emacs 25. However, I would have
to install it manually, since every attempt at installing Emacs
currently leads to version 26.
Thanks for your help. I have found one solution to this problem. It was sufficient to download the color-theme.el
and the color-theme-library.el
and to copy them in ~/.emacs.d/themes/
. Together with the simplified code in one's .emacs
file eliminate all errors at start-up.
(add-to-list 'load-path "~/.emacs.d/themes/")
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-subtle-hacker)))
Thanks to @Drew, @lawlist, @InHarmsWay and @Stefan for your help. It seems that the files from the emacs-goodies
package weren't accessible by my .emacs
file, after upgrading to the latest Ubuntu distribution.
Answered by Nicomachus on November 10, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP