unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32851: 26.1.50; show-paren-mode disables off-screen-paren-match
@ 2018-09-27  9:35 Stefan Guath
  2018-09-27 10:43 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Guath @ 2018-09-27  9:35 UTC (permalink / raw)
  To: 32851

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

SUMMARY
When show-paren-mode is enabled, the setting (setq blink-matching-paren
'jump-offscreen) is disabled, which is annoying.

DESCRIPTION
When show-paren-mode is enabled, the only respected setting for
blink-matching-paren is "any other non-nil value" which echos matched
parens only when they are off-screen. The settings t, 'jump and
'jump-offscreen are disabled.

I can understand why the settings t and 'jump are disregarded since it
would just be a redundant functionality of show-paren-mode. But I don't
understand why the setting 'jump-offscreen is disregarded. I think it's a
better option than "echo match off screen paren" since i) a jump (i.e. a
scroll) gives more context than a one-liner in the echo area, and ii) it's
very convenient to get a semantic based scroll operation automatically.

[-- Attachment #2: Type: text/html, Size: 1023 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#32851: 26.1.50; show-paren-mode disables off-screen-paren-match
  2018-09-27  9:35 bug#32851: 26.1.50; show-paren-mode disables off-screen-paren-match Stefan Guath
@ 2018-09-27 10:43 ` Eli Zaretskii
  2018-09-27 11:15   ` Stefan Guath
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2018-09-27 10:43 UTC (permalink / raw)
  To: Stefan Guath; +Cc: 32851

> From: Stefan Guath <stefan@automata.se>
> Date: Thu, 27 Sep 2018 11:35:06 +0200
> 
> When show-paren-mode is enabled, the only respected setting for blink-matching-paren is "any other non-nil
> value" which echos matched parens only when they are off-screen. The settings t, 'jump and 'jump-offscreen
> are disabled.
> 
> I can understand why the settings t and 'jump are disregarded since it would just be a redundant functionality
> of show-paren-mode. But I don't understand why the setting 'jump-offscreen is disregarded. I think it's a better
> option than "echo match off screen paren" since i) a jump (i.e. a scroll) gives more context than a one-liner in
> the echo area, and ii) it's very convenient to get a semantic based scroll operation automatically.

Did you try to remove the condition that show-paren-mode is active?
When I try that, I see an unpleasant effect: when blink-matching-paren
jumps off-screen, the wrong opening parenthesis is highlighted
(although the jump is to the right place).

So allowing jump-offscreen and show-paren-mode to coexist will need
more changes than just removing the condition.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#32851: 26.1.50; show-paren-mode disables off-screen-paren-match
  2018-09-27 10:43 ` Eli Zaretskii
@ 2018-09-27 11:15   ` Stefan Guath
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Guath @ 2018-09-27 11:15 UTC (permalink / raw)
  To: eliz; +Cc: 32851

[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]

Yes, if I comment out the line "(not show-paren-mode)" in the function
blink-matching-open, I observe the same thing. During the short time that
the point is temporarily moved to the correct matching paren, the
old/previous highlighted parens are still visible. If they could be updated
before the jump rather than after, then the problem would be solved. But as
you say, that would require more changes to the code. To be honest, the
execution paths in this piece of code is not obvious to me, so I'm rather
puzzled where to begin...

On Thu, Sep 27, 2018 at 12:43 PM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Stefan Guath <stefan@automata.se>
> > Date: Thu, 27 Sep 2018 11:35:06 +0200
> >
> > When show-paren-mode is enabled, the only respected setting for
> blink-matching-paren is "any other non-nil
> > value" which echos matched parens only when they are off-screen. The
> settings t, 'jump and 'jump-offscreen
> > are disabled.
> >
> > I can understand why the settings t and 'jump are disregarded since it
> would just be a redundant functionality
> > of show-paren-mode. But I don't understand why the setting
> 'jump-offscreen is disregarded. I think it's a better
> > option than "echo match off screen paren" since i) a jump (i.e. a
> scroll) gives more context than a one-liner in
> > the echo area, and ii) it's very convenient to get a semantic based
> scroll operation automatically.
>
> Did you try to remove the condition that show-paren-mode is active?
> When I try that, I see an unpleasant effect: when blink-matching-paren
> jumps off-screen, the wrong opening parenthesis is highlighted
> (although the jump is to the right place).
>
> So allowing jump-offscreen and show-paren-mode to coexist will need
> more changes than just removing the condition.
>

[-- Attachment #2: Type: text/html, Size: 2267 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-27 11:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-27  9:35 bug#32851: 26.1.50; show-paren-mode disables off-screen-paren-match Stefan Guath
2018-09-27 10:43 ` Eli Zaretskii
2018-09-27 11:15   ` Stefan Guath

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).