unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Arash Esbati <arash@gnu.org>
Cc: Po Lu <luangruo@yahoo.com>, Lars Ingebrigtsen <larsi@gnus.org>,
	emacs-devel@gnu.org
Subject: Re: master 6e5d79c048: Display show-paren-context-when-offscreen in child frame
Date: Mon, 07 Feb 2022 15:08:56 +0100	[thread overview]
Message-ID: <8735kuah78.fsf@gnu.org> (raw)
In-Reply-To: <86leym6bxa.fsf@gnu.org>

Arash Esbati <arash@gnu.org> writes:

Hi all,

>> But you are right that an overlay could do the job, too.  I'll give
>> that a try.
>
> Many thanks for implementing this feature -- I was looking for this
> for a long time :-)

Thanks!

> In case you need some inspiration for an implementation with overlays,
> you can have a look here:

Too late, I'm already done. :-)

Here's a patch which implements both showing the context in an overlay
and in the header-line in addition to the already pushed child-frame
approach (just set show-paren-context-when-offscreen to either
'child-frame, 'overlay, or 'header-line for comparison).

In the overlay and header-line cases, I replace newlines in the context
string with spaces so that the context always only takes one line.
(Note to self: probably that should be cut to window-width, too, so that
you don't get continuation lines which would cause the buffer text to
"bounce down and back up again".)

The overlay approach has the problem that the context text isn't
outstanding visually.  With the child-frame approach, one can customize
the child-frame-border face's :background to get a nice and outstanding
look.  Is there a way to make the context text a bit more outstanding?
Since it's a buffer-substring, it's usually font-locked already and that
should be kept, of course.

The header-line approach has the problem that the text "bounces" because
usually there is no header-line, so its toggled on and off again.  But
at least, the context text is immediately distinguishable.

So all in all, I still like the child-frame approach best but have no
problem with offering the other options as well.

Bye,
Tassilo



  reply	other threads:[~2022-02-07 14:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <164414267475.11015.16458968298391656164@vcs2.savannah.gnu.org>
     [not found] ` <20220206101755.0EC03C002F9@vcs2.savannah.gnu.org>
2022-02-06 21:35   ` master 6e5d79c048: Display show-paren-context-when-offscreen in child frame Lars Ingebrigtsen
2022-02-07  1:28     ` Po Lu
2022-02-07  5:52       ` Tassilo Horn
2022-02-07 13:31         ` Arash Esbati
2022-02-07 14:08           ` Tassilo Horn [this message]
2022-02-07 15:45             ` Tassilo Horn
2022-02-07 18:13             ` Arash Esbati
2022-02-07 19:30               ` Tassilo Horn
2022-02-08  8:25                 ` Arash Esbati
2022-02-08  8:55                   ` Tassilo Horn
2022-02-09 12:45                   ` Tassilo Horn
2022-02-09 13:26                     ` Po Lu
2022-02-09 13:28                       ` Tassilo Horn
2022-02-09 13:42                         ` Po Lu
2022-02-09 13:45                           ` Tassilo Horn
2022-02-09 14:16                             ` Tassilo Horn
2022-02-10  1:58                               ` Po Lu
2022-02-14 12:41                               ` Po Lu
2022-02-14 13:41                                 ` Tassilo Horn
2022-02-09 13:50                         ` Arash Esbati
2022-02-09 18:22                       ` martin rudalics
2022-02-08  0:54         ` Po Lu
2022-02-08 12:00           ` Tassilo Horn
2022-02-08  1:43         ` Po Lu
2022-02-08  6:59           ` Tassilo Horn
2022-02-08  9:01             ` martin rudalics
2022-02-08  9:21               ` Po Lu
2022-02-08 10:06               ` Tassilo Horn

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=8735kuah78.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=arash@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.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).