* new flymake: cosmetic problem on terminal emacs
@ 2017-10-21 14:42 Yuta Yamada
2017-10-22 22:29 ` João Távora
0 siblings, 1 reply; 4+ messages in thread
From: Yuta Yamada @ 2017-10-21 14:42 UTC (permalink / raw
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 663 bytes --]
In terminal Emacs, I found not highlight state of flymake even there is a
warning.
It can be visible if you set underline to the flymake's face.
How to reproduce:
1. cd emacs repo to ./lisp/progmode/
2. open js.el: $ emacs -Q -nw
4. M-x flymake-mode
3. goto-line 240 or 568 at js.el
(there is warning around here, basically putting a space before end of
the line
cause similar warning in docstring)
5. you can check it by flymake-goto-next-error, but it isn't visible.
Not sure this is related, flycheck highlight previous word with the same
error.
(checked on Emacs-26 branch and pulled 75bb482. This time I used bootstrap
option)
Thanks,
Yuta Yamada
[-- Attachment #2: Type: text/html, Size: 994 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: new flymake: cosmetic problem on terminal emacs
2017-10-21 14:42 new flymake: cosmetic problem on terminal emacs Yuta Yamada
@ 2017-10-22 22:29 ` João Távora
2017-10-23 12:49 ` Stefan Monnier
2017-10-24 10:55 ` Yuta Yamada
0 siblings, 2 replies; 4+ messages in thread
From: João Távora @ 2017-10-22 22:29 UTC (permalink / raw
To: Yuta Yamada; +Cc: emacs-devel
Yuta Yamada <sleepboy.zzz@gmail.com> writes:
> In terminal Emacs, I found not highlight state of flymake even there is a warning.
> It can be visible if you set underline to the flymake's face.
Since Flymake can now highlight arbitrary regions, some of those regions
can be mere whitespace, which is the case with the
elisp-flymake-checkdoc backend.
The offending code is this (repeated in flymake-warning and flymake-note)
(defface flymake-error
'((((supports :underline (:style wave)))
:underline (:style wave :color "Red1"))
(t
:inherit error))
"Face used for marking error regions."
:version "24.4")
Clearly your terminal doesn't support the first clause, and the second
one is unsuitable for whitespace.
The simplest thing I can think of that keeps some of the "genericness"
of the last clause is adding ":inverse-video t" to it. If noone can
think of anything better, I will push this patch in some days' time. I
tried it and it looks reasonably OK.
João
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 9c546fd966..7738d608e9 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -281,6 +281,7 @@ flymake-error
'((((supports :underline (:style wave)))
:underline (:style wave :color "Red1"))
(t
+ :inverse-video t
:inherit error))
"Face used for marking error regions."
:version "24.4")
@@ -289,6 +290,7 @@ flymake-warning
'((((supports :underline (:style wave)))
:underline (:style wave :color "deep sky blue"))
(t
+ :inverse-video t
:inherit warning))
"Face used for marking warning regions."
:version "24.4")
@@ -297,6 +299,7 @@ flymake-note
'((((supports :underline (:style wave)))
:underline (:style wave :color "yellow green"))
(t
+ :inverse-video t
:inherit warning))
"Face used for marking note regions."
:version "26.1")
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: new flymake: cosmetic problem on terminal emacs
2017-10-22 22:29 ` João Távora
@ 2017-10-23 12:49 ` Stefan Monnier
2017-10-24 10:55 ` Yuta Yamada
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2017-10-23 12:49 UTC (permalink / raw
To: emacs-devel
> @@ -281,6 +281,7 @@ flymake-error
> '((((supports :underline (:style wave)))
> :underline (:style wave :color "Red1"))
> (t
> + :inverse-video t
> :inherit error))
> "Face used for marking error regions."
> :version "24.4")
FWIW, as a mere datapoint, I wouldn't like a "inverse-video
red/orange/green" to highlight errors/warnings/info so I'd customize
these by unsetting the `inverse-video` flag (and living with the
occasional case where I don't see the error because it only applies to
all-whitespace text).
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: new flymake: cosmetic problem on terminal emacs
2017-10-22 22:29 ` João Távora
2017-10-23 12:49 ` Stefan Monnier
@ 2017-10-24 10:55 ` Yuta Yamada
1 sibling, 0 replies; 4+ messages in thread
From: Yuta Yamada @ 2017-10-24 10:55 UTC (permalink / raw
To: João Távora, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 2427 bytes --]
For me, I just realized iverse-video is kinda visual noise to see code and
I could move the error point flymake-goto-next-error, so
as my personal config, I would avoid the inverse-video's configuration.
But thanks João for taking your time
On Sun, Oct 22, 2017 at 3:29 PM, João Távora <joaotavora@gmail.com> wrote:
> Yuta Yamada <sleepboy.zzz@gmail.com> writes:
>
> > In terminal Emacs, I found not highlight state of flymake even there is
> a warning.
> > It can be visible if you set underline to the flymake's face.
>
> Since Flymake can now highlight arbitrary regions, some of those regions
> can be mere whitespace, which is the case with the
> elisp-flymake-checkdoc backend.
>
> The offending code is this (repeated in flymake-warning and flymake-note)
>
> (defface flymake-error
> '((((supports :underline (:style wave)))
> :underline (:style wave :color "Red1"))
> (t
> :inherit error))
> "Face used for marking error regions."
> :version "24.4")
>
> Clearly your terminal doesn't support the first clause, and the second
> one is unsuitable for whitespace.
>
> The simplest thing I can think of that keeps some of the "genericness"
> of the last clause is adding ":inverse-video t" to it. If noone can
> think of anything better, I will push this patch in some days' time. I
> tried it and it looks reasonably OK.
>
> João
>
> diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
> index 9c546fd966..7738d608e9 100644
> --- a/lisp/progmodes/flymake.el
> +++ b/lisp/progmodes/flymake.el
> @@ -281,6 +281,7 @@ flymake-error
> '((((supports :underline (:style wave)))
> :underline (:style wave :color "Red1"))
> (t
> + :inverse-video t
> :inherit error))
> "Face used for marking error regions."
> :version "24.4")
> @@ -289,6 +290,7 @@ flymake-warning
> '((((supports :underline (:style wave)))
> :underline (:style wave :color "deep sky blue"))
> (t
> + :inverse-video t
> :inherit warning))
> "Face used for marking warning regions."
> :version "24.4")
> @@ -297,6 +299,7 @@ flymake-note
> '((((supports :underline (:style wave)))
> :underline (:style wave :color "yellow green"))
> (t
> + :inverse-video t
> :inherit warning))
> "Face used for marking note regions."
> :version "26.1")
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 3322 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-24 10:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-21 14:42 new flymake: cosmetic problem on terminal emacs Yuta Yamada
2017-10-22 22:29 ` João Távora
2017-10-23 12:49 ` Stefan Monnier
2017-10-24 10:55 ` Yuta Yamada
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.