svg-mode-line-themes icon indicating copy to clipboard operation
svg-mode-line-themes copied to clipboard

Don't enable when SVG is not available?

Open jasonm23 opened this issue 9 years ago • 9 comments

jasonm23 avatar Apr 24 '15 23:04 jasonm23

So, perhaps use (unless (image-type-available-p 'svg) (error "No SVG support")) to avoid enabling, and throw an error?

jasonm23 avatar Apr 25 '15 11:04 jasonm23

Adding a PR for this now

jasonm23 avatar Apr 25 '15 12:04 jasonm23

Fixed

sabof avatar Apr 25 '15 20:04 sabof

Note that because using a non-default theme is going to be done after an smt/enable it's necessary to return-from a smt/set-theme to avoid the user having a blank modeline in a non-svg env.

e.g. Normal use.

(smt/enable)
(smt/set-theme 'my-theme-called-whatever)

I'll add a PR for this later.

jasonm23 avatar Apr 26 '15 08:04 jasonm23

Isn't "diesel" the default theme?

sabof avatar Apr 26 '15 14:04 sabof

For the future when there are many themes available and people do not use a default.

We have to also return-from a set-theme when svg isn't available.

jasonm23 avatar Apr 26 '15 23:04 jasonm23

Basically there is currently no way for a user to end up with a blank mode line.

SVG support --> all fine
No SVG support --> can't enable --> all fine

sabof avatar Apr 27 '15 00:04 sabof

I tried it, got blank mode line. I'll get some notes on this when I arrive at work (commuting now)

jasonm23 avatar Apr 27 '15 01:04 jasonm23

Seems easy to reproduce the blank line situation under (apparently) default example config from the readme. Just start with, e.g. emacs -nw

lashtear avatar Jun 21 '16 05:06 lashtear