unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Felician Nemeth <felician.nemeth@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: Yuan Fu <casouri@gmail.com>, 42532@debbugs.gnu.org
Subject: bug#42532: 28.0.50; Can eldoc-prefer-doc-buffer be more aggressive?
Date: Sat, 26 Sep 2020 14:58:24 +0200	[thread overview]
Message-ID: <87imc08zkf.fsf@betli.tmit.bme.hu> (raw)
In-Reply-To: <87zh61x5es.fsf@gmail.com> ("João Távora"'s message of "Mon, 07 Sep 2020 11:11:39 +0100")

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

>> Regardless, I think it's reasonable to add a third possible value 
>> for eldoc-prefer-doc-buffer (which should really be renamed 
>> eldoc-echo-area-prefer-doc-buffer).  The value could be the symbol
>> 'aggressive or 'aggressively.  Then it would behave as you propose:
>> if the ElDoc doc buffer is showing, the echo area display code is 
>> a noop.
>>
>> What do you think?
>
> Instead of an abstract idea, here's an actual patch you can try on top
> of the current eldoc.el
> [...]

Thank you.  I've finally tried the patch out with different settings of
eldoc-echo-area-prefer-doc-buffer and eldoc-echo-area-use-multiline-p.
It works as I wished when eldoc-echo-area-prefer-doc-buffer is
'aggressively.  And it works in line with the documentation in most
cases.  However, if I understand the documentation correctly, it doesn't
work as intended with

   (setq eldoc-echo-area-use-multiline-p nil)
   (setq eldoc-echo-area-prefer-doc-buffer t)

For example, with the attached file, moving the point right after "emacs
-Q --load ./bug.el" displays the truncated documentation in the echo
area, but it shouldn't.


[-- Attachment #2: bug.el --]
[-- Type: #("application/emacs-lisp" 0 22 (face iswitchb-current-match)), Size: 861 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 max-mini-window-height 2)
(setq eldoc-echo-area-use-multiline-p nil)
;;(setq eldoc-echo-area-use-multiline-p t)
;;(setq eldoc-echo-area-prefer-doc-buffer 'aggressively)
(setq eldoc-echo-area-prefer-doc-buffer t)
;;(setq eldoc-echo-area-prefer-doc-buffer nil)
(setq eldoc-documentation-functions '(elisp-eldoc-var-docstring elisp-eldoc-funcall  t))



  reply	other threads:[~2020-09-26 12:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imc08zkf.fsf@betli.tmit.bme.hu \
    --to=felician.nemeth@gmail.com \
    --cc=42532@debbugs.gnu.org \
    --cc=casouri@gmail.com \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).