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@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	[thread overview]
Message-ID: <23862422-411d-d519-9b8a-5f12922f1ff2@protonmail.com> (raw)
In-Reply-To: <83bkgf3sc0.fsf@gnu.org>

On 2023-07-14 06:44 UTC, Eli Zaretskii wrote:
>> Date: Fri, 14 Jul 2023 03:03:31 +0000
>> From: okamsn@protonmail.com
>> Cc: 64547@debbugs.gnu.org, Stephen Berman <stephen.berman@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.









  reply	other threads:[~2023-07-15  1:06 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
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 [this message]
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=23862422-411d-d519-9b8a-5f12922f1ff2@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).