tmalsburg/tango-plus-theme

Colors in the last update

proofit404 opened this issue · 8 comments

Hello. Thanks for nice theme!

I have some questions related to the last update. Here is a picture how it was before:
tango-plus-theme-2
And here is a picture how it is now:
tango-plus-theme-1
I don't know if this changes are made by intention or occasionally. You can see following:

  • doc strings looks like comments
  • module names looks like strings
  • &optional keyword looks like function names

Is it looks how it should be?
P.S. Don't you think comments face is hard to read?

Hi, thanks for your feedback.

doc strings looks like comments

Yes, this was on purpose because docstrings, though strings, are functionally more like comments. As such, I wanted them to be clearly distinguished from code.

module names looks like strings

Not just module names but all constants. I can't remember when I made this change in my local version but the idea must have been to make all constants brown regardless of whether they are sting constants or other types of constants. The trouble is that emacs is fairly inconsistent regarding its use of font-lock-constant-face. For example, it's not used for numerical constants and for symbols it's only used under specific circumstances. E.g. compare

(require 'test)

and

(funcall 'test)

Not sure what the best solution would be. We can argue about whether non-string constants should look like strings but I think there is an independent issue relating to Emacs' use of font-lock-constant-face.

&optional keyword looks like function names

I agree that this doesn't make sense but I don't know how to fix that because Emacs uses font-lock-type-face for &optional although this is not a type. So if I change the style of font-lock-type-face, this will break other things. In my opinion, this is a problem in Emacs, which should use font-lock-keyword-face for &optional because a keyword is what it is.

That make sense. Thanks.

If you have a suggestion for improvements, let me know. You may also consider to raise the issue regarding module names and &optional in the emacs mailing list.

I can't remember when I made this change in my local version but the idea must have been to make all constants brown regardless of whether they are sting constants or other types of constants.

That doesn't sound great to me. In general, editors and themes prefer to distinguish between different types of constants when they can. Emacs uses very few faces already, there's no need to conflate them further.

You may also consider to raise the issue regarding module names and &optional in the emacs mailing list.

Shouldn't that be something to do first? First change the major modes, then change the theme.

I think there is an independent issue relating to Emacs' use of font-lock-constant-face

Which is?

What I said earlier: that Emacs (more precisely elisp mode) is using font-lock-constant-face inconsistently, i.e., for some constants but not others.

I'll send a response to your other comment later.

(Sent from my cell phone.)

On Oct 19, 2016, at 12:53 AM, Dmitry Gutov notifications@github.com wrote:

I think there is an independent issue relating to Emacs' use of font-lock-constant-face

Which is?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

In general, editors and themes prefer to distinguish between different types of constants when they can.

Yes, I agree. But do we need yet another theme that does the same? The reason why I created this theme was that none of the existing themes did what I wanted, which is consistent semantic marking. (see https://github.com/tmalsburg/tango-plus-theme#design-principles). Another goal was to use color sparingly. We can argue about the best way to achieve these goals but I won't argue about the goals themselves.

Shouldn't that be something to do first? First change the major modes, then change the theme.

Yes, absolutely. I think designing good themes would be much easier if the font-lock faces were used more consistently.

But do we need yet another theme that does the same?

With its own palette? Sure we do. I only like a few themes, and this one has been at the top until now. Of course, I'm always free to fork and rename, so in the end you should do what you feel like is best.

that Emacs (more precisely elisp mode) is using font-lock-constant-face inconsistently, i.e., for some constants but not others

I don't see the problem. Yes, there are different kinds of constants, and differentiating strings is very common. You could just as well argue that using different colors for different expressions, or different tokens, is also bad.

Though I can see the problem you were trying to fix: previously, keywords and constants used the same color. Not sure what to suggest as an alternative. Maybe use the same color as font-lock-builtin-face?