unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: mohsin kaleem <mohkale@kisara.moe>
Cc: 48278@debbugs.gnu.org, "João Távora" <joaotavora@gmail.com>
Subject: bug#48278: [kisara.moe] 28.0.50; Allow eldoc-echo-area-prefer-doc-buffer to work across all-frames
Date: Fri, 07 May 2021 17:36:43 +0100	[thread overview]
Message-ID: <878s4q1ox0.fsf@tcd.ie> (raw)
In-Reply-To: <875yzuplai.fsf@kisara.moe> (mohsin kaleem's message of "Fri, 07 May 2021 17:21:09 +0100")

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

mohsin kaleem <mohkale@kisara.moe> writes:

> `eldoc-echo-area-prefer-doc-buffer` is a user option added a short while
> back that lets you avoid eldoc showing in the minibuffer when an
> equivalent buffer containing the eldoc output is currently visible.
> However the current implementation only works for the current frame and
> if eldoc-doc-buffer is visible in another emacsclient frame the
> echo-area still shows eldoc messages in the current frame.

[...]

> We oould do this by modifying adding a new user-option or modifying
> the existing option and allowing a new `'all-frames` value.
>
> Thoughts?

I'd personally consider this a bug, since the first line of
eldoc-echo-area-prefer-doc-buffer's docstring says:

  Prefer ElDoc's documentation buffer if it is showing in some frame.

In which case I'd advocate for this simple fix:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: eldoc.diff --]
[-- Type: text/x-diff, Size: 527 bytes --]

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index b4f068cf3a..cec89cf3bc 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -538,7 +538,7 @@ eldoc--echo-area-prefer-doc-buffer-p
            (and truncatedp
                 (eq eldoc-echo-area-prefer-doc-buffer
                     'maybe)))
-       (get-buffer-window eldoc--doc-buffer)))
+       (get-buffer-window eldoc--doc-buffer 'visible)))
 
 (defun eldoc-display-in-echo-area (docs _interactive)
   "Display DOCS in echo area.

[-- Attachment #3: Type: text/plain, Size: 42 bytes --]


WDYT?  João?

Thanks,

-- 
Basil

  reply	other threads:[~2021-05-07 16:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 16:21 bug#48278: [kisara.moe] 28.0.50; Allow eldoc-echo-area-prefer-doc-buffer to work across all-frames mohsin kaleem
2021-05-07 16:36 ` Basil L. Contovounesios [this message]
2021-05-07 16:41   ` João Távora
2021-05-18 15:38     ` Basil L. Contovounesios
2021-05-30 16:00       ` bug#48278: [kisara.moe] Re: [kisara.moe] " Mohsin Kaleem
2021-05-30 16:03         ` 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=878s4q1ox0.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=48278@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=mohkale@kisara.moe \
    /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).