From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.bugs Subject: bug#51606: 29.0.50; [PATCH] Show offscreen context with properties Date: Fri, 05 Nov 2021 10:40:47 +0100 Message-ID: <86y263hrds.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="29948"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 To: 51606@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 05 10:42:45 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mivkC-0007SR-VK for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Nov 2021 10:42:45 +0100 Original-Received: from localhost ([::1]:55532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mivkB-0004G6-Ml for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Nov 2021 05:42:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mivjW-0003fE-JG for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2021 05:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mivjW-0002nf-Ad for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2021 05:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mivjW-0004J7-8L for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2021 05:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arash Esbati Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Nov 2021 09:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: emacs-bugs Original-Received: via spool by submit@debbugs.gnu.org id=B.163610527116492 (code B ref -1); Fri, 05 Nov 2021 09:42:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Nov 2021 09:41:11 +0000 Original-Received: from localhost ([127.0.0.1]:44850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mivih-0004Hw-6j for submit@debbugs.gnu.org; Fri, 05 Nov 2021 05:41:11 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mivif-0004Ho-Kp for submit@debbugs.gnu.org; Fri, 05 Nov 2021 05:41:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mivif-0002tT-Ed for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2021 05:41:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mivif-0002hV-2q for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2021 05:41:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=GeLv8KDACo8EYOTR2HcOut8Jg8sQH5NRDh6KJsnfWWg=; b=ihPqM8h7Ck4h/l qILgi7NMYCGlf5+cThmPXFcuOt15KQk2vABrMzElnSoBamOdMulR3l1mts+Y0REq41iO6E7k2LG/Y QGRCEWpw0iKhc+TXQsmsOXS5218MGQHfh0X2TjopDtOuK63SQqejnrxxoYRPzWH9DmWbyM5SQ1bLE SQwL5AYPy+mspOYOF9of2vyk78PuqlBuTc1HmJSa2LZLHEbXmZ3aVNEkSLWyvQypjCf9GWfF4+Z2U /idvdKcXiPPAGK0bYyuyGfxCmEwW65Nbn2s1pojNk5T/1Q4yNJMISf3JxVtXJRvOm/2cWyyAZi7Gx L6EWQIYhn9P/UHxC5cog==; Original-Received: from p5b3265dc.dip0.t-ipconnect.de ([91.50.101.220]:55663 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mivie-0000Ga-Nj for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2021 05:41:08 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218985 Archived-At: Hi all, paren.el now can show the context in minibuffer when `show-paren-context-when-offscreen' is non-nil (introduced in this change 9f505c476e). Is it possible to extend this that text properties are not stripped? I'm thinking about something like this: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/paren.el b/lisp/paren.el index 7e7cf6c262..d0330f2f6a 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -96,6 +96,14 @@ show-paren-context-when-offscreen :type 'boolean :version "29.1") +(defcustom show-paren-context-when-offscreen-with-properties nil + "If non-nil, show the offscreen context in the echo area with properties. +It is complementary to `show-paren-context-when-offscreen' and is +taken into account when `show-paren-context-when-offscreen' is +non-nil." + :type 'boolean + :version "29.1") + (defvar show-paren--idle-timer nil) (defvar show-paren--overlay (let ((ol (make-overlay (point) (point) nil t))) (delete-overlay ol) ol) @@ -332,7 +340,9 @@ show-paren-function (message-log-max nil)) (minibuffer-message "Matches %s" - (substring-no-properties open-paren-line-string))))) + (if show-paren-context-when-offscreen-with-properties + open-paren-line-string + (substring-no-properties open-paren-line-string)))))) ;; Always set the overlay face, since it varies. (overlay-put show-paren--overlay 'priority show-paren-priority) (overlay-put show-paren--overlay 'face face)))))) --8<---------------cut here---------------end--------------->8--- Any comments welcome. I will prepare a proper format-patch (incl. update of programs.texi) once this is accepted. Best, Arash