rougier / nano-emacs

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

Install with straight.el #43

Closed Linuus closed 3 years ago

Linuus commented 3 years ago

I tried to install with straight.el but I'm not sure how to... Maybe someone has successfully installed it with straight?

What I've tried is:

  (use-package nano-emacs
    :straight (:host github :repo "rougier/nano-emacs")
    :demand t)

Which gives the error:

error: nano-writer.el:0:0: error: scan-error: (Unbalanced parentheses 2898 4298)

I assume I'm just doing something wrong here.... maybe someone can point me in the right direction?

rougier commented 3 years ago

There was a missing paren in the mode. I've just fixed it, can you give a retry?

Linuus commented 3 years ago

Sure. It looks like I'm getting a bit further now at least!

With this:

  (use-package nano-emacs
    :straight (:host github :repo "rougier/nano-emacs")
    :demand t
    :config
    (nano-faces)
    (nano-theme))

I get Error (use-package): Cannot load nano-emacs though. I've tried to get some more debug info but to no success 🤔 Will try more a bit later.

Linuus commented 3 years ago

Ah it tries to load a a package named nano-emacs but there is no such file. I’ll just remove the demand and require the files manually. It should work :)

bakirtzisg commented 3 years ago

@Linuus Could you post a full solution? This is my current problem with trying straight and NΛNO. See https://github.com/rougier/nano-emacs/issues/37

Linuus commented 3 years ago

I changed my mind and kept doom-nord instead, but something like this:

  (use-package nano-emacs
    :straight (:host github :repo "rougier/nano-emacs")
    :config
    (require 'nano-faces)
    (require '....)
    (nano-faces))

I think you need to require stuff in the correct order etc. or it might not work.

WillPower3309 commented 3 years ago

Anyone looking for this still, here is what I do:

(straight-use-package
 '(nano-emacs :type git :host github :repo "rougier/nano-emacs"))

from here, just paste the nano.el contents below. My personal config is as follows:

(straight-use-package
 '(nano-emacs :type git :host github :repo "rougier/nano-emacs"))

(require 'nano-theme-dark)

(require 'nano-faces)
(nano-faces)

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

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

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

(require 'nano-splash)
rougier commented 3 years ago

Maybe this should go to the README or an INSTALL file. Anyone willing to make a PR?

WillPower3309 commented 3 years ago

Maybe this should go to the README or an INSTALL file. Anyone willing to make a PR?

I can! It works seamlessly with a couple of caveats that are important to note

caleb commented 1 year ago

I got nano working with use-package.... the issue was that the package name was just nano and not nano-emacs

wunki commented 1 year ago

In the end, this is what I ended up doing:

(use-package nano-emacs
  :demand
  :no-require t
  :straight (:host github :repo "rougier/nano-emacs")
  :defines (nano-font-family-monospaced nano-font-size)
  :config
  (setq nano-font-family-monospaced "Berkeley Mono")
  (setq nano-font-size 14)
  (require 'nano))