catppuccin/emacs

Install Instructions Causes Error

Closed this issue · 10 comments

OS: Arch
PKM: pacman
emacs Version: 28.2

Steps to Reproduce

Uninstall any preexisting emacs install and files
sudo pacman -R emacs
sudo rm -r ~/.emacs.d
sudo rm ~/.emacs

Install emacs
sudo pacman -S emacs

Make emacs init file
touch ~/.emacs.d/init.el

Edit init file

;; Adds melpa package access
(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
  (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)

;; Adds path to custom themes
;; Found some other posts saying this might help, doesn’t seem to be causing any errors
(add-to-list 'custom-theme-load-path "~/.emacs.d/elpa/")

;; loads the preferred theme (must be installed already)                                                
(load-theme catppuccin :no-confirm)

Launch emacs

Refresh package list
M-x package-refresh-contents or M-x package-list-packages

Install catppuccin-theme package
M-x package-install catppuccin-theme

Restart emacs

ERROR:

Warning (initialization): An error occurred while loading ‘/home/linuxbox/.emacs.d/init.el’:

Symbol's value as variable is void: catppuccin

I can use M-x customize-theme and select catppuccin, but the result is the blue colors in the attached image.
565BF03A-5FE9-4AFC-9F48-89B2AE03BC9E

I have made sure my terminal (tmux) and emacs are outputting in 256 colors

UPDATE: I’ve kept tweaking and have managed to get a slightly different error.

My init.el looks like this now.

;; Adds melpa package access                                                                          
(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
  (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)

;; enables mouse mode                                                                                 
(xterm-mouse-mode 1)

;; Adds path to custom themes                                                                         
(add-to-list 'custom-theme-load-path "~/.emacs.d/elpa/catppuccin-theme-20230711.1235")

;; loads the preferred theme (must be installed already)                                              
(require 'catppuccin))
(load-theme catppuccin :no-confirm)

The error is now:

Warning (initialization): An error occurred while loading ‘/home/linuxbox/.emacs.d/init.el’:

File is missing: Cannot open load file, No such file or directory, catppuccin

@the-arkhive It's not in the install instructions but the piece you're missing may be (require 'catppuccin-theme).

I did try that at one point and forgot to mention it. Clearly some theme is being loaded automatically on launch, and according to the customize-theme command the one being loaded is Catppuccin, but that’s yielding the blue colors. When I disable it the colors seem to match the catppuccin tmux theme, which just seems very backwards. I’ve attached a short screencast to hopefully make it clearer.

IMG_0415.MOV

My init.el looks like:

;; Adds melpa package access
(require 'package)
(add-to-list 'package-archives
     '("melpa" . "https://melpa.org/packages/") t)
(when (< emacs-major-version 24)
     (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)

;; enables mouse mode
(xterm-mouse-mode 1)

;; Adds path to custom themes
(add-to-list 'custom-theme-load-path "/home/linuxbox/.emacs.d/elpa/")

;; loads the preferred theme (must be installed already)
(require 'catppuccin-theme)
(load-theme 'catppuccin :no-confirm)

I get no errors when launching emacs with this config, only the incorrect colors.

This looks like you're using terminal Emacs. Is that the case?

Ah yes, is this for the GUI version?

Im unsure, It should support terminal emacs? Can you try it in GUI emacs?

Heyo! just checking if this issue is still active?

Heyo! just checking if this issue is still active?

Hey, sorry. I've ended up mostly using Vim at the moment. I can check, but I wasn't really planning on using the gui version. Sorry to keep you hanging.

Heyo! just checking if this issue is still active?

Hey, sorry. I've ended up mostly using Vim at the moment. I can check, but I wasn't really planning on using the gui version. Sorry to keep you hanging.

No, worries! It's my fault tbh for the few month late reply 😃. If you could check that'd be great to see if its a TUI only issue or GUI too

Closing as inactive