unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31921: 26.1.50; Add a convenient way to get flymake error at point
@ 2018-06-21  5:45 Carlos Pita
  2018-06-21  5:54 ` Carlos Pita
  0 siblings, 1 reply; 6+ messages in thread
From: Carlos Pita @ 2018-06-21  5:45 UTC (permalink / raw)
  To: 31921

Currently flymake gives a visual hint of an error location but to get the
message of that error you need either to:

1. Move the mouse over the error location and wait for a tooltip to
appear.

2. Move the point before (after) the error location and use the commands
to get the next (previous) error.

Now 2 is clearly not ideal since it forces the user to locate the point in
non-intuitive positions (intuitive position = where the error
highlighting is) and to type long commands.

At first sight 1 seems to address this fact but, hey, the mouse?
A tooltip delay? It's nice to have it but a standard keybinding is
missing here IMO. Besides, it's not so easy to define a custom one since
there is no error-at-point function, one has to get the point location,
then the diagnostics for that location, then the text for those diagnostics.

---

In GNU Emacs 26.1.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-06-18 built on carlos
Repository revision: 0a8b7f365cbc8de02ddb4e806dd76b1bf6302565
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Manjaro Linux

Recent messages:
Creating group entries...done
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
next-line: End of buffer
Quit
Eldoc mode disabled in current buffer
Mark set
Type C-x 1 to delete the help window.
Making completion list...
flymake-diagnostic-text: Wrong type argument: flymake--diag, 172
Configured using:
 'configure --prefix=/home/carlos/Local/stow/emacs-26
 --libexecdir=/home/carlos/Local/stow/emacs-26/lib --with-x-toolkit=gtk3
 --with-xft --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  display-line-numbers-mode: t
  flymake-mode: t
  diff-auto-refine-mode: t
  pyvenv-mode: t
  shell-dirtrack-mode: t
  xclip-mode: t
  winner-mode: t
  show-paren-mode: t
  ido-ubiquitous-mode: t
  ido-everywhere: t
  global-company-mode: t
  company-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail two-column
iso-transl eieio-opt speedbar sb-image dframe semantic/wisent/python
semantic/db-mode semantic/decorate/include semantic/db-find
semantic/db-ref semantic/db eieio-base semantic/decorate/mode
semantic/decorate pulse semantic/format ezimage semantic/tag-ls
semantic/ctxt semantic/dep semantic/find semantic/wisent/python-wy
semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util
semantic semantic/tag semantic/lex semantic/fw mode-local cedet rx
allout-widgets allout all-the-icons all-the-icons-faces data-material
data-weathericons data-octicons data-fileicons data-faicons
data-alltheicons debug noutline outline jka-compr find-func pp cl-print
autoload lisp-mnt misearch multi-isearch display-line-numbers checkdoc
flymake-proc flymake warnings doom-themes-org vc-git cl-extra yasnippet
elec-pair highlight-indentation help-fns radix-tree help-mode elpy
find-file-in-project ivy delsel ivy-overlay ffap thingatpt windmove
diff-mode easy-mmode elpy-shell pyvenv esh-var esh-io esh-cmd esh-opt
esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
elpy-profile elpy-django elpy-refactor subr-x python tramp-sh tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
parse-time format-spec advice json map grep compile comint ansi-color
files-x company-oddmuse company-keywords company-etags etags xref
project company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang company-semantic
company-eclim company-template company-css company-nxml company-bbdb
doom-tomorrow-night-theme doom-themes doom-themes-common xclip winner
ring paren ido-completing-read+ memoize s cus-edit minibuf-eldef ido
gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
mail-utils mm-util mail-prsvr wid-edit company edmacro kmacro pcase
cus-start cus-load finder-inf info package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib server time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 1931212 109955)
 (symbols 48 39622 1)
 (miscs 40 3436 609)
 (strings 32 115065 3324)
 (string-bytes 1 2950094)
 (vectors 16 79121)
 (vector-slots 8 1950064 121286)
 (floats 8 516 347)
 (intervals 56 8533 727)
 (buffers 992 43))





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#31921: 26.1.50; Add a convenient way to get flymake error at point
  2018-06-21  5:45 bug#31921: 26.1.50; Add a convenient way to get flymake error at point Carlos Pita
@ 2018-06-21  5:54 ` Carlos Pita
  2018-06-23  1:11   ` João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: Carlos Pita @ 2018-06-21  5:54 UTC (permalink / raw)
  To: 31921

Ok, now I discovered one has to simply type C-h . to show the content
of the help-echo property.

I knew it had to be some way.

So feel free to close this, but please add something wrt this in the
docstring or the info manual.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#31921: 26.1.50; Add a convenient way to get flymake error at point
  2018-06-21  5:54 ` Carlos Pita
@ 2018-06-23  1:11   ` João Távora
  2018-06-23 17:53     ` Carlos Pita
  0 siblings, 1 reply; 6+ messages in thread
From: João Távora @ 2018-06-23  1:11 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 31921

Carlos Pita <carlosjosepita@gmail.com> writes:

Hi Carlos,

> Ok, now I discovered one has to simply type C-h . to show the content
> of the help-echo property.
>
> I knew it had to be some way.

Actually, I didn't know this worked, so thanks.  I have
flymake-goto-next/prev-error bound to M-n and M-p and quickly type M-n
M-p (your 2nd solution if I'm not mistaken)

> So feel free to close this, but please add something wrt this in the
> docstring or the info manual.

In that case, it's better not to close it.  I've already read this
complaint/request elsewhere.

So, if others are reading this, what do you think of making eldoc
display the diagnostic at point instead of (along with?) whatever it was
already displaying in the echo area?

João





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#31921: 26.1.50; Add a convenient way to get flymake error at point
  2018-06-23  1:11   ` João Távora
@ 2018-06-23 17:53     ` Carlos Pita
  2018-06-25 11:33       ` João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: Carlos Pita @ 2018-06-23 17:53 UTC (permalink / raw)
  To: João Távora; +Cc: 31921

>> So feel free to close this, but please add something wrt this in the
>> docstring or the info manual.
>
> In that case, it's better not to close it.  I've already read this
> complaint/request elsewhere.

I don't know if `C-h .` was intended by design or is the result of
serendipity but it feels like the right solution to me, not as a
workaround or hack. It literally reads as "help at point" and shows
the content of a standard property meant for that. I think it just
needs to be documented. So consider this report a request for
documentation in any case.

> So, if others are reading this, what do you think of making eldoc
> display the diagnostic at point instead of (along with?) whatever it was
> already displaying in the echo area?

Many major modes already use eldoc to show information about the
symbol at point and the echo area is rather disputed by eldoc,
company, etc. I would avoid automatically messaging the error at point
to prevent excessive message switching. But it could be a
customization toggle.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#31921: 26.1.50; Add a convenient way to get flymake error at point
  2018-06-23 17:53     ` Carlos Pita
@ 2018-06-25 11:33       ` João Távora
  2018-06-25 12:56         ` Dmitry Gutov
  0 siblings, 1 reply; 6+ messages in thread
From: João Távora @ 2018-06-25 11:33 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 31921, 31921-done

Carlos Pita <carlosjosepita@gmail.com> writes:

>>> So feel free to close this, but please add something wrt this in the
>>> docstring or the info manual.
>>
>> In that case, it's better not to close it.  I've already read this
>> complaint/request elsewhere.
>
> I don't know if `C-h .` was intended by design or is the result of
> serendipity but it feels like the right solution to me

Neither I think, it's a side effect of good design and following
conventions.

I pushed the docchange to master as 15f4cdd873.

>> So, if others are reading this, what do you think of making eldoc
>> display the diagnostic at point instead of (along with?) whatever it was
>> already displaying in the echo area?
>
> Many major modes already use eldoc to show information about the
> symbol at point and the echo area is rather disputed by eldoc,
> company, etc. I would avoid automatically messaging the error at point
> to prevent excessive message switching. But it could be a
> customization toggle.

Yeah, I'd go with Dmitry's suggestion in

   https://github.com/joaotavora/eglot/issues/8#issuecomment-399698728

where he demonstrates that you can customize this by using:

   (custom-set-variables
    '(help-at-pt-timer-delay 0.1)
    '(help-at-pt-display-when-idle '(flymake-diagnostic)))

Though, in my testing, this always defers to eldoc (which is probably
the intended behavior).

João






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#31921: 26.1.50; Add a convenient way to get flymake error at point
  2018-06-25 11:33       ` João Távora
@ 2018-06-25 12:56         ` Dmitry Gutov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2018-06-25 12:56 UTC (permalink / raw)
  To: João Távora, Carlos Pita; +Cc: 31921, 31921-done

On 6/25/18 2:33 PM, João Távora wrote:

> Yeah, I'd go with Dmitry's suggestion in
> 
>     https://github.com/joaotavora/eglot/issues/8#issuecomment-399698728
> 
> where he demonstrates that you can customize this by using:
> 
>     (custom-set-variables
>      '(help-at-pt-timer-delay 0.1)
>      '(help-at-pt-display-when-idle '(flymake-diagnostic)))
> 
> Though, in my testing, this always defers to eldoc (which is probably
> the intended behavior).

It probably depends on the values of the respective delays.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-25 12:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-21  5:45 bug#31921: 26.1.50; Add a convenient way to get flymake error at point Carlos Pita
2018-06-21  5:54 ` Carlos Pita
2018-06-23  1:11   ` João Távora
2018-06-23 17:53     ` Carlos Pita
2018-06-25 11:33       ` João Távora
2018-06-25 12:56         ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).