Subject: bug#64547: closed (Re: bug#64547: `show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 15 Jul 2023 07:22:02 +0000

Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
64547: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64547
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#64547: `show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Sat, 15 Jul 2023 10:22:10 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Sat, 15 Jul 2023 01:06:54 +0000
> From: [email-masked]
> Cc: [email-masked], [email-masked]
> 
> 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.

Subject: `show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't
From: Okamsn <[email-masked]>
To: [email-masked]
Date: Sun, 09 Jul 2023 19:49:06 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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.