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: okamsn <at> protonmail.com
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64547 <at> debbugs.gnu.org, stephen.berman <at> gmx.net
Subject: bug#64547: `show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't
Date: Sat, 15 Jul 2023 01:06:54 +0000
On 2023-07-14 06:44 UTC, Eli Zaretskii wrote:
>> Date: Fri, 14 Jul 2023 03:03:31 +0000
>> From: okamsn <at> protonmail.com
>> Cc: 64547 <at> debbugs.gnu.org, Stephen Berman <stephen.berman <at> gmx.net>
>>
>> On 2023-07-10 14:17 UTC, Eli Zaretskii wrote:
>>>
>>> Thanks, should be fixed now on the emacs-29 branch.
>>
>> Hello,
>>
>> The change fixed it for the minibuffer, but also disabled it when the
>> opening parenthesis was offscreen.  I think this is because
>> `(pos-visible-in-window-p openparen nil t)` seems to return nil in that
>> case.
> 
> Disabled what?  Can you post a detailed recipe, and the description of
> what you see and what you expected to see?  I'd like to make sure I
> understand the issue we are discussing now.
> 
> Thanks.

Sorry, I meant that the new change stopped showing the overlay in the 
normal buffers in addition to the minibuffer. I was expecting it to only 
stop showing the overlay for the minibuffer when the opening parenthesis 
was visible.

These are the steps I took:

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?

Thank you.








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.