emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Show show-paren context in a child frame


From: Daniel Martín
Subject: Re: Show show-paren context in a child frame
Date: Sat, 05 Feb 2022 19:00:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin)

Tassilo Horn <tsdh@gnu.org> writes:

> Hi all,
>
> today I've discovered `show-paren-context-when-offscreen' which displays
> the context around the opening paren in the echo area.  That's a very
> nice feature, however it competes with eldoc, i.e., it'll show the
> context in the echo area and a fraction of a second later, that's
> repressed by eldoc's text (or the other way round depending on the
> delays one uses).

I'm glad you like the feature! Yes, unfortunately there are some cases
where this feature competes with Eldoc.  I taught
`eldoc-display-message-no-interference-p' about this new option, but
perhaphs the mechanism needs some more refinement.

>
> Therefore, I've experimented with adding a special `child-frame' value
> for `show-paren-context-when-offscreen' which displays the context in a
> child frame.  This works pretty well although setting up a child frame
> with corresponding buffer for a kind of tooltip pane requires quite some
> gymnastics in frame parameters and buffer-local variables which I've
> copied from vertico.  Comments welcome!

Thank you! I've given your code a try and I think it can be a useful
option.  Some comments:

- Is there a way to make the header more prominent? I feel it can be
  easily confused with the rest of the buffer.  Perhaps putting a thin
  border around the child frame might be enough.

- I've found an error when I clicked on the child frame by mistake and
  scrolled (I wanted to scroll the parent frame instead):

mouse-scroll-subr: Wrong type argument: window-live-p, #<window 386> [30
times]

Not sure if it's a bug in the child frame API or in the way you use it;
I'm not familiar enough with the child frame API.

- The way the child frame is positioned makes me think that using the
  header line would be more reliable and imply much less code than using
  a child frame.  I'd like to give a header line-based approach a try to
  see how it compares against using a child frame.  To make it a good
  citizen, we need to store the current contents of the header line and
  restore them when the point is not in a closing delimiter.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]