emacs icon indicating copy to clipboard operation
emacs copied to clipboard

Install Instructions Causes Error

Open the-arkhive opened this issue 1 year ago • 9 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

the-arkhive avatar Jul 29 '23 02:07 the-arkhive

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 avatar Jul 29 '23 03:07 the-arkhive

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

byronclark avatar Aug 04 '23 01:08 byronclark

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.

https://github.com/catppuccin/emacs/assets/8617450/e0443a5c-6e0b-4150-a7ee-8c952a147b16

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.

the-arkhive avatar Aug 11 '23 21:08 the-arkhive

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

KaranAhlawat avatar Aug 15 '23 03:08 KaranAhlawat

Ah yes, is this for the GUI version?

the-arkhive avatar Aug 17 '23 19:08 the-arkhive

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

NamesCode avatar Aug 26 '23 12:08 NamesCode

Heyo! just checking if this issue is still active?

NamesCode avatar Oct 11 '23 13:10 NamesCode

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.

the-arkhive avatar Oct 16 '23 18:10 the-arkhive

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

NamesCode avatar Oct 24 '23 08:10 NamesCode

Closing as inactive

NamesCode avatar Jun 04 '24 19:06 NamesCode