GNU bug report logs - #36886
26.2; (global-eldoc-mode -1) should disable eldoc completely

Previous Next

Package: emacs;

Reported by: Sanel Zukan <sanelz <at> gmail.com>

Date: Thu, 1 Aug 2019 10:31:02 UTC

Severity: normal

Tags: fixed

Found in version 26.2

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36886 in the body.
You can then email your comments to 36886 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Thu, 01 Aug 2019 10:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sanel Zukan <sanelz <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 01 Aug 2019 10:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sanel Zukan <sanelz <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2; (global-eldoc-mode -1) should disable eldoc completely
Date: Thu, 01 Aug 2019 12:30:38 +0200
When Emacs is run with (global-eldoc-mode -1), eldoc is not completely
disabled because it will show function arguments inside mode-line.

I believe intention behind (global-eldoc-mode -1) should be that all
eldoc facility gets disabled. Right now, the only way to stop poping
stuff in mode-line is this:

 (setq-default eldoc-message-function 'ignore)

Best,
Sanel




In GNU Emacs 26.2 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 3.18.9)
 of 2019-07-17 built on hive64.slackware.lan
Recent messages:
Saving file /home/sanel/.emacs.d/init.el...
Wrote /home/sanel/.emacs.d/init.el
Quit
Mark set
No completions of 2-
Hit space to flush
No completions of ../../../sta
Hit space to flush
GNU Emacs 26.2 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 3.18.9) of 2019-07-17 [2 times]
Making completion list... [3 times]

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
 --program-prefix= --program-suffix= --mandir=/usr/man
 --infodir=/usr/info --without-gconf --without-gsettings --with-x
 --with-x-toolkit=gtk3 --build=x86_64-slackware-linux 'CFLAGS=-O2
 -fPIC''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GLIB NOTIFY ACL
GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM
THREADS LCMS2

Important settings:
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_US.utf8
  value of $LC_MESSAGES: en_US.utf8
  value of $LC_MONETARY: en_US.utf8
  value of $LC_NUMERIC: en_US.utf8
  value of $LC_TIME: en_US.utf8
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Eshell

Minor modes in effect:
  imenu-list-minor-mode: t
  ido-everywhere: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  evil-mode: t
  evil-local-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
~/.emacs.d/evil/lib/ert hides /usr/share/emacs/26.2/lisp/emacs-lisp/ert

Features:
(shadow emacsbug zeal-at-point chistory hideshow imenu-list wttrin
xterm-color ol-notmuch etags xref project nroff-mode calc-undo calc-misc
org-notmuch ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util ediff face-remap linum fzf subr-x log-view
vc-annotate vc vc-dispatcher idomenu log4j-mode tramp-cmds
ido-select-window dired-aux declutter json map skeleton ack pcase
files-x tramp-cache tramp-sh pcmpl-gnu m4-mode make-mode markdown-mode
tabify cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew
holidays hol-loaddefs cal-iso mm-archive debug conf-mode shr-color color
network-stream starttls url-http url-gw nsm url-cache url-auth woman man
timezone ibuf-ext ibuffer ibuffer-loaddefs flyspell sendmail ispell sort
gnus-alias mail-extr pcmpl-unix ffap em-unix em-term term ehelp
em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic em-banner em-alias tex-mode latexenc ox-odt rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii
ox-publish ox magit-key-mode magit view grep compile autorevert
filenotify git-rebase-mode git-commit-mode log-edit pcvs-util add-log
ido cal-move dabbrev cua-base calc-alg calc-ext calc-menu calc
calc-loaddefs calc-macs cl-print eieio-opt speedbar sb-image ezimage
dframe ob-ditaa ob-plantuml org-archive org-capture org-colview
org-crypt org-indent help-fns radix-tree org-table org-duration
org-clock elfeed-show elfeed-search elfeed-csv elfeed elfeed-curl
elfeed-log elfeed-db elfeed-lib xml-query bookmark pp eww mm-url
url-queue url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util shr svg xml dom browse-url sh-script smie
executable ledger-mode ledger-check ledger-schedule ledger-xact
ledger-texi ledger-test ledger-sort ledger-report ledger-reconcile
ledger-post ledger-occur ledger-init ledger-fontify ledger-state
ledger-navigate ledger-fonts ledger-exec ledger-context ledger-complete
ledger-commodities esh-var esh-io esh-cmd esh-opt esh-ext esh-proc
esh-groups eshell esh-module esh-mode esh-arg esh-util cus-edit
cus-start cus-load ledger-regex cpp cc-mode cc-fonts cc-guess cc-menus
cc-cmds yaml-mode monroe clojure-mode rx imenu inf-lisp tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell vc-git
org-habit org-agenda org-rmail org-mhe org-irc org-info org-gnus nnir
gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail
mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int
gnus-range gnus-win gnus nnheader org-docview doc-view jka-compr
image-mode org-bibtex bibtex org-bbdb org-w3m org-element avl-tree
generator org org-macro org-footnote org-pcomplete pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp ob
ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint
ansi-color ob-core ob-eval org-compat org-macs org-loaddefs find-func
desktop frameset term/rxvt term/xterm xterm server elec-pair notmuch
hl-line notmuch-message notmuch-hello wid-edit notmuch-tree notmuch-show
notmuch-print notmuch-crypto notmuch-mua notmuch-draft
notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser
notmuch-wash diff-mode coolj notmuch-query goto-addr icalendar diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs notmuch-tag crm
notmuch-lib notmuch-version notmuch-compat message rmc puny dired
dired-loaddefs format-spec rfc822 mml mailabbrev gmm-utils mailheader
mm-view mml-smime mml-sec epa epg gnus-util rmail rmail-loaddefs
mail-utils time-date smime dig mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr evil
evil-integration undo-tree derived easy-mmode cl-extra help-mode diff cl
evil-maps evil-commands evil-jumps evil-command-window evil-types
evil-search evil-ex evil-macros evil-repeat evil-states evil-core advice
evil-common windmove thingatpt rect evil-digraphs evil-vars ring edmacro
kmacro cc-styles cc-align cc-engine cc-vars cc-defs disp-table
finder-inf dash-functional-autoloads f-autoloads dash-autoloads info
magit-autoloads git-rebase-mode-autoloads git-commit-mode-autoloads
php-mode-autoloads request-deferred-autoloads request-autoloads
deferred-autoloads s-autoloads yaml-mode-autoloads 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 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 threads dbusbind inotify lcms2 dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 2917359 906660)
 (symbols 48 65421 3)
 (miscs 40 14616 29680)
 (strings 32 2687160 124540)
 (string-bytes 1 112066300)
 (vectors 16 700294)
 (vector-slots 8 7705491 218730)
 (floats 8 201985 20921)
 (intervals 56 52031 12167)
 (buffers 992 223)
 (heap 1024 402497 19420))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Thu, 01 Aug 2019 11:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Sanel Zukan <sanelz <at> gmail.com>
Cc: 36886 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Thu, 01 Aug 2019 14:37:51 +0300
Sanel Zukan <sanelz <at> gmail.com> writes:

> When Emacs is run with (global-eldoc-mode -1), eldoc is not completely
> disabled because it will show function arguments inside mode-line.
>
> I believe intention behind (global-eldoc-mode -1) should be that all
> eldoc facility gets disabled. Right now, the only way to stop poping
> stuff in mode-line is this:
>
>  (setq-default eldoc-message-function 'ignore)

CCing Dmitry, who explicitly enabled eldoc-mode in read--expression as
part of bug#27202: https://debbugs.gnu.org/27202.

My gut says that bug should be fixable within eldoc.el, without having
to tweak read--expression, but I'm not familiar with eldoc.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Thu, 01 Aug 2019 12:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Sanel Zukan <sanelz <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 36886 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Thu, 01 Aug 2019 14:29:40 +0200
Thanks!

Best,
Sanel

"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> Sanel Zukan <sanelz <at> gmail.com> writes:
>
>> When Emacs is run with (global-eldoc-mode -1), eldoc is not completely
>> disabled because it will show function arguments inside mode-line.
>>
>> I believe intention behind (global-eldoc-mode -1) should be that all
>> eldoc facility gets disabled. Right now, the only way to stop poping
>> stuff in mode-line is this:
>>
>>  (setq-default eldoc-message-function 'ignore)
>
> CCing Dmitry, who explicitly enabled eldoc-mode in read--expression as
> part of bug#27202: https://debbugs.gnu.org/27202.
>
> My gut says that bug should be fixable within eldoc.el, without having
> to tweak read--expression, but I'm not familiar with eldoc.
>
> Thanks,
>
> -- 
> Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Thu, 01 Aug 2019 13:39:01 GMT) Full text and rfc822 format available.

Message #14 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>, Sanel Zukan <sanelz <at> gmail.com>
Cc: 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Thu, 1 Aug 2019 16:38:28 +0300
On 01.08.2019 14:37, Basil L. Contovounesios wrote:
> Sanel Zukan <sanelz <at> gmail.com> writes:
> 
>> When Emacs is run with (global-eldoc-mode -1), eldoc is not completely
>> disabled because it will show function arguments inside mode-line.
>>
>> I believe intention behind (global-eldoc-mode -1) should be that all
>> eldoc facility gets disabled. Right now, the only way to stop poping
>> stuff in mode-line is this:
>>
>>   (setq-default eldoc-message-function 'ignore)
> 
> CCing Dmitry, who explicitly enabled eldoc-mode in read--expression as
> part of bug#27202: https://debbugs.gnu.org/27202.
> 
> My gut says that bug should be fixable within eldoc.el, without having
> to tweak read--expression, but I'm not familiar with eldoc.

I'm not sure what's the best way. But this should help:

diff --git a/lisp/simple.el b/lisp/simple.el
index 0bc39f08c0..4eec9e732d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1583,7 +1583,8 @@ read--expression
           ;; FIXME: call emacs-lisp-mode?
           (add-function :before-until (local 
'eldoc-documentation-function)
                         #'elisp-eldoc-documentation-function)
-          (eldoc-mode 1)
+          (when global-eldoc-mode
+            (eldoc-mode 1))
           (add-hook 'completion-at-point-functions
                     #'elisp-completion-at-point nil t)
           (run-hooks 'eval-expression-minibuffer-setup-hook))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 06:36:01 GMT) Full text and rfc822 format available.

Message #17 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sanel Zukan <sanelz <at> gmail.com>
Cc: 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Fri, 02 Aug 2019 09:35:11 +0300
> From: Sanel Zukan <sanelz <at> gmail.com>
> Date: Thu, 01 Aug 2019 12:30:38 +0200
> 
> When Emacs is run with (global-eldoc-mode -1), eldoc is not completely
> disabled because it will show function arguments inside mode-line.

I don't think I can reproduce this here.  Can you show a complete
recipe, starting from "emacs -Q"?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 09:36:01 GMT) Full text and rfc822 format available.

Message #20 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Sanel Zukan <sanelz <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Fri, 02 Aug 2019 11:35:29 +0200
Here is how to reproduce it with emacs -Q:

1. $ emacs -Q
2. M-x (global-eldoc-mode -1)
;; by not it should be disabled in mode-line, but if you do this:
3. M-: (fboundp '    <-- after entering apostrophe, eldoc will show
'fboundp' protoype in mode-line.

Also after (global-eldoc-mode -1), I don't see anwyhere in eldoc.el code
that eldoc-message-function is changed.

Emacs version: GNU Emacs 26.2 (build 1, x86_64-slackware-linux-gnu, GTK+
Version 3.18.9) of 2019-07-17

Best,
Sanel


Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Sanel Zukan <sanelz <at> gmail.com>
>> Date: Thu, 01 Aug 2019 12:30:38 +0200
>> 
>> When Emacs is run with (global-eldoc-mode -1), eldoc is not completely
>> disabled because it will show function arguments inside mode-line.
>
> I don't think I can reproduce this here.  Can you show a complete
> recipe, starting from "emacs -Q"?
>
> Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 11:45:02 GMT) Full text and rfc822 format available.

Message #23 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Sanel Zukan <sanelz <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Fri, 02 Aug 2019 14:44:33 +0300
Sanel Zukan <sanelz <at> gmail.com> writes:

> Here is how to reproduce it with emacs -Q:
>
> 1. $ emacs -Q
> 2. M-x (global-eldoc-mode -1)
> ;; by not it should be disabled in mode-line, but if you do this:
> 3. M-: (fboundp '    <-- after entering apostrophe, eldoc will show
> 'fboundp' protoype in mode-line.
>
> Also after (global-eldoc-mode -1), I don't see anwyhere in eldoc.el code
> that eldoc-message-function is changed.

AFAICT eldoc-message-function doesn't need to be changed because it
isn't called when eldoc-mode is disabled.

The reason it ends up being called in your example is that M-:
explicitly and unconditionally enables eldoc-mode in the minibuffer.

Dmitry suggested making this behaviour conditional as a workaround, but
ultimately it would probably be best to try fixing bug#27202 without
messing with eldoc-mode in read--expression.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 11:51:01 GMT) Full text and rfc822 format available.

Message #26 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sanel Zukan <sanelz <at> gmail.com>
Cc: 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Fri, 02 Aug 2019 14:50:07 +0300
> From: Sanel Zukan <sanelz <at> gmail.com>
> Cc: 36886 <at> debbugs.gnu.org
> Date: Fri, 02 Aug 2019 11:35:29 +0200
> 
> 1. $ emacs -Q
> 2. M-x (global-eldoc-mode -1)
> ;; by not it should be disabled in mode-line, but if you do this:
> 3. M-: (fboundp '    <-- after entering apostrophe, eldoc will show
> 'fboundp' protoype in mode-line.

So this only happens in M-:.  That wasn't evident from your original
report.  global-eldoc-mode generally shows the signatures when point
is inside any defun or other def* forms, not only in the minibuffer.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 12:01:02 GMT) Full text and rfc822 format available.

Message #29 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: sanelz <at> gmail.com, 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Fri, 02 Aug 2019 15:00:16 +0300
> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  36886 <at> debbugs.gnu.org
> Date: Fri, 02 Aug 2019 14:44:33 +0300
> 
> The reason it ends up being called in your example is that M-:
> explicitly and unconditionally enables eldoc-mode in the minibuffer.
> 
> Dmitry suggested making this behaviour conditional as a workaround, but
> ultimately it would probably be best to try fixing bug#27202 without
> messing with eldoc-mode in read--expression.

I agree.  Any suggestions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 12:38:01 GMT) Full text and rfc822 format available.

Message #32 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Sanel Zukan <sanelz <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Fri, 02 Aug 2019 14:36:51 +0200
Thanks for detail explanation Basil!

"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> Sanel Zukan <sanelz <at> gmail.com> writes:
>
>> Here is how to reproduce it with emacs -Q:
>>
>> 1. $ emacs -Q
>> 2. M-x (global-eldoc-mode -1)
>> ;; by not it should be disabled in mode-line, but if you do this:
>> 3. M-: (fboundp '    <-- after entering apostrophe, eldoc will show
>> 'fboundp' protoype in mode-line.
>>
>> Also after (global-eldoc-mode -1), I don't see anwyhere in eldoc.el code
>> that eldoc-message-function is changed.
>
> AFAICT eldoc-message-function doesn't need to be changed because it
> isn't called when eldoc-mode is disabled.
>
> The reason it ends up being called in your example is that M-:
> explicitly and unconditionally enables eldoc-mode in the minibuffer.
>
> Dmitry suggested making this behaviour conditional as a workaround, but
> ultimately it would probably be best to try fixing bug#27202 without
> messing with eldoc-mode in read--expression.
>
> Thanks,
>
> -- 
> Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 12:52:02 GMT) Full text and rfc822 format available.

Message #35 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Sanel Zukan <sanelz <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Fri, 02 Aug 2019 14:51:04 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Sanel Zukan <sanelz <at> gmail.com>
>> Cc: 36886 <at> debbugs.gnu.org
>> Date: Fri, 02 Aug 2019 11:35:29 +0200
>> 
>> 1. $ emacs -Q
>> 2. M-x (global-eldoc-mode -1)
>> ;; by not it should be disabled in mode-line, but if you do this:
>> 3. M-: (fboundp '    <-- after entering apostrophe, eldoc will show
>> 'fboundp' protoype in mode-line.
>
> So this only happens in M-:.  That wasn't evident from your original
> report.  global-eldoc-mode generally shows the signatures when point
> is inside any defun or other def* forms, not only in the minibuffer.

Hm... eldoc-message-function is part of eldoc package and I was hoping
that, by completely disabling eldoc-mode, it will revert whatever is
enabled when mode is initialized from that package. I guess different
views from user and developer points.

But I'm happy we are on the same page regarding this ticket.

> Thanks.

Thanks!
Sanel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 13:20:01 GMT) Full text and rfc822 format available.

Message #38 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: sanelz <at> gmail.com, 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Fri, 02 Aug 2019 16:19:13 +0300
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  36886 <at> debbugs.gnu.org
>> Date: Fri, 02 Aug 2019 14:44:33 +0300
>> 
>> The reason it ends up being called in your example is that M-:
>> explicitly and unconditionally enables eldoc-mode in the minibuffer.
>> 
>> Dmitry suggested making this behaviour conditional as a workaround, but
>> ultimately it would probably be best to try fixing bug#27202 without
>> messing with eldoc-mode in read--expression.
>
> I agree.  Any suggestions?

Not off the top of my head, as I'm not familiar with eldoc-mode or
bug#27202, but I can try to take a look in the coming days if no-one
does so first.

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 14:29:02 GMT) Full text and rfc822 format available.

Message #41 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: sanelz <at> gmail.com, 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Fri, 02 Aug 2019 17:28:16 +0300
> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
> Cc: sanelz <at> gmail.com,  36886 <at> debbugs.gnu.org
> Date: Fri, 02 Aug 2019 16:19:13 +0300
> 
> >> Dmitry suggested making this behaviour conditional as a workaround, but
> >> ultimately it would probably be best to try fixing bug#27202 without
> >> messing with eldoc-mode in read--expression.
> >
> > I agree.  Any suggestions?
> 
> Not off the top of my head, as I'm not familiar with eldoc-mode or
> bug#27202, but I can try to take a look in the coming days if no-one
> does so first.

I actually don't understand why, when the globalized mode is ON, it
doesn't work in the minibuffer.  What am I missing?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Fri, 02 Aug 2019 14:34:02 GMT) Full text and rfc822 format available.

Message #44 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sanel Zukan <sanelz <at> gmail.com>
Cc: 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Fri, 02 Aug 2019 17:33:04 +0300
> From: Sanel Zukan <sanelz <at> gmail.com>
> Cc: 36886 <at> debbugs.gnu.org
> Date: Fri, 02 Aug 2019 14:51:04 +0200
> 
> > So this only happens in M-:.  That wasn't evident from your original
> > report.  global-eldoc-mode generally shows the signatures when point
> > is inside any defun or other def* forms, not only in the minibuffer.
> 
> Hm... eldoc-message-function is part of eldoc package and I was hoping
> that, by completely disabling eldoc-mode, it will revert whatever is
> enabled when mode is initialized from that package. I guess different
> views from user and developer points.

I don't think this is about the differences in our views: I didn't say
I considered the behavior you described correct (it isn't).

My point was that your original report lacked some details, which
caused me to think the problem was not reproducible, because my naïve
attempt to reproduce it didn't use M-:.  It is important to describe
the recipe in enough detail to avoid that; please do that in the
future.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Sun, 04 Aug 2019 00:36:02 GMT) Full text and rfc822 format available.

Message #47 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, sanelz <at> gmail.com,
 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Sat, 03 Aug 2019 20:35:23 -0400
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

> I actually don't understand why, when the globalized mode is ON, it
> doesn't work in the minibuffer.  What am I missing?

define-globalized-minor-mode only adds after-change-major-mode-hook,
find-file-hook, and change-major-mode-hook.  AFAICT, the minibuffer
stays in fundamental-mode, and doesn't visit a file so none of those are
triggered.  Possible patch attached (some additional manual updates +
NEWS would be needed for define-globalized-minor-mode change).

[0001-Respect-global-eldoc-mode-in-minibuffers-Bug-36886.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Sun, 04 Aug 2019 07:52:01 GMT) Full text and rfc822 format available.

Message #50 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 36886 <at> debbugs.gnu.org, sanelz <at> gmail.com
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Sun, 04 Aug 2019 10:51:08 +0300
Noam Postavsky <npostavs <at> gmail.com> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> I actually don't understand why, when the globalized mode is ON, it
>> doesn't work in the minibuffer.  What am I missing?
>
> define-globalized-minor-mode only adds after-change-major-mode-hook,
> find-file-hook, and change-major-mode-hook.  AFAICT, the minibuffer
> stays in fundamental-mode, and doesn't visit a file so none of those are
> triggered.

The call to read-from-minibuffer in read--expression triggers
change-major-mode-hook and after-change-major-mode-hook.

These in turn call turn-on-eldoc-mode, which calls eldoc--supported-p,
which checks the value of eldoc-documentation-function.

The problem is that minibuffer-setup-hook, which sets
eldoc-documentation-function, has not yet run at this stage, so the
minibuffer is not yet considered suitable for enabling eldoc-mode.

> Possible patch attached (some additional manual updates +
> NEWS would be needed for define-globalized-minor-mode change).
>
> From d16b9c5dffb84c53bc6f55c4ca74fc8135d48d7f Mon Sep 17 00:00:00 2001
> From: Noam Postavsky <npostavs <at> gmail.com>
> Date: Sat, 3 Aug 2019 20:19:31 -0400
> Subject: [PATCH] Respect global-eldoc-mode in minibuffers (Bug#36886)
>
> * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Accept
> a BODY parameter.
> * lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Add or remove
> eldoc-mode to eval-expression-minibuffer-setup-hook when enabling or
> disabling global-eldoc-mode.
> * lisp/simple.el (read--expression): Remove the no-longer-needed
> unconditional call to eldoc-mode.

Should this log entry mention bug#27202 as well?

[...]

> diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
> index 16b5863209..e5f1832de6 100644
> --- a/lisp/emacs-lisp/eldoc.el
> +++ b/lisp/emacs-lisp/eldoc.el
> @@ -207,7 +207,10 @@ eldoc-mode
>  (define-globalized-minor-mode global-eldoc-mode eldoc-mode turn-on-eldoc-mode
>    :group 'eldoc
>    :initialize 'custom-initialize-delay
> -  :init-value t)
> +  :init-value t
> +  (if global-eldoc-mode
> +      (add-hook 'eval-expression-minibuffer-setup-hook #'eldoc-mode)
> +    (remove-hook 'eval-expression-minibuffer-setup-hook #'eldoc-mode)))

This looks fine to me (the only alternative I can think of is creating a
new major mode specifically for read--expression), but shouldn't this
call to eldoc-mode be bundled in the same hook function with...

>  ;;;###autoload
>  (defun turn-on-eldoc-mode ()
> diff --git a/lisp/simple.el b/lisp/simple.el
> index e33709e8ad..f81400c073 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -1583,7 +1583,6 @@ read--expression
>            ;; FIXME: call emacs-lisp-mode?
>            (add-function :before-until (local 'eldoc-documentation-function)
>                          #'elisp-eldoc-documentation-function)

...this advice?

> -          (eldoc-mode 1)
>            (add-hook 'completion-at-point-functions
>                      #'elisp-completion-at-point nil t)
>            (run-hooks 'eval-expression-minibuffer-setup-hook))

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Sun, 04 Aug 2019 09:01:02 GMT) Full text and rfc822 format available.

Message #53 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Štěpán Němec <stepnem <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: sanelz <at> gmail.com, 36886 <at> debbugs.gnu.org,
 Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Sun, 04 Aug 2019 11:00:19 +0200
On Sun, 04 Aug 2019 10:51:08 +0300
Basil L. Contovounesios wrote:

>> +  (if global-eldoc-mode
>> +      (add-hook 'eval-expression-minibuffer-setup-hook #'eldoc-mode)
>> +    (remove-hook 'eval-expression-minibuffer-setup-hook #'eldoc-mode)))
>
> This looks fine to me (the only alternative I can think of is creating a
> new major mode specifically for read--expression) [...]

...which actually sounds like it could be a real improvement in other
respects, too: many users seem to be trying to make M-: more convenient
(better completion, possibly syntax highlighting, paredit etc.); this
looks like a good way to make that easier or even unnecessary by default
(deriving from emacs-lisp-mode).

-- 
Štěpán




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Sun, 04 Aug 2019 14:35:02 GMT) Full text and rfc822 format available.

Message #56 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 36886 <at> debbugs.gnu.org, sanelz <at> gmail.com
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Sun, 04 Aug 2019 10:34:38 -0400
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> The problem is that minibuffer-setup-hook, which sets
> eldoc-documentation-function, has not yet run at this stage, so the
> minibuffer is not yet considered suitable for enabling eldoc-mode.

Ah, tricky, we should probably put this in a comment somewhere.

>> Subject: [PATCH] Respect global-eldoc-mode in minibuffers (Bug#36886)

> Should this log entry mention bug#27202 as well?

Sure, can't hurt.

> shouldn't this call to eldoc-mode be bundled in the same hook function
> with...

>> @@ -1583,7 +1583,6 @@ read--expression
>>            ;; FIXME: call emacs-lisp-mode?
>>            (add-function :before-until (local 'eldoc-documentation-function)
>>                          #'elisp-eldoc-documentation-function)
>
> ...this advice?

Oh yeah, that would make sense.

Štěpán Němec <stepnem <at> gmail.com> writes:

> On Sun, 04 Aug 2019 10:51:08 +0300
> Basil L. Contovounesios wrote:
>
>> This looks fine to me (the only alternative I can think of is creating a
>> new major mode specifically for read--expression) [...]
>
> ...which actually sounds like it could be a real improvement in other
> respects, too: many users seem to be trying to make M-: more convenient
> (better completion, possibly syntax highlighting, paredit etc.); this
> looks like a good way to make that easier or even unnecessary by default
> (deriving from emacs-lisp-mode).

I tried calling emacs-lisp-mode as the FIXME suggests, but it results in
a minibuffer that can't be C-g'd out of.  I guess it destroys or misses
some minibuffer-specific setup?  So if someone can figure out how to do
that properly it does sound like a good solution.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Sun, 04 Aug 2019 16:29:01 GMT) Full text and rfc822 format available.

Message #59 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: contovob <at> tcd.ie, sanelz <at> gmail.com, 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Sun, 04 Aug 2019 19:27:57 +0300
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>,  sanelz <at> gmail.com,  36886 <at> debbugs.gnu.org
> Date: Sat, 03 Aug 2019 20:35:23 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > I actually don't understand why, when the globalized mode is ON, it
> > doesn't work in the minibuffer.  What am I missing?
> 
> define-globalized-minor-mode only adds after-change-major-mode-hook,
> find-file-hook, and change-major-mode-hook.  AFAICT, the minibuffer
> stays in fundamental-mode, and doesn't visit a file so none of those are
> triggered.  Possible patch attached (some additional manual updates +
> NEWS would be needed for define-globalized-minor-mode change).

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Thu, 15 Aug 2019 00:59:01 GMT) Full text and rfc822 format available.

Message #62 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 36886 <at> debbugs.gnu.org, sanelz <at> gmail.com
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Wed, 14 Aug 2019 20:58:12 -0400
[Message part 1 (text/plain, inline)]
Updated patch attached.  I'll push in a few days, assuming nothing else
turns up.

[0001-Respect-global-eldoc-mode-in-minibuffers-Bug-36886.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Thu, 15 Aug 2019 08:32:02 GMT) Full text and rfc822 format available.

Message #65 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Štěpán Němec <stepnem <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, sanelz <at> gmail.com,
 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2; (global-eldoc-mode -1) should disable eldoc
 completely
Date: Thu, 15 Aug 2019 10:31:28 +0200
On Wed, 14 Aug 2019 20:58:12 -0400
Noam Postavsky wrote:

> Updated patch attached.  I'll push in a few days, assuming nothing else
> turns up.

[snip]

> @@ -384,7 +387,9 @@ define-globalized-minor-mode
>  

[...]

> +
> +\(fn GLOBAL-MODE MODE TURN-ON [KEY VALUE]... BODY)"

I think this should read "BODY..." to indicate zero or more body forms?

Thanks,

  Štěpán




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36886; Package emacs. (Wed, 21 Aug 2019 00:25:02 GMT) Full text and rfc822 format available.

Message #68 received at 36886 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Štěpán Němec <stepnem <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, sanelz <at> gmail.com,
 36886 <at> debbugs.gnu.org
Subject: Re: bug#36886: 26.2;
 (global-eldoc-mode -1) should disable eldoc completely
Date: Tue, 20 Aug 2019 20:24:08 -0400
tags 36886 fixed
close 36886 27.1
quit

Štěpán Němec <stepnem <at> gmail.com> writes:

>> +\(fn GLOBAL-MODE MODE TURN-ON [KEY VALUE]... BODY)"
>
> I think this should read "BODY..." to indicate zero or more body forms?

Thanks for catching that.  Fixed and pushed to master.

7e2090ee80 2019-08-20T20:20:52-04:00 "Respect global-eldoc-mode in minibuffers (Bug#36886)"
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=7e2090ee80c9099ee953392444e1d73d10e973d4





Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 21 Aug 2019 00:25:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 36886 <at> debbugs.gnu.org and Sanel Zukan <sanelz <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 21 Aug 2019 00:25:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Sep 2019 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.