GNU bug report logs - #64547
`show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't

Previous Next

Package: emacs;

Reported by: Okamsn <okamsn <at> protonmail.com>

Date: Sun, 9 Jul 2023 19:50:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#64547: closed (`show-paren-mode` thinks that a paren is
 offscreen in `M-:` when it isn't)
Date: Sat, 15 Jul 2023 07:22:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 15 Jul 2023 10:22:10 +0300
with message-id <838rbhej19.fsf <at> gnu.org>
and subject line Re: bug#64547: `show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't
has caused the debbugs.gnu.org bug report #64547,
regarding `show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
64547: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64547
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Okamsn <okamsn <at> protonmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: `show-paren-mode` thinks that a paren is offscreen in `M-:` when it
 isn't
Date: Sun, 09 Jul 2023 19:49:06 +0000
[Message part 3 (text/plain, inline)]
Hello,

I have `show-paren-style` set to `mixed` and 
`show-paren-context-when-offscreen` set to `overlay`.

When using `eval-expression`, `show-paren` thinks that the starting 
parenthesis is offscreen.

I have attached images showing how, although I am typing on the same 
line as the parenthesis, the context overlay is still shown.

With `show-paren-when-point-inside-paren` enabled, typing before the 
closing parenthesis causes the prompt of `M-:` to be shown before 
quickly being hidden by the context overlay again. This causes text to 
quickly move side to side as I type. I have attached a screen recording 
of this movement.

This is in Emacs 29.0.92. If it is relevant, I have `line-spacing` set 
to 0.15.

Thank you.
[without-context.png (image/png, attachment)]
[with-context.png (image/png, attachment)]
[show-paren-movement.mp4 (video/mp4, attachment)]
[Message part 7 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: okamsn <at> protonmail.com
Cc: stephen.berman <at> gmx.net, 64547-done <at> debbugs.gnu.org
Subject: Re: bug#64547: `show-paren-mode` thinks that a paren is offscreen in
 `M-:` when it isn't
Date: Sat, 15 Jul 2023 10:22:10 +0300
> Date: Sat, 15 Jul 2023 01:06:54 +0000
> From: okamsn <at> protonmail.com
> Cc: 64547 <at> debbugs.gnu.org, stephen.berman <at> gmx.net
> 
> 1) Start `emacs -q` without the new change to paren.el.
> 
> 2) Set `show-paren-context-when-offscreen` to `overlay`.
> 
> 3) In a normal buffer (not the minibuffer), move to the end of a long 
> expression so that the starting parenthesis is no longer on the screen 
> and is not visible.
> 
> 4) See the overlay, as expected.
> 
> 5) Move inside the expression so that the overlay is no longer shown.
> 
> 6) Evaluate the new definition of `show-paren-function`.
> 
> 7) Move back to the end of the long expression.
> 
> 8) See that the overlay is no longer shown.
> 
> 
> I expected to see that the overlay would still be shown for the opening 
> parenthesis that is completely unseen.
> 
> I think that this happens because there is an expression `(not ... (or 
> (< (length part) 4) ...))` which resolves to `nil` when the parenthesis 
> is not visible and not partially visible, from what I can tell.
> 
> Does this make sense?

Thanks, now fixed as you suggested, and closing the bug.


This bug report was last modified 1 year and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.