I'm trying to reduce startup time for emacs, so naturally emacsclient could be a solution.
Before creating a plist and automatically load emacs at launch I'm trying to see if my configs work.
I start from terminal `emacs --deamon` and after i call `emacsclient -c`
https://imgur.com/h6P7xDw
This is what the emacsclient window shows: https://imgur.com/ct3j1yG
This is what the emacs started normally (from terminal `emacs`): shows https://imgur.com/6kNC8DI
this is the `*Messages*` buffer for emacsclient:
Loading /Users/elvisrossi/.emacs.d/config.el (source)...
[yas] Prepared just-in-time loading of snippets successfully. [2 times]
Loading /Users/elvisrossi/.emacs.d/config.el (source)...done
Loaded ~/.emacs.d/config.el
Turning on magit-auto-revert-mode...done
Starting Emacs daemon.
Unable to load color "brightblack"
Unable to load color "brightcyan"
Unable to load color "brightblack" [2 times]
Unable to load color "unspecified-bg"
Unable to load color "brightblack" [4 times]
Unable to load color "brightcyan"
Unable to load color "brightblack" [2 times]
Unable to load color "unspecified-bg"
Unable to load color "brightblack" [4 times]
When done with this frame, type C-x 5 0
Error during redisplay: (eval (spaceline-ml-main)) signaled (wrong-number-of-arguments (3 . 4) 0)
Error during redisplay: (eval (centaur-tabs-line)) signaled (wrong-type-argument stringp nil)
Unable to load color "brightcyan" [2 times]
Error during redisplay: (eval (centaur-tabs-line)) signaled (wrong-type-argument stringp nil) [197 times]
Error during redisplay: (eval (spaceline-ml-main)) signaled (wrong-number-of-arguments (3 . 4) 0)
Error during redisplay: (eval (centaur-tabs-line)) signaled (wrong-type-argument stringp nil)
The last two lines are repeated a bunch of times.
In my `.init.el`I have:
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 27)
(package-initialize))
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(unless (package-installed-p 'nord-theme)
(package-refresh-contents)
(package-install 'nord-theme))
;; add to path
(add-to-list 'load-path (concat user-emacs-directory "lisp"))
;; sync PATH to shell PATH when started from gui
(defun set-exec-path-from-shell-PATH ()
(interactive)
(let ((path-from-shell (replace-regexp-in-string
"[ \t\n]*$" "" (shell-command-to-string
"$SHELL --login -c 'echo $PATH'"
))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(set-exec-path-from-shell-PATH)
;;;;;;;;;;;;;;;;;;;;;;;;;
;; use config.org file as source
(org-babel-load-file (concat user-emacs-directory "config.org"))
and after custom-set-variables.
Any help is appreciated