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 <stephen.berman <at> gmx.net>
Subject: bug#64547: `show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't
Date: Fri, 14 Jul 2023 03:03:31 +0000
On 2023-07-10 14:17 UTC, Eli Zaretskii wrote:
>> From: Stephen Berman <stephen.berman <at> gmx.net>
>> Cc: Okamsn <okamsn <at> protonmail.com>,  64547 <at> debbugs.gnu.org
>> Date: Mon, 10 Jul 2023 15:26:34 +0200
>>
>> 0. emacs -Q
>> 1. M-x customize-option show-paren-style RET.  Choose "mixed" from the
>>     Value Menu and set for current session.
>> 2. M-x customize-option show-paren-context-when-offscreen RET.  Choose
>>     "In overlay" from the Value Menu and set for current session.
>> 3. M-x customize-option line-spacing RET.  Choose "Number" from the
>>     Value Menu, enter 0.06 or greater and set for current session.
>> 4. M-: ()
>> => On typing ")" the "Eval: " prompt vanishes, the string "(" is
>>     displayed with a hollow box over it, followed directly by the string
>>     "()" with a cyan background.  Typing DEL to delete the final ")"
>>     displays the "Eval: " prompt again, the "(" with a hollow box over it
>>     vanishes, and the remaining "(" has no cyan overlay.  Typing any
>>     characters and then ")" at the end again makes the prompt vanishes,
>>     "(" with the hollow box and the cyan overlay return.  Lather, rinse,
>>     repeat...
> 
> 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.

I got it to work by swapping

     (or (< (length part) 4)
         (and
          (< (nth 2 part) dfh4)
          (< (nth 3 part) dfh4)))

with

     (and (>= (length part) 4)
          (< (nth 2 part) dfh4)
          (< (nth 3 part) dfh4))

, which did not re-introduce the problem in the minibuffer.

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.