nlinum font face affected by latest solaire mode
Closed this issue · 19 comments
@hlissner, I just update my packages, including solaire-mode
(on of my favorites :-))
However, I had a trouble with MELPA so I reinstalled it and I can now observe a strange behavior: for buffers with solaire mode, nlinum
font face is not respected anymore.
However, I can't be sure solaire-mode
is involved, but it is the first idea that comes through my mind.
This problem in doom-themes (a regression from a recent update), which is fixed as of doomemacs/themes@9b7296f. Reopen this if the problem persists. Thanks for letting me know!
Sorry, but the problem persists.
First I tried to update doom-themes
from melpa but no new version is available.
Second, I applied the diff manually, with no success ...
All I have in my setup is:
(setq nlinum-format "%d ")
(setq nlinum-highlight-current-line t)
Are you using doom-one or doom-vibrant?
doom-one
as shown on the screenshot. I applied the patch to
doom-themes-common.el
doom-one-theme.el
Any clue why it's not been built on MELPA ?
It's been finally built built on Melpa.
The changes you mention on doomemacs/themes@9b7296f are effectively here.
- It works on my MacBook Pro
- It does'nt work on my Mac Pro
Very strange ...
Melpa builds occur 4 hours apart (last I checked), so probably a simple case of bad timing.
I'll do some testing on my own macs over the weekend and see what I find.
Same here — I've just updated to latest develop
from spacemacs and did rm -rf elpa/
to update everything. My package configuration looks like this:
(use-package doom-themes
:init
(load-theme 'doom-one)
(require 'solaire-mode)
;; brighten buffers (that represent real files)
(add-hook 'after-change-major-mode-hook #'turn-on-solaire-mode)
;; ...if you use auto-revert-mode:
(add-hook 'after-revert-hook #'turn-on-solaire-mode)
;; You can do similar with the minibuffer when it is activated:
(add-hook 'minibuffer-setup-hook #'solaire-mode-in-minibuffer)
;; To enable solaire-mode unconditionally for certain modes:
(add-hook 'ediff-prepare-buffer-hook #'solaire-mode)
;; When persp-mode loads a perspective from file, it doesn't restore solaire-mode:
(advice-add #'persp-load-state-from-file :after #'solaire-mode-restore-persp-mode-buffers)
(set-face-attribute 'mode-line-inactive nil :box nil)
(set-face-attribute 'mode-line nil :box nil))
(provide 'package-doom-theme)
HTH
@jwintz Do you have anything specific in mind? I haven't put it online yet.. so, regarding line number it's nothing special I guess:
dotspacemacs-line-numbers 'relative
and
nlinum-format "%4d \u2502"
nlinum-highlight-current-line t
(custom-set-faces
...
'(nlinum-current-line ((t (:foreground "#98be65" :weight normal))))
Sorry, I was thinking of operating system, emacs version, package tool etc.
Also does it render like the screenshot above ?
Ah of course — SPC h I
says:
System Info 💻
- OS: darwin
- Emacs: 26.0.50
- Spacemacs: 0.200.9
- Spacemacs branch: develop (rev. 98ff30f4)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: ivy
- Layers:
(html
(clojure :variables clojure-enable-fancify-symbols t)
(colors :variables colors-enable-rainbow-mode t)
elm emacs-lisp git github
(ivy :variables ivy-wrap t ivy-virtual-abbreviate 'full ivy-extra-directories nil)
nlinum markdown osx
(shell :variables shell-default-shell 'multi-term shell-default-height 30 shell-default-position 'bottom shell-default-full-span nil)
(spell-checking :variables spell-checking-enable-by-default nil spell-checking-enable-auto-dictionary t)
search-engine spacemacs-layouts syntax-checking
(version-control :variables version-control-global-margin t version-control-diff-tool 'git-gutter+)
yaml
(auto-completion :variables auto-completion-enable-snippets-in-popup t auto-completion-enable-sort-by-usage t auto-completion-private-snippets-directory "~/.spacemacs.d/snippets" auto-completion-enable-help-tooltip nil)
aj-javascript)
I'm on a MacBook Pro (Retina, 15-inch, Mid 2015)
with OSX Sierra 10.12.6 (16G29)
.
And yes, it looks the same:
So it’s a brew install —HEAD
, what options ? Which Formulae ?
Works fine on my MacBook Pro (Retina, 15-inch, Mid 2016) with OSX High Sierra beta 4
.
Only have the issue on my Mac Pro (late 2011), OSX High Sierra beat $
as well.
I did that before reporting on this issue — here's the log:
brew install emacs-plus --HEAD
==> Installing emacs-plus from d12frosted/emacs-plus
==> Using the sandbox
==> Cloning https://github.com/emacs-mirror/emacs.git
Cloning into '/Users/sschubert/Library/Caches/Homebrew/emacs-plus--git'...
remote: Counting objects: 3934, done.
remote: Compressing objects: 100% (3650/3650), done.
remote: Total 3934 (delta 290), reused 1107 (delta 200), pack-reused 0
Receiving objects: 100% (3934/3934), 38.89 MiB | 241.00 KiB/s, done.
Resolving deltas: 100% (290/290), done.
==> Checking out branch master
==> Downloading https://gist.githubusercontent.com/aatxe/260261daf70865fbf1749095de9172c5/raw/214b50c62450be1cbee9f11c
######################################################################## 100.0%
==> Patching
==> Applying patch-multicolor-font.diff
patching file src/macfont.m
Hunk #1 succeeded at 2358 (offset -15 lines).
==> ./autogen.sh
==> ./configure --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Ce
==> make
==> make install
######################################################################## 100.0%
==> Caveats
To have launchd start d12frosted/emacs-plus/emacs-plus now and restart at login:
brew services start d12frosted/emacs-plus/emacs-plus
Or, if you don't want/need a background service you can just run:
emacs
==> Summary
🍺 /usr/local/Cellar/emacs-plus/HEAD-b6b362c_1: 3,960 files, 122.7MB, built in 13 minutes 19 seconds
I second, when deactivating solaire-mode
, line numbers show just fine.
The following fixes it:
19c19
< ;; `soliare-mode' is inspired by editors who visually distinguish code-editing
---
> ;; `solaire-mode' is inspired by editors who visually distinguish code-editing
64,69d63
< (defface solaire-line-number-face
< `((t (:inherit ,(if (boundp 'display-line-numbers) 'line-number 'linum))))
< "Alternative face for `line-number' (native line numbers in Emacs 26+) and
< `linum'."
< :group 'solaire-mode)
<
106,107d99
< (linum solaire-line-number-face)
< (line-number solaire-line-number-face)
I do not quite understand why line numbers are taken care of here. Also, note the typo in the header.
Do you mind a PR ?
Solaire handles the line number faces for themes whose line number faces have a :background
property. doom-one doesn't do this, so it is unnecessary for it, but it may be necessary for others.
Therefore I've added the solaire-mode-remap-line-numbers
variable (which default to nil
). solaire-mode no longer remaps the line number faces by default, unless this variable is non-nil.
So your issue should be resolved. Let me know if it isn't.
Awesome, I'll let you know.
Works fine.