unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54551: show-paren-mode inconsistency
@ 2022-03-24 20:13 goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-24 20:28 ` Eli Zaretskii
  2022-03-24 21:34 ` Phil Sainty
  0 siblings, 2 replies; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-24 20:13 UTC (permalink / raw)
  To: 54551

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

I am using show-paren-mode to highlight watching opening or closing parentheses.

Have seen that putting the cursor on the opening brace highlights the closing brace. But putting the cursor does not highlight the opening brace. One has to go to the character following the closing brace. Because elisp customarily has many consecutive closing braces, using the consecutive character to highlight the matching opening brace is counter productive.

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

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

* bug#54551: show-paren-mode inconsistency
  2022-03-24 20:13 bug#54551: show-paren-mode inconsistency goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-24 20:28 ` Eli Zaretskii
  2022-03-24 22:48   ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-24 21:34 ` Phil Sainty
  1 sibling, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2022-03-24 20:28 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

> Date: Thu, 24 Mar 2022 20:13:55 +0000
> From:  goncholden via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> I am using show-paren-mode to highlight watching opening or closing parentheses. 
> 
> Have seen that putting the cursor on the opening brace highlights the closing brace. But putting the cursor
> does not highlight the opening brace. One has to go to the character following the closing brace. Because
> elisp customarily has many consecutive closing braces, using the consecutive character to highlight the
> matching opening brace is counter productive.

This is so typing the closing brace shows the matching opening brace.
With your proposal, when I type the closing brace, the opening one
will not be highlighted.

So this is by design, and for a good reason.





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

* bug#54551: show-paren-mode inconsistency
  2022-03-24 20:13 bug#54551: show-paren-mode inconsistency goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-24 20:28 ` Eli Zaretskii
@ 2022-03-24 21:34 ` Phil Sainty
  2022-03-25 16:25   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 21+ messages in thread
From: Phil Sainty @ 2022-03-24 21:34 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

On 2022-03-25 09:13, goncholden wrote:
> I am using show-paren-mode to highlight watching opening or closing
> parentheses.
> 
> Have seen that putting the cursor on the opening brace highlights the
> closing brace. But putting the cursor does not highlight the opening
> brace. One has to go to the character following the closing brace.

It's consistent, but you're confused because you think that the cursor
indicates a character rather than a position *between* two characters.

If you customize `cursor-⁠type' to the Vertical Bar option you will
have a more literal view of the cursor, and see what `show-⁠paren-⁠mode'
is actually doing.


-⁠Phil






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

* bug#54551: show-paren-mode inconsistency
  2022-03-24 20:28 ` Eli Zaretskii
@ 2022-03-24 22:48   ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  0:12     ` Phil Sainty
  2022-03-25  6:47     ` Eli Zaretskii
  0 siblings, 2 replies; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-24 22:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 54551


------- Original Message -------

On Friday, March 25th, 2022 at 8:28 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Thu, 24 Mar 2022 20:13:55 +0000
> >
> > From: goncholden via "Bug reports for GNU Emacs,
> >
> > the Swiss army knife of text editors" bug-gnu-emacs@gnu.org
> >
> > I am using show-paren-mode to highlight watching opening or closing parentheses.
> >
> > Have seen that putting the cursor on the opening brace highlights the closing brace. But putting the cursor
> >
> > does not highlight the opening brace. One has to go to the character following the closing brace. Because
> >
> > elisp customarily has many consecutive closing braces, using the consecutive character to highlight the
> >
> > matching opening brace is counter productive.
>
> This is so typing the closing brace shows the matching opening brace.
>
> With your proposal, when I type the closing brace, the opening one
>
> will not be highlighted.
>
> So this is by design, and for a good reason.

Thank you for the explanation.

Consider the following command

(setq initial-frame-alist '((width . 72) (height . 26)) ).

Would be instructive that when one puts the cursor in the space between (width . 72) and (height . 26), the entire (width . 72) (height . 26) would be highlighted.

But (setq show-paren-when-point-inside-paren t) does not do that.
Can be very non-intuitive when debugging.  Also, if you put the cursor on the parenthesis following (height . 26), only (height . 26) gets highlighted, rather than the entire (height . 26) (height . 26).

Could some improvements be done about this?







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

* bug#54551: show-paren-mode inconsistency
  2022-03-24 22:48   ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-25  0:12     ` Phil Sainty
  2022-03-25  4:20       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  6:47     ` Eli Zaretskii
  1 sibling, 1 reply; 21+ messages in thread
From: Phil Sainty @ 2022-03-25  0:12 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

On 2022-03-25 11:48, goncholden wrote:
> Consider the following command
> 
> (setq initial-frame-alist '((width . 72) (height . 26)) ).
> 
> Would be instructive that when one puts the cursor in the space
> between (width . 72) and (height . 26), the entire (width . 72)
> (height . 26) would be highlighted.

That wouldn't make any sense for show-paren-mode.

The cursor (point) is either between the ")" and " " characters, or
else between the " " and "(" characters.  Those are the only two
possibilities, and in each case you would expect show-paren-mode to
highlight the adjacent expression (to the left or to the right of the
cursor, respectively).


> But (setq show-paren-when-point-inside-paren t) does not do that.

It's not documented as doing that, so there's not reason to expect
that it might.


I think you're looking for this library:

https://www.emacswiki.org/emacs/HighlightSexp







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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  0:12     ` Phil Sainty
@ 2022-03-25  4:20       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  4:29         ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  4:57         ` Phil Sainty
  0 siblings, 2 replies; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-25  4:20 UTC (permalink / raw)
  To: Phil Sainty; +Cc: 54551

------- Original Message -------

On Friday, March 25th, 2022 at 12:12 PM, Phil Sainty <psainty@orcon.net.nz> wrote:

> On 2022-03-25 11:48, goncholden wrote:

> > Consider the following command
> >   (setq initial-frame-alist '((width . 72) (height . 26)) ).
> > Would be instructive that when one puts the cursor in the space
> > between (width . 72) and (height . 26), the entire (width . 72)
> > (height . 26) would be highlighted.

> That wouldn't make any sense for show-paren-mode.

> The cursor (point) is either between the ")" and " " characters, or
> else between the " " and "(" characters. Those are the only two
> possibilities, and in each case you would expect show-paren-mode to
> highlight the adjacent expression (to the left or to the right of the
> cursor, respectively).

I use the block colouring of the cursor, meaning that your valid description
in not so intuitive.  Would it be possible to include a different interpretation
depending on the type of cursor display one is using?

> > But (setq show-paren-when-point-inside-paren t) does not do that.

> It's not documented as doing that, so there's not reason to expect
> that it might.
>
> I think you're looking for this library:
>   https://www.emacswiki.org/emacs/HighlightSexp

Will try it out and report back about it.






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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  4:20       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-25  4:29         ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  4:57         ` Phil Sainty
  1 sibling, 0 replies; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-25  4:29 UTC (permalink / raw)
  To: Phil Sainty; +Cc: 54551

------- Original Message -------

On Friday, March 25th, 2022 at 4:20 PM, goncholden <goncholden@protonmail.com> wrote:

> ------- Original Message -------
>
> On Friday, March 25th, 2022 at 12:12 PM, Phil Sainty psainty@orcon.net.nz wrote:
>
> > On 2022-03-25 11:48, goncholden wrote:
>
> > > Consider the following command
> > >   (setq initial-frame-alist '((width . 72) (height . 26)) ).
> > > Would be instructive that when one puts the cursor in the space
> > > between (width . 72) and (height . 26), the entire (width . 72)
> > > (height . 26) would be highlighted.

> > That wouldn't make any sense for show-paren-mode.

> > The cursor (point) is either between the ")" and " " characters, or
> > else between the " " and "(" characters. Those are the only two
> > possibilities, and in each case you would expect show-paren-mode to
> > highlight the adjacent expression (to the left or to the right of the
> > cursor, respectively).

> I use the block colouring of the cursor, meaning that your valid description
> in not so intuitive. Would it be possible to include a different interpretation
> depending on the type of cursor display one is using?

> > > But (setq show-paren-when-point-inside-paren t) does not do that.

> > It's not documented as doing that, so there's not reason to expect
> > that it might.

> > I think you're looking for this library:
> >   https://www.emacswiki.org/emacs/HighlightSexp

> Will try it out and report back about it.

Is HighlightSexp only relevant for use with lisp-mode-hook and emacs-lisp-mode-hook ?






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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  4:20       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  4:29         ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-25  4:57         ` Phil Sainty
  2022-03-25  5:23           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 21+ messages in thread
From: Phil Sainty @ 2022-03-25  4:57 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

On 2022-03-25 17:20, goncholden wrote:
> I use the block colouring of the cursor, meaning that your
> valid description in not so intuitive.  Would it be possible
> to include a different interpretation depending on the type
> of cursor display one is using?

The position at point is the same no matter what the cursor
looks like, and the behaviour is based on where point is, so
for the current code the appearance of the cursor is irrelevant.

You *could* make the code test the cursor type and change its
behaviour in accordance with what it thought the cursor looked
like, but I'd really recommend just getting familiar with the
existing (and very consistent) behaviour, and remembering what
it is that the cursor actually represents.


> > I think you're looking for this library:
> > https://www.emacswiki.org/emacs/HighlightSexp
> 
> Is HighlightSexp only relevant for use with lisp-mode-hook
> and emacs-lisp-mode-hook ?

Anything lisp-based should certainly work, but it's more generic
than that.  Not every major mode would be relevant, but you can
experiment with different modes and see whether it works.


-Phil






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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  4:57         ` Phil Sainty
@ 2022-03-25  5:23           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  5:53             ` Phil Sainty
  0 siblings, 1 reply; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-25  5:23 UTC (permalink / raw)
  To: Phil Sainty; +Cc: 54551

------- Original Message -------
On Friday, March 25th, 2022 at 4:57 PM, Phil Sainty <psainty@orcon.net.nz> wrote:
> On 2022-03-25 17:20, goncholden wrote:

> > I use the block colouring of the cursor, meaning that your
> > valid description in not so intuitive. Would it be possible
> > to include a different interpretation depending on the type
> > of cursor display one is using?

> The position at point is the same no matter what the cursor
> looks like, and the behaviour is based on where point is, so
> for the current code the appearance of the cursor is irrelevant.

> You could make the code test the cursor type and change its
> behaviour in accordance with what it thought the cursor looked
> like, but I'd really recommend just getting familiar with the
> existing (and very consistent) behaviour, and remembering what
> it is that the cursor actually represents.

> > > I think you're looking for this library:
> > > https://www.emacswiki.org/emacs/HighlightSexp

> > Is HighlightSexp only relevant for use with lisp-mode-hook
> > and emacs-lisp-mode-hook ?

> Anything lisp-based should certainly work, but it's more generic
> than that. Not every major mode would be relevant, but you can
> experiment with different modes and see whether it works.

> -Phil

Have tried to figure out the background colour used by show-paren-mode
after setting show-paren-when-point-inside-paren to t.  But have not
got to its determination.






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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  5:23           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-25  5:53             ` Phil Sainty
  0 siblings, 0 replies; 21+ messages in thread
From: Phil Sainty @ 2022-03-25  5:53 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

On 2022-03-25 18:23, goncholden wrote:
> Have tried to figure out the background colour used by show-paren-mode
> after setting show-paren-when-point-inside-paren to t.  But have not
> got to its determination.

M-x customize-group RET paren-showing-faces






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

* bug#54551: show-paren-mode inconsistency
  2022-03-24 22:48   ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  0:12     ` Phil Sainty
@ 2022-03-25  6:47     ` Eli Zaretskii
  2022-03-25  7:10       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2022-03-25  6:47 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

> Date: Thu, 24 Mar 2022 22:48:35 +0000
> From: goncholden <goncholden@protonmail.com>
> Cc: 54551@debbugs.gnu.org
> 
> Consider the following command
> 
> (setq initial-frame-alist '((width . 72) (height . 26)) ).
> 
> Would be instructive that when one puts the cursor in the space between (width . 72) and (height . 26), the entire (width . 72) (height . 26) would be highlighted.

Why only "(width . 72) (height . 26)" and not the entire setq
expression?

Or maybe I don't understand what you mean by "instructive", i.e. what
exactly would you like Emacs to show you and why?

show-paren-mode has a specific goal: to show you the matching
parenthesis in an unobtrusive way, and do that as you type as well as
when you move through the code.  That is the "instructive" role that
it takes up upon itself.  It sounds like you want something else,
which would then call for a different feature with different visuals
(parenthesized expressions tend to nest, so being "inside" one of them
means you are "inside" all of the outer ones, and displaying them
calls for a different technique than what show-paren does).

> But (setq show-paren-when-point-inside-paren t) does not do that.
> Can be very non-intuitive when debugging.

For debugging, I suggest that you use C-M-u.

> Also, if you put the cursor on the parenthesis following (height . 26), only (height . 26) gets highlighted, rather than the entire (height . 26) (height . 26).

What do you mean by "the entire (height . 26)"?  Did you try to set
show-paren-style to 'expression', and if not, does it do what you
want?





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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  6:47     ` Eli Zaretskii
@ 2022-03-25  7:10       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  7:21         ` Eli Zaretskii
  2022-03-25  8:51         ` Stephen Berman
  0 siblings, 2 replies; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-25  7:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 54551

------- Original Message -------
On Friday, March 25th, 2022 at 6:47 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Thu, 24 Mar 2022 22:48:35 +0000
> > From: goncholden goncholden@protonmail.com
> > Cc: 54551@debbugs.gnu.org
> >
> > Consider the following command
> >
> > (setq initial-frame-alist '((width . 72) (height . 26)) ).
> >
> > Would be instructive that when one puts the cursor in the space between (width . 72) and (height . 26), the entire (width . 72) (height . 26) would be highlighted.
>
> Why only "(width . 72) (height . 26)" and not the entire setq expression?
>
> Or maybe I don't understand what you mean by "instructive", i.e. what
>
> exactly would you like Emacs to show you and why?
>
> show-paren-mode has a specific goal: to show you the matching
>
> parenthesis in an unobtrusive way, and do that as you type as well as
>
> when you move through the code. That is the "instructive" role that
>
> it takes up upon itself. It sounds like you want something else,
>
> which would then call for a different feature with different visuals
>
> (parenthesized expressions tend to nest, so being "inside" one of them
>
> means you are "inside" all of the outer ones, and displaying them
>
> calls for a different technique than what show-paren does).
>
> > But (setq show-paren-when-point-inside-paren t) does not do that.
> >
> > Can be very non-intuitive when debugging.
>
> For debugging, I suggest that you use C-M-u.
>
> > Also, if you put the cursor on the parenthesis following (height . 26), only (height . 26) gets highlighted, rather than the entire (height . 26) (height . 26).
>
> What do you mean by "the entire (height . 26)"? Did you try to set
> show-paren-style to 'expression', and if not, does it do what you
> want?

I had been trying "(customize-set-variable 'show-paren-when-point-inside-paren t)".
It has been suggested to me to try "highlight-sexp", which seems to work better than
the functionality provided by show-paren-when-point-inside-paren.

With "highlight-sexp", placing cursor after "(width . 72)" does highlight
"(width . 72) (height . 26)" for the expression
"(setq initial-frame-alist '((width . 72) (height . 26)) )"

"highlight-sexp" does highlight the innermost expression, not so with
"show-paren-when-point-inside-paren".

You are making sense, but I wondered if you could see possibilities for
improvements to "show-paren-mode".

I am debugging a problem where emacs states that there exists an extra
closing parenthesis, but having extreme difficulty locating it.

Have split the file in two and using "require" on a child file.  Otherwise
I have to comment each line of code rather than whole sections.  Commenting
each line is likely to introduce errors if one is not very careful removing
the comment tags.















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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  7:10       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-25  7:21         ` Eli Zaretskii
  2022-03-25  8:35           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  8:51         ` Stephen Berman
  1 sibling, 1 reply; 21+ messages in thread
From: Eli Zaretskii @ 2022-03-25  7:21 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

> Date: Fri, 25 Mar 2022 07:10:36 +0000
> From: goncholden <goncholden@protonmail.com>
> Cc: 54551@debbugs.gnu.org
> 
> I am debugging a problem where emacs states that there exists an extra
> closing parenthesis, but having extreme difficulty locating it.

For this, I propose one of the following methods, or their
combination:

  . use C-M-f to move forward by sexps in your init file
  . watch for show-paren to show the closing parenthesis in the
    "mismatched" color

> Have split the file in two and using "require" on a child file.  Otherwise
> I have to comment each line of code rather than whole sections.  Commenting
> each line is likely to introduce errors if one is not very careful removing
> the comment tags.

You could instead mark a region of the file, and then use
comment-region.

I don't think any of this, or the problem you are trying to solve, is
relevant to what show-paren does, though.





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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  7:21         ` Eli Zaretskii
@ 2022-03-25  8:35           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25 10:15             ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-25  8:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 54551

Sent with ProtonMail secure email.
------- Original Message -------
On Friday, March 25th, 2022 at 7:21 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Fri, 25 Mar 2022 07:10:36 +0000
> >
> > From: goncholden goncholden@protonmail.com
> >
> > Cc: 54551@debbugs.gnu.org
> >
> > I am debugging a problem where emacs states that there exists an extra
> >
> > closing parenthesis, but having extreme difficulty locating it.
>
> For this, I propose one of the following methods, or their
>
> combination:
>
> . use C-M-f to move forward by sexps in your init file
> . watch for show-paren to show the closing parenthesis in the
> "mismatched" color
>
> > Have split the file in two and using "require" on a child file. Otherwise
> > I have to comment each line of code rather than whole sections. Commenting
> > each line is likely to introduce errors if one is not very careful removing
> > the comment tags.

> You could instead mark a region of the file, and then use
> comment-region.

> I don't think any of this, or the problem you are trying to solve, is
> relevant to what show-paren does, though.

Not to what show-paren does, but about tools to isolate or focus on specific
sections of code.  Could there be a way to ignore sections of code without
requiring commenting?






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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  7:10       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25  7:21         ` Eli Zaretskii
@ 2022-03-25  8:51         ` Stephen Berman
  2022-03-25  9:32           ` Phil Sainty
  2022-03-25 11:47           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 2 replies; 21+ messages in thread
From: Stephen Berman @ 2022-03-25  8:51 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

On Fri, 25 Mar 2022 07:10:36 +0000 goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> wrote:

> I am debugging a problem where emacs states that there exists an extra
> closing parenthesis, but having extreme difficulty locating it.
>
> Have split the file in two and using "require" on a child file.  Otherwise
> I have to comment each line of code rather than whole sections.  Commenting
> each line is likely to introduce errors if one is not very careful removing
> the comment tags.

Have you tried calling `check-parens' in the files?

Steve Berman





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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  8:51         ` Stephen Berman
@ 2022-03-25  9:32           ` Phil Sainty
  2022-03-25 11:47           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 21+ messages in thread
From: Phil Sainty @ 2022-03-25  9:32 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 54551, goncholden

On 2022-03-25 21:51, Stephen Berman wrote:
> Have you tried calling `check-parens' in the files?

I think this is a continuation of 
https://emacs.stackexchange.com/q/71076
in which various things were tried to no avail.

I feel that "put the files online somewhere for other people to look at"
is the sensible next move.


-Phil






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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  8:35           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-25 10:15             ` Eli Zaretskii
  0 siblings, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2022-03-25 10:15 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

> Date: Fri, 25 Mar 2022 08:35:09 +0000
> From: goncholden <goncholden@protonmail.com>
> Cc: 54551@debbugs.gnu.org
> 
> > I don't think any of this, or the problem you are trying to solve, is
> > relevant to what show-paren does, though.
> 
> Not to what show-paren does, but about tools to isolate or focus on specific
> sections of code.  Could there be a way to ignore sections of code without
> requiring commenting?

Several people just gave you advice about some ways of doing that.





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

* bug#54551: show-paren-mode inconsistency
  2022-03-25  8:51         ` Stephen Berman
  2022-03-25  9:32           ` Phil Sainty
@ 2022-03-25 11:47           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25 11:56             ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-25 11:47 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 54551

------- Original Message -------

On Friday, March 25th, 2022 at 8:51 PM, Stephen Berman <stephen.berman@gmx.net> wrote:

> On Fri, 25 Mar 2022 07:10:36 +0000 goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs@gnu.org wrote:
>
> > I am debugging a problem where emacs states that there exists an extra
> >
> > closing parenthesis, but having extreme difficulty locating it.
> >
> > Have split the file in two and using "require" on a child file. Otherwise
> >
> > I have to comment each line of code rather than whole sections. Commenting
> >
> > each line is likely to introduce errors if one is not very careful removing
> >
> > the comment tags.
>
> Have you tried calling `check-parens' in the files?
> Steve Berman

Have not played with that, no.





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

* bug#54551: show-paren-mode inconsistency
  2022-03-25 11:47           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-25 11:56             ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-03-25 12:00               ` Stephen Berman
  0 siblings, 1 reply; 21+ messages in thread
From: goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-03-25 11:56 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 54551

------- Original Message -------

On Friday, March 25th, 2022 at 11:47 PM, goncholden <goncholden@protonmail.com> wrote:

> ------- Original Message -------
>
> On Friday, March 25th, 2022 at 8:51 PM, Stephen Berman stephen.berman@gmx.net wrote:
>
> > On Fri, 25 Mar 2022 07:10:36 +0000 goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" bug-gnu-emacs@gnu.org wrote:
> >
> > > I am debugging a problem where emacs states that there exists an extra
> > >
> > > closing parenthesis, but having extreme difficulty locating it.
> > >
> > > Have split the file in two and using "require" on a child file. Otherwise
> > >
> > > I have to comment each line of code rather than whole sections. Commenting
> > >
> > > each line is likely to introduce errors if one is not very careful removing
> > >
> > > the comment tags.
> >
> > Have you tried calling `check-parens' in the files?
> >
> > Steve Berman
>
> Have not played with that, no.

Need some assistance on using check-parens.  Have done
"M-x check-parens", what do I have to do after that, and what should I check?






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

* bug#54551: show-paren-mode inconsistency
  2022-03-25 11:56             ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-03-25 12:00               ` Stephen Berman
  0 siblings, 0 replies; 21+ messages in thread
From: Stephen Berman @ 2022-03-25 12:00 UTC (permalink / raw)
  To: goncholden; +Cc: 54551

On Fri, 25 Mar 2022 11:56:50 +0000 goncholden <goncholden@protonmail.com> wrote:

> ------- Original Message -------
>
> On Friday, March 25th, 2022 at 11:47 PM, goncholden
> <goncholden@protonmail.com> wrote:
>
>> ------- Original Message -------
>>
>> On Friday, March 25th, 2022 at 8:51 PM, Stephen Berman
>> stephen.berman@gmx.net wrote:
>>
>> > On Fri, 25 Mar 2022 07:10:36 +0000 goncholden via "Bug reports for GNU
>> > Emacs, the Swiss army knife of text editors" bug-gnu-emacs@gnu.org wrote:
>> >
>> > > I am debugging a problem where emacs states that there exists an extra
>> > >
>> > > closing parenthesis, but having extreme difficulty locating it.
>> > >
>> > > Have split the file in two and using "require" on a child file. Otherwise
>> > >
>> > > I have to comment each line of code rather than whole sections. Commenting
>> > >
>> > > each line is likely to introduce errors if one is not very careful removing
>> > >
>> > > the comment tags.
>> >
>> > Have you tried calling `check-parens' in the files?
>> >
>> > Steve Berman
>>
>> Have not played with that, no.
>
> Need some assistance on using check-parens.  Have done
> "M-x check-parens", what do I have to do after that, and what should I check?

If `check-parens' finds an unbalanced parenthesis, it moves point to
that position.  If point doesn't change in the buffer you called
`check-parens' in, then that buffer has no unbalanced parentheses.

Steve Berman





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

* bug#54551: show-paren-mode inconsistency
  2022-03-24 21:34 ` Phil Sainty
@ 2022-03-25 16:25   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 21+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-25 16:25 UTC (permalink / raw)
  To: Phil Sainty; +Cc: 54551, goncholden

Phil Sainty <psainty@orcon.net.nz> writes:

> It's consistent, but you're confused because you think that the cursor
> indicates a character rather than a position *between* two characters.

This doesn't seem to be a bug, so I'm closing this report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2022-03-25 16:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24 20:13 bug#54551: show-paren-mode inconsistency goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-24 20:28 ` Eli Zaretskii
2022-03-24 22:48   ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25  0:12     ` Phil Sainty
2022-03-25  4:20       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25  4:29         ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25  4:57         ` Phil Sainty
2022-03-25  5:23           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25  5:53             ` Phil Sainty
2022-03-25  6:47     ` Eli Zaretskii
2022-03-25  7:10       ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25  7:21         ` Eli Zaretskii
2022-03-25  8:35           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25 10:15             ` Eli Zaretskii
2022-03-25  8:51         ` Stephen Berman
2022-03-25  9:32           ` Phil Sainty
2022-03-25 11:47           ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25 11:56             ` goncholden via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-25 12:00               ` Stephen Berman
2022-03-24 21:34 ` Phil Sainty
2022-03-25 16:25   ` Lars Ingebrigtsen

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