rougier / nano-emacs

GNU Emacs / N Λ N O - Emacs made simple
GNU General Public License v3.0
2.5k stars 191 forks source link

init file and error message #117

Closed gregbunch closed 2 years ago

gregbunch commented 2 years ago

Nicolas: I deleted Prelude this morning. And installed a clean version of plain vanilla.

This is what's in my init.el ;; --------------------------------------------------------------------- ;; Gnu Emacs / N Λ N O - Emacs made simple ;; Copyright (C) 2020 - N Λ N O developers ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see http://www.gnu.org/licenses/. ;; --------------------------------------------------------------------- (package-initialize)

;; ---- ;; Elpa / Melpa configuration (setq package-archives '(("melpa" . "https://melpa.org/packages/") ("gnu" . "http://elpa.gnu.org/packages/"))) (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) (add-to-list 'custom-theme-load-path (expand-file-name "lisp" user-emacs-directory))

;; Nano theme (require 'nano-theme) (nano-mode) (nano-light)

;; Nano modeline (require 'nano-modeline) (nano-modeline-mode) ;; ----

;; Path to nano emacs modules (mandatory) (add-to-list 'load-path "/Users/rougier/Documents/GitHub/nano-emacs") (add-to-list 'load-path ".")

;; Default layout (optional) (require 'nano-layout)

;; Theming Command line options (this will cancel warning messages) (add-to-list 'command-switch-alist '("-dark" . (lambda (args)))) (add-to-list 'command-switch-alist '("-light" . (lambda (args)))) (add-to-list 'command-switch-alist '("-default" . (lambda (args)))) (add-to-list 'command-switch-alist '("-no-splash" . (lambda (args)))) (add-to-list 'command-switch-alist '("-no-help" . (lambda (args)))) (add-to-list 'command-switch-alist '("-compact" . (lambda (args))))

(cond ((member "-default" command-line-args) t) ((member "-dark" command-line-args) (require 'nano-theme-dark)) (t (require 'nano-theme-light)))

;; Customize support for 'emacs -q' (Optional) ;; You can enable customizations by creating the nano-custom.el file ;; with e.g. touch nano-custom.el in the folder containing this file. (let* ((this-file (or load-file-name (buffer-file-name))) (this-dir (file-name-directory this-file)) (custom-path (concat this-dir "nano-custom.el"))) (when (and (eq nil user-init-file) (eq nil custom-file) (file-exists-p custom-path)) (setq user-init-file this-file) (setq custom-file custom-path) (load custom-file)))

;; Theme (require 'nano-faces) (nano-faces)

(require 'nano-theme) (nano-theme)

;; Nano default settings (optional) (require 'nano-defaults)

;; Nano session saving (optional) (require 'nano-session)

;; Nano header & mode lines (optional) (require 'nano-modeline)

;; Nano key bindings modification (optional) (require 'nano-bindings)

;; Compact layout (need to be loaded after nano-modeline) (when (member "-compact" command-line-args) (require 'nano-compact))

;; Nano counsel configuration (optional) ;; Needs "counsel" package to be installed (M-x: package-install) ;; (require 'nano-counsel)

;; Welcome message (optional) (let ((inhibit-message t)) (message "Welcome to GNU Emacs / N Λ N O edition") (message (format "Initialization time: %s" (emacs-init-time))))

;; Splash (optional) (unless (member "-no-splash" command-line-args) (require 'nano-splash))

;; Help (optional) (unless (member "-no-help" command-line-args) (require 'nano-help))

(provide 'nano)

gregbunch commented 2 years ago

Here's the message I get when I load emacs

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

File is missing: Cannot open load file, No such file or directory, nano-layout

To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘--debug-init’ option to view a complete error backtrace.

gregbunch commented 2 years ago

When I launch using nano-emacs % emacs -q -l nano.el

everything works correctly

rougier commented 2 years ago

Sorry for long delay. Best would be to use the nano-modeline and nano-theme available from ELPA. Did you install them?

gregbunch commented 2 years ago

Finally got Nano to work. It makes me so happy when it loads!