New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize the `FlyC` portion of the default mode line status #879

Closed
tzz opened this Issue Feb 17, 2016 · 8 comments

Comments

Projects
None yet
3 participants
@tzz
Contributor

tzz commented Feb 17, 2016

Currently the FlyC is hard-coded in flycheck-mode-line-status-text

It would be nice if it was a defcustom string variable instead.

I can provide a patch if you wish, it's a trivial change. Thanks!

@cpitclaudel

This comment has been minimized.

Member

cpitclaudel commented Feb 17, 2016

I'll defer to @lunaryorn on this :) My personal preference would be to refactor flycheck-mode-line-status-text so that it becomes just (concat "FlyC " (some-new-fancy-function)); then it would be easy to change the "FlyC" part by customizing flycheck-mode-line

@tzz

This comment has been minimized.

Contributor

tzz commented Feb 17, 2016

I think a string variable for just the "lighter" is much easier for the user to customize than a function or a format string, so ideally it would be just that. But if it's a format string that's still OK for me. Thanks.

@lunaryorn

This comment has been minimized.

Contributor

lunaryorn commented Feb 17, 2016

I understand that it's important to customise the general status reporting—hence the indicator itself is customisable—but I must admit that I can't for the life of me understand why anyone would bother to customise four(!) tiny letters in the mode line. I believe that only a small minority of users would even be aware of this option at all—in my experience most aren't even aware that the mode line provides information at all.

Hence I'm not particularly in favour of adding yet another option for what is a very small and—in my opinion—very very unimportant thing. From my experience with user interface design I believe there's no use and even harm in making every single piece of a UI customisable, and I feel confirmed by a cursory look at the "market": Find me a major piece of software were you can go so far as to customise individual status line texts with options. You can have too many options as well, you know…

I would rather leave customisation of the mode line to extensions (like https://github.com/liblit/flycheck-status-emoji) that provide an user interface and experience that's different in more than just four letters.

However, this issue has been raised repeatedly, and thus I'm willing to depart from my opinion and my previous decisions on this feature (see #597 for instance). I would accept a pull request, but I must admit that I'm unwilling to spent a lot of time reviewing and merging the change.

Should you choose to open a pull request I'd like to ask you to open a complete and mostly flawless one which includes documentation and Buttercup tests right from the beginning.

Please understand that this is just my personal choice; I'm simply not willing to spent a lot of time on this tiny thing.

@tzz

This comment has been minimized.

Contributor

tzz commented Feb 17, 2016

@lunaryorn I think customization is an important part of the Emacs experience. The mode line, in particular, is a very information-dense place so it's helpful to reduce that complexity. For Flycheck I would probably use a Unicode circled-F that takes 1 character instead of 4. To me that makes a positive difference, and I understand I'm not necessarily your target audience.

I know of a few other Emacs modes that allow customizing the "lighter": company-lighter-base, eldoc-minor-mode-string. There may be more, I don't know.

Regarding https://github.com/liblit/flycheck-status-emoji I'm not wild about their single-character approach that focuses on a few expected states but not on customizing the whole appearance. This is, of course, my preference again.

Given your disposition towards this feature (sorry I didn't notice #597), I'd rather not occupy you with my personal preferences and create future maintenance headaches for the Flycheck maintainers. I'm especially unwilling to produce the perfect pull request because that's a great opportunity to annoy you again...

So I'll just customize flycheck-mode-line-status-text for myself to do a regex replace or something. Thanks again.

@tzz tzz closed this Feb 17, 2016

@tzz

This comment has been minimized.

Contributor

tzz commented Feb 17, 2016

For future generations' reference, here's how I solved this to my satisfaction:

    (setq flycheck-mode-line '(:eval (replace-regexp-in-string
                                      "FlyC" "𝓕"
                                      (flycheck-mode-line-status-text))))
@lunaryorn

This comment has been minimized.

Contributor

lunaryorn commented Feb 17, 2016

@tzz I'm sorry; I went too far in the wrong direction with my comment. I'm very sorry to have put you off, and I hope that you accept my apology.

It's just that I have opinions about Flycheck as well—in this case I believe that it's a useless option—and that it sometimes takes too long—four issues in this case—for me to understand and accept that I myself might have been wrong.

As I said, I'm willing to depart from #597, and my disposition has changed now.

Please do open a pull request, and please do forget what I said about it in my last comment. I went over the line with my onerous requirements, and I'm sorry that I offended you. I promise that I'll review you pull request, no matter how complete or perfect it is.

Please, do add this option to Flycheck ☺️

@tzz

This comment has been minimized.

Contributor

tzz commented Feb 17, 2016

@lunaryorn I really wasn't offended! I absolutely respect your right to keep Flycheck small and consistent, and my goal was just to scratch my own itch.

I attempted the change in #880 and I hope it's all right. I can add the missing pieces (docs etc.) but had to start somewhere...

@tzz

This comment has been minimized.

Contributor

tzz commented Feb 17, 2016

Nice, thanks for the help and patience guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment