* bug#45114: perl-mode warns about mismatched parentheses wrongly
@ 2020-12-08 5:45 積丹尼 Dan Jacobson
2020-12-08 6:23 ` Eli Zaretskii
2020-12-08 11:13 ` Harald Jörg
0 siblings, 2 replies; 8+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-12-08 5:45 UTC (permalink / raw)
To: 45114
$ emacs file.pl # and start typing
if(/^[^}]/) ...
During the process you will get spurious warnings about mismatched
parentheses etc.
emacs-version "27.1"
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#45114: perl-mode warns about mismatched parentheses wrongly
2020-12-08 5:45 bug#45114: perl-mode warns about mismatched parentheses wrongly 積丹尼 Dan Jacobson
@ 2020-12-08 6:23 ` Eli Zaretskii
2020-12-08 6:38 ` 積丹尼 Dan Jacobson
2020-12-08 11:13 ` Harald Jörg
1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2020-12-08 6:23 UTC (permalink / raw)
To: 45114, jidanni
On December 8, 2020 7:45:03 AM GMT+02:00, "積丹尼 Dan Jacobson" <jidanni@jidanni.org> wrote:
> $ emacs file.pl # and start typing
> if(/^[^}]/) ...
>
> During the process you will get spurious warnings about mismatched
> parentheses etc.
>
> emacs-version "27.1"
This is a well documented feature. If you don't like it, turn off blink-matching-paren.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#45114: perl-mode warns about mismatched parentheses wrongly
2020-12-08 6:23 ` Eli Zaretskii
@ 2020-12-08 6:38 ` 積丹尼 Dan Jacobson
2020-12-08 7:04 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-12-08 6:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 45114
>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> This is a well documented feature. If you don't like it, turn off blink-matching-paren.
But that would ruin it outside of regular expressions too.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#45114: perl-mode warns about mismatched parentheses wrongly
2020-12-08 6:38 ` 積丹尼 Dan Jacobson
@ 2020-12-08 7:04 ` Eli Zaretskii
2020-12-08 7:09 ` 積丹尼 Dan Jacobson
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2020-12-08 7:04 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 45114
On December 8, 2020 8:38:25 AM GMT+02:00, "積丹尼 Dan Jacobson" <jidanni@jidanni.org> wrote:
> >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>
> EZ> This is a well documented feature. If you don't like it, turn off
> blink-matching-paren.
>
> But that would ruin it outside of regular expressions too.
I see nothing special about regular expressions in this context. Parens matching is useful there as well as anywhere else.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#45114: perl-mode warns about mismatched parentheses wrongly
2020-12-08 7:04 ` Eli Zaretskii
@ 2020-12-08 7:09 ` 積丹尼 Dan Jacobson
2020-12-08 7:14 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-12-08 7:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 45114
>>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> I see nothing special about regular expressions in this context. Parens matching is useful there as well as anywhere else.
/[
means we are entering characters that stand on their own, that _should
not be thought to match_ previous characters.
As I am entering the regexp, emacs should not tell me that
/[}
is wrong.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#45114: perl-mode warns about mismatched parentheses wrongly
2020-12-08 7:09 ` 積丹尼 Dan Jacobson
@ 2020-12-08 7:14 ` Eli Zaretskii
0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2020-12-08 7:14 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 45114
On December 8, 2020 9:09:51 AM GMT+02:00, "積丹尼 Dan Jacobson" <jidanni@jidanni.org> wrote:
> >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
> EZ> I see nothing special about regular expressions in this context.
> Parens matching is useful there as well as anywhere else.
>
> /[
>
> means we are entering characters that stand on their own, that _should
> not be thought to match_ previous characters.
>
> As I am entering the regexp, emacs should not tell me that
>
> /[}
>
> is wrong.
I disagree.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#45114: perl-mode warns about mismatched parentheses wrongly
2020-12-08 5:45 bug#45114: perl-mode warns about mismatched parentheses wrongly 積丹尼 Dan Jacobson
2020-12-08 6:23 ` Eli Zaretskii
@ 2020-12-08 11:13 ` Harald Jörg
2020-12-08 12:03 ` Stefan Kangas
1 sibling, 1 reply; 8+ messages in thread
From: Harald Jörg @ 2020-12-08 11:13 UTC (permalink / raw)
To: 積丹尼 Dan Jacobson; +Cc: 45114
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> $ emacs file.pl # and start typing
> if(/^[^}]/) ...
>
> During the process you will get spurious warnings about mismatched
> parentheses etc.
>
> emacs-version "27.1"
This is a general Emacs-ism: The warning appears in any mode, not just
in Perl mode. So, in any environment of Perl mode: in code, but also in
strings, comments, and POD - and in character classes of a regex.
Whenever you type [}, the warning will appear (also in Gnus' message
mode, as I just experienced).
The current message texts "Mismatched parentheses" and "No matching
parenthesis found" _look_ pretty much like error messages from a
compiler, or from a syntax-aware programming mode. They always make me
wince.
I suggest to change the message texts to clarify that no effort was
taken to find out whether the mismatch is significant, like this:
Note: no matching paren shown
Would that be acceptable?
I guess this bug can be merged with Bug#24299?
--
Cheers,
haj
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#45114: perl-mode warns about mismatched parentheses wrongly
2020-12-08 11:13 ` Harald Jörg
@ 2020-12-08 12:03 ` Stefan Kangas
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Kangas @ 2020-12-08 12:03 UTC (permalink / raw)
To: Harald Jörg, 積丹尼 Dan Jacobson; +Cc: 45114
forcemerge 24299 45114
thanks
haj@posteo.de (Harald Jörg) writes:
> I guess this bug can be merged with Bug#24299?
Yes, done.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-12-08 12:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-08 5:45 bug#45114: perl-mode warns about mismatched parentheses wrongly 積丹尼 Dan Jacobson
2020-12-08 6:23 ` Eli Zaretskii
2020-12-08 6:38 ` 積丹尼 Dan Jacobson
2020-12-08 7:04 ` Eli Zaretskii
2020-12-08 7:09 ` 積丹尼 Dan Jacobson
2020-12-08 7:14 ` Eli Zaretskii
2020-12-08 11:13 ` Harald Jörg
2020-12-08 12:03 ` Stefan Kangas
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.