From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#31749: 26.1; Improve eldoc message commands heuristic Date: Thu, 07 Jun 2018 17:18:33 -0300 Message-ID: <87wovabbae.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528403170 17953 195.159.176.226 (7 Jun 2018 20:26:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 7 Jun 2018 20:26:10 +0000 (UTC) To: 31749@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 07 22:26:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fR1Tx-0004WP-OL for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jun 2018 22:26:06 +0200 Original-Received: from localhost ([::1]:60059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fR1W3-0000bA-2S for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Jun 2018 16:28:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fR1Vv-0000b3-0q for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2018 16:28:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fR1Vr-0003J3-Nb for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2018 16:28:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58778) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fR1Vr-0003Hz-K8 for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2018 16:28:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fR1Vr-0003hJ-Cq for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2018 16:28:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jun 2018 20:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31749 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152840326714189 (code B ref -1); Thu, 07 Jun 2018 20:28:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Jun 2018 20:27:47 +0000 Original-Received: from localhost ([127.0.0.1]:38442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fR1Va-0003gn-Fa for submit@debbugs.gnu.org; Thu, 07 Jun 2018 16:27:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fR1VY-0003gY-5a for submit@debbugs.gnu.org; Thu, 07 Jun 2018 16:27:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fR1VR-0000KX-2F for submit@debbugs.gnu.org; Thu, 07 Jun 2018 16:27:38 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47597) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fR1VQ-0000Il-T3 for submit@debbugs.gnu.org; Thu, 07 Jun 2018 16:27:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fR1VP-0000Yo-7o for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2018 16:27:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fR1VL-00087T-Sh for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2018 16:27:35 -0400 Original-Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]:37951) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fR1VL-00081N-Il for bug-gnu-emacs@gnu.org; Thu, 07 Jun 2018 16:27:31 -0400 Original-Received: by mail-qt0-x235.google.com with SMTP id x34-v6so11271194qtk.5 for ; Thu, 07 Jun 2018 13:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=xrxIcKWKQqTwaVIJz3tUOVeD05gy9xq8YQDAwhntYiI=; b=kSU8VJlw4FDebrpiLxpYRS7qKdFBQZkFV5M2OA6rJPSkQk51H2ofvY2mP2mGALYRgX w7A7Dy/0hwEfIeKbhK+Xr4GlfS1G65pES0QHV5VimkY6AcgaDww5gcOgcPkl8vC4pYQM /uu1ydtqk7WO2AOFjdUXrXZR8SKPC7H3iLXQiY9bFD2JWe9rblrBNuSgQvANUFFLpUM+ eKOXpMaiPUbRcjepUyk8TxIF7Yj+WiX3pPZUn9STmxbblUtkijr55irGzM4Q3wIkFMlA yeoJOLQLBAyyQMCDgOYkG3GwcSi51woXfA+nd2Psriopb+Ax3vowXz4zV2N8S8NBAUKu mGxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=xrxIcKWKQqTwaVIJz3tUOVeD05gy9xq8YQDAwhntYiI=; b=b3TuievHjWITr+U9Av6q1iT93IjRUCZkIHu2ZNfRTPSVRZetQZnr3/TC3wCyX13+kw jWCsrLwpZK8duIcH143hfqMTmnbkZswsN2zQeX0R57CMWeVPXHb5hqYGZXfScV/qoRYv 5qdr7CH2DTyhDN2kQ+UUhtPqjIdAHrjv01MPdzluK2wNpQkfBWUuHcJ5YZkrfd8GF/rk 9wXfx9ueK6WD8W0O6DU5qbEMPuL7Cps+WPMXZl7UWGVDkxtVwgc0olwnPDUrm5Z+Kkgc jnYWuyUmRjlSkPxU3ZZMsDDMjD4bgtPaq733k4QO1FklNkrb5nuhcKVEE7YfGp2AWxYg tLig== X-Gm-Message-State: APt69E3XpGZyRUSogXm9LM8ryvYrSdoL4hghDRrt87qx4EQBxwD77O28 XtrS99hMiz5xrVIhb2uHpEZ/xQ== X-Google-Smtp-Source: ADUXVKIW9KmwSLuMqmU+OkxCvya4IlIBVeXHn0SXxmmGxOtrnT/jfzgMYPhvDbtgmzL04uH3oEvANQ== X-Received: by 2002:a0c:e043:: with SMTP id y3-v6mr3159592qvk.148.1528403250514; Thu, 07 Jun 2018 13:27:30 -0700 (PDT) Original-Received: from carlos ([190.2.33.33]) by smtp.gmail.com with ESMTPSA id t15-v6sm21256372qtc.66.2018.06.07.13.27.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jun 2018 13:27:30 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147146 Archived-At: 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))