unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31749: 26.1; Improve eldoc message commands heuristic
@ 2018-06-07 20:18 Carlos Pita
  2018-06-14  0:10 ` Noam Postavsky
  2021-02-04  9:29 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Carlos Pita @ 2018-06-07 20:18 UTC (permalink / raw)
  To: 31749

The current criterion essentially removes the echo area message after
any command not whitelisted in eldoc-message-commands.

This is problematic since the list of relevant commands is unknown in
advance for evert possible extension package. One could argue that
extension package maintainers are responsible then, but I have had many
problems with eldoc behaving suboptimally in conjunction with company
mode, elpy mode and others (which are all quality extensions) that I
wouldn't put the burden of this on the maintainers.

Now, I might be completely wrong, but why don't you just check if
(current-message) is nil or not? This way if any command has written to
the echo area eldoc won't override its message. You can still keep the
whitelist in order to force override by eldoc (although I don't see much
value in this). You have probably thought many times about this
alternative and rejected for reasons I'm unable to see, but it's worth
to intent ;)

---

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-29 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Manjaro Linux

Recent messages:
xy
eldoc-print-current-symbol-info
xy [5 times]
Auto-saving...
xy [3 times]
completing-read-default: Command attempted to use minibuffer while in minibuffer
Quit [3 times]
xy [2 times]
Eldoc mode disabled in current buffer
xy [9 times]

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK 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: Fundamental

Minor modes in effect:
  diff-auto-refine-mode: t
  pyvenv-mode: t
  shell-dirtrack-mode: t
  winner-mode: t
  show-paren-mode: t
  ido-everywhere: t
  global-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 gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils jka-compr eieio-opt speedbar sb-image ezimage dframe
find-func misearch multi-isearch trace pp vc-git company-oddmuse
company-keywords company-etags company-gtags company-dabbrev-code
company-dabbrev company-files company-cmake company-xcode company-clang
company-eclim company-template company-css company-nxml company-bbdb
flymake-proc flymake warnings display-line-numbers cl-extra yasnippet
elec-pair highlight-indentation company edmacro kmacro pcase 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 s 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 etags xref project cus-edit
wid-edit server doom-tomorrow-night-theme doom-themes doom-themes-common
winner ring paren ido 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 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 432278 22386)
 (symbols 48 34423 1)
 (miscs 40 683 730)
 (strings 32 82232 3328)
 (string-bytes 1 2243476)
 (vectors 16 54983)
 (vector-slots 8 978022 24994)
 (floats 8 196 749)
 (intervals 56 14759 580)
 (buffers 992 25))





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

* bug#31749: 26.1; Improve eldoc message commands heuristic
  2018-06-07 20:18 bug#31749: 26.1; Improve eldoc message commands heuristic Carlos Pita
@ 2018-06-14  0:10 ` Noam Postavsky
  2021-02-04  9:29 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Noam Postavsky @ 2018-06-14  0:10 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 31749

severity 31749 wishlist
quit

Carlos Pita <carlosjosepita@gmail.com> writes:

> The current criterion essentially removes the echo area message after
> any command not whitelisted in eldoc-message-commands.
>
> This is problematic since the list of relevant commands is unknown in
> advance for evert possible extension package. One could argue that
> extension package maintainers are responsible then, but I have had many
> problems with eldoc behaving suboptimally in conjunction with company
> mode, elpy mode and others (which are all quality extensions) that I
> wouldn't put the burden of this on the maintainers.
>
> Now, I might be completely wrong, but why don't you just check if
> (current-message) is nil or not? This way if any command has written to
> the echo area eldoc won't override its message. You can still keep the
> whitelist in order to force override by eldoc (although I don't see much
> value in this). You have probably thought many times about this
> alternative and rejected for reasons I'm unable to see, but it's worth
> to intent ;)

Not sure if anybody's considered this, perhaps you can try it out and
see if there are any drawbacks?






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

* bug#31749: 26.1; Improve eldoc message commands heuristic
  2018-06-07 20:18 bug#31749: 26.1; Improve eldoc message commands heuristic Carlos Pita
  2018-06-14  0:10 ` Noam Postavsky
@ 2021-02-04  9:29 ` Lars Ingebrigtsen
  2021-03-12  1:53   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-04  9:29 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 31749

Carlos Pita <carlosjosepita@gmail.com> writes:

> The current criterion essentially removes the echo area message after
> any command not whitelisted in eldoc-message-commands.

[...]

> Now, I might be completely wrong, but why don't you just check if
> (current-message) is nil or not? This way if any command has written to
> the echo area eldoc won't override its message. You can still keep the
> whitelist in order to force override by eldoc (although I don't see much
> value in this). You have probably thought many times about this
> alternative and rejected for reasons I'm unable to see, but it's worth
> to intent ;)

(I'm going through old bug reports that unfortunately got little response at
the time.)

The way Emacs is messaging things has been changed a bit in Emacs 28,
and fewer messages are overwritten in general, but I'm not sure whether
this also covers the eldoc messages being discussed here.

Do you have a concrete case where eldoc is overwriting a message that it
shouldn't?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#31749: 26.1; Improve eldoc message commands heuristic
  2021-02-04  9:29 ` Lars Ingebrigtsen
@ 2021-03-12  1:53   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-12  1:53 UTC (permalink / raw)
  To: Carlos Pita; +Cc: 31749

Lars Ingebrigtsen <larsi@gnus.org> writes:

> The way Emacs is messaging things has been changed a bit in Emacs 28,
> and fewer messages are overwritten in general, but I'm not sure whether
> this also covers the eldoc messages being discussed here.
>
> Do you have a concrete case where eldoc is overwriting a message that it
> shouldn't?

More information was requested, but no response was given within a 
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-03-12  1:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07 20:18 bug#31749: 26.1; Improve eldoc message commands heuristic Carlos Pita
2018-06-14  0:10 ` Noam Postavsky
2021-02-04  9:29 ` Lars Ingebrigtsen
2021-03-12  1:53   ` Lars Ingebrigtsen

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).