unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: okamsn--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64547@debbugs.gnu.org, Stephen Berman <stephen.berman@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	[thread overview]
Message-ID: <276ec144-7853-944e-1edc-4a48b5567854@protonmail.com> (raw)
In-Reply-To: <83lefn97gd.fsf@gnu.org>

On 2023-07-10 14:17 UTC, Eli Zaretskii wrote:
>> From: Stephen Berman <stephen.berman@gmx.net>
>> Cc: Okamsn <okamsn@protonmail.com>,  64547@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.






  reply	other threads:[~2023-07-14  3:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-09 19:49 bug#64547: `show-paren-mode` thinks that a paren is offscreen in `M-:` when it isn't Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-10 12:15 ` Eli Zaretskii
2023-07-10 13:26   ` Stephen Berman
2023-07-10 14:17     ` Eli Zaretskii
2023-07-14  3:03       ` okamsn--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-07-14  6:44         ` Eli Zaretskii
2023-07-15  1:06           ` okamsn--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-15  7:22             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=276ec144-7853-944e-1edc-4a48b5567854@protonmail.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=64547@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=okamsn@protonmail.com \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).