unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42532: 28.0.50; Can eldoc-prefer-doc-buffer be more aggressive?
@ 2020-07-25 18:17 Felician Nemeth
  2020-09-07  8:38 ` João Távora
  0 siblings, 1 reply; 7+ messages in thread
From: Felician Nemeth @ 2020-07-25 18:17 UTC (permalink / raw)
  To: 42532; +Cc: João Távora

[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]

With the attached file, start emacs as:

  emacs -Q --load bug.el

and then move the point left or right.  Originally I started to write
this file as demonstration to bug#42421, but you fixed the bug faster
than I could find time to finish it.  Now, I think everything works as
documented, but with the help of this recipe, I'd like to argue that
eldoc-prefer-doc-buffer is a bit annoying in this case.  Its
documentation says:

   Prefer ElDoc’s documentation buffer if it is showing in some frame.
   If this variable’s value is t and a piece of documentation needs to
   be truncated to fit in the echo area, do so if ElDoc’s documentation
   buffer is not already showing, since the buffer always holds the full
   documentation.

I think it would be better to show the documentation only in the *eldoc*
buffer and not in the echo area even if the documentation doesn't need
to be truncated but the echo are needs to be resized to display the full
documentation.

(bug.el changes eldoc-documentation-function to circumvent bug#42531,
which I reported few minutes ago, but changing the order of the hooks in
eldoc--eval-expression-setup, doesn't seem to fix bug#42531)

Thank you, João, for your work on eldoc.


[-- Attachment #2: bug.el --]
[-- Type: #("application/emacs-lisp" 0 22 (face iswitchb-current-match)), Size: 624 bytes --]

(defvar my-asdf-asdf-sdf-asdf-asdf-asdf-asdf-sdf-asdf-asdf-asdf-asdfasdf-asdf-sdf-asdf-asdf-asdf-asdfasdf-asdf 1
    "START asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf END")
(switch-to-buffer-other-window "*eldoc*")
(window-resize (get-buffer-window) (- window-min-height (window-height)))
(other-window 1)
(find-file "bug.el")
(goto-char 14)
(setq eldoc-prefer-doc-buffer t)
(setq eldoc-documentation-functions '(elisp-eldoc-var-docstring elisp-eldoc-funcall  t))



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

end of thread, other threads:[~2021-01-15 18:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 18:17 bug#42532: 28.0.50; Can eldoc-prefer-doc-buffer be more aggressive? Felician Nemeth
2020-09-07  8:38 ` João Távora
2020-09-07 10:11   ` João Távora
2020-09-26 12:58     ` Felician Nemeth
2020-10-03 19:18       ` João Távora
2021-01-15 18:00         ` Felician Nemeth
2021-01-15 18:01           ` João Távora

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