From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: master 6e5d79c048: Display show-paren-context-when-offscreen in child frame Date: Mon, 07 Feb 2022 15:08:56 +0100 Message-ID: <8735kuah78.fsf@gnu.org> References: <164414267475.11015.16458968298391656164@vcs2.savannah.gnu.org> <20220206101755.0EC03C002F9@vcs2.savannah.gnu.org> <871r0f7k6u.fsf@gnus.org> <87czjzlb1h.fsf@yahoo.com> <877da79p7y.fsf@gnu.org> <86leym6bxa.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1522"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.7; emacs 29.0.50 Cc: Po Lu , Lars Ingebrigtsen , emacs-devel@gnu.org To: Arash Esbati Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 07 15:56:42 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nH5Ra-0000C7-Do for ged-emacs-devel@m.gmane-mx.org; Mon, 07 Feb 2022 15:56:42 +0100 Original-Received: from localhost ([::1]:40166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH5RY-0007az-T9 for ged-emacs-devel@m.gmane-mx.org; Mon, 07 Feb 2022 09:56:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH4vf-0003jM-L1 for emacs-devel@gnu.org; Mon, 07 Feb 2022 09:23:43 -0500 Original-Received: from [2001:470:142:3::e] (port=52772 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH4vf-0005km-7v; Mon, 07 Feb 2022 09:23:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=qgMtrUsUDZEfC0b1yl64zTEd8b0Is3m3ZKYQFhXeNq0=; b=UHHtdx35cJuFMJ r2MnVqmSxHMOoEkTLXql/vcxrWTjW03b5xePx9X1VO4JQ3E5K7uw8SVnlcDiey+jIBG4ffgiuksDz gIt/PVxjHOUN4vxmoWNqpm0G+/cRInC63emtk/pyEz0jciWcqNtAaMmqhZ9AsqWox7bfgaK+Idl7v UtYXKVIIqnmM+woDr/5niMlAEwa1ccxuslEDu5QzVRAYPJoy8Eeib4ND/2kMPMN1nmMOuFjg7DThw W0J8tY2CcpbbulYfJMvCfkIJAMtlPCboqhQ8MQAxHYxVQKcybhNa2oxFDkBl8+uDd25MX/k17wA+e usm3fEwOaN7RAc8m878w==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:34697) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nH4ve-0008GF-NN; Mon, 07 Feb 2022 09:23:42 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 48FAE27C0054; Mon, 7 Feb 2022 09:23:42 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 07 Feb 2022 09:23:42 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdeiudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpeevve eikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvg hsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleek qdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 09:23:41 -0500 (EST) In-reply-to: <86leym6bxa.fsf@gnu.org> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286052 Archived-At: Arash Esbati 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