unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52841: show-paren paring error in org-mode source blocks
@ 2021-12-28  4:01 Yilkal Argaw
  2021-12-28 12:55 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Yilkal Argaw @ 2021-12-28  4:01 UTC (permalink / raw)
  To: 52841

show-paren-mode works fairly well in lisp source codes but the pairing
does not work in emacs source blocks. For example it pairs ) with <.

An example source code is in the following source code

#+begin_src emacs-lisp

  (if (not (version< emacs-version "27.0"))
      (progn
    (if (fboundp 'native-comp-available-p) (setq comp-deferred-compilation t))
    (setq warning-suppress-types '((flycheck syntax-checker) (comp))))
    )

#+end_src





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

* bug#52841: show-paren paring error in org-mode source blocks
  2021-12-28  4:01 bug#52841: show-paren paring error in org-mode source blocks Yilkal Argaw
@ 2021-12-28 12:55 ` Eli Zaretskii
  2021-12-29 15:41   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-12-28 12:55 UTC (permalink / raw)
  To: Yilkal Argaw; +Cc: 52841

> From: Yilkal Argaw <yilkalargawworkneh@gmail.com>
> Date: Tue, 28 Dec 2021 07:01:37 +0300
> 
> show-paren-mode works fairly well in lisp source codes but the pairing
> does not work in emacs source blocks. For example it pairs ) with <.
> 
> An example source code is in the following source code
> 
> #+begin_src emacs-lisp
> 
>   (if (not (version< emacs-version "27.0"))
>       (progn
>     (if (fboundp 'native-comp-available-p) (setq comp-deferred-compilation t))
>     (setq warning-suppress-types '((flycheck syntax-checker) (comp))))
>     )
> 
> #+end_src

Isn't this a problem specific to Org?  If so, please report it to the
Org bug address first.

Thanks.





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

* bug#52841: show-paren paring error in org-mode source blocks
  2021-12-28 12:55 ` Eli Zaretskii
@ 2021-12-29 15:41   ` Lars Ingebrigtsen
  2021-12-29 17:07     ` Eli Zaretskii
  2021-12-29 21:08     ` Stefan Kangas
  0 siblings, 2 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-29 15:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Yilkal Argaw, 52841

Eli Zaretskii <eliz@gnu.org> writes:

>> #+begin_src emacs-lisp
>> 
>>   (if (not (version< emacs-version "27.0"))
>>       (progn
>>     (if (fboundp 'native-comp-available-p) (setq comp-deferred-compilation t))
>>     (setq warning-suppress-types '((flycheck syntax-checker) (comp))))
>>     )
>> 
>> #+end_src
>
> Isn't this a problem specific to Org?  If so, please report it to the
> Org bug address first.

Well, you see it in any mode that displays code blocks, like in Gnus.
Doesn't rmail fontify that block of code for you?

I can reproduce the problem in Gnus, too, but I'm not that familiar with
how show-paren works -- does it just use the syntax properties in the
buffer?  In which case I don't know how to fix this, because in Gnus
article buffers, <> have parenthesis syntax.

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





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

* bug#52841: show-paren paring error in org-mode source blocks
  2021-12-29 15:41   ` Lars Ingebrigtsen
@ 2021-12-29 17:07     ` Eli Zaretskii
  2021-12-29 17:14       ` Lars Ingebrigtsen
  2021-12-29 21:08     ` Stefan Kangas
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-12-29 17:07 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: yilkalargawworkneh, 52841

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Yilkal Argaw <yilkalargawworkneh@gmail.com>,  52841@debbugs.gnu.org
> Date: Wed, 29 Dec 2021 16:41:09 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> #+begin_src emacs-lisp
> >> 
> >>   (if (not (version< emacs-version "27.0"))
> >>       (progn
> >>     (if (fboundp 'native-comp-available-p) (setq comp-deferred-compilation t))
> >>     (setq warning-suppress-types '((flycheck syntax-checker) (comp))))
> >>     )
> >> 
> >> #+end_src
> >
> > Isn't this a problem specific to Org?  If so, please report it to the
> > Org bug address first.
> 
> Well, you see it in any mode that displays code blocks, like in Gnus.
> Doesn't rmail fontify that block of code for you?

No, and I'm infinitely grateful that it doesn't.

> I can reproduce the problem in Gnus, too, but I'm not that familiar with
> how show-paren works -- does it just use the syntax properties in the
> buffer?

Yes, it does.





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

* bug#52841: show-paren paring error in org-mode source blocks
  2021-12-29 17:07     ` Eli Zaretskii
@ 2021-12-29 17:14       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-29 17:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: yilkalargawworkneh, 52841

Eli Zaretskii <eliz@gnu.org> writes:

>> I can reproduce the problem in Gnus, too, but I'm not that familiar with
>> how show-paren works -- does it just use the syntax properties in the
>> buffer?
>
> Yes, it does.

Hm...  but the parentheses machines has the concept of matching pairs,
right?  Let's see...

    (modify-syntax-entry ?> ")<" table)
    (modify-syntax-entry ?< "(>" table)

Right.  So why does it think that < is the opening char for )?

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





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

* bug#52841: show-paren paring error in org-mode source blocks
  2021-12-29 15:41   ` Lars Ingebrigtsen
  2021-12-29 17:07     ` Eli Zaretskii
@ 2021-12-29 21:08     ` Stefan Kangas
       [not found]       ` <CAJddU=o9KA-Uh16rS8-ir5mTuOR7oQL=9xqtgG2PLezfDtpg+g@mail.gmail.com>
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2021-12-29 21:08 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Yilkal Argaw, 52841

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Well, you see it in any mode that displays code blocks, like in Gnus.

If it helps, I can confirm that I see this bug with notmuch as well.





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

* bug#52841: show-paren paring error in org-mode source blocks
       [not found]       ` <CAJddU=o9KA-Uh16rS8-ir5mTuOR7oQL=9xqtgG2PLezfDtpg+g@mail.gmail.com>
@ 2022-01-02  1:34         ` Stefan Kangas
  2022-01-02  1:52           ` Yilkal Argaw
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2022-01-02  1:34 UTC (permalink / raw)
  To: Yilkal Argaw; +Cc: 52841

[Please use "Reply to all" so the discussion is in the bug tracker.]

Yilkal Argaw <yilkalargawworkneh@gmail.com> writes:

> You can also see a similar situation in org-tables and example table
> is the following
>
> |-----------------------------------+---------|
> | Logical Expression                | Meaning |
> |-----------------------------------+---------|
> | if ["$variable1" \< "$variable2"] |         |
> |-----------------------------------+---------|
> | if ["$variable1" \> "$variable2"] |         |
> |-----------------------------------+---------|

Thanks.

(This reply is only so that this ends up in the bug tracker.)





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

* bug#52841: show-paren paring error in org-mode source blocks
  2022-01-02  1:34         ` Stefan Kangas
@ 2022-01-02  1:52           ` Yilkal Argaw
  0 siblings, 0 replies; 8+ messages in thread
From: Yilkal Argaw @ 2022-01-02  1:52 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 52841

Will do, thanks!

On Sun, Jan 2, 2022 at 4:34 AM Stefan Kangas <stefan@marxist.se> wrote:
>
> [Please use "Reply to all" so the discussion is in the bug tracker.]
>
> Yilkal Argaw <yilkalargawworkneh@gmail.com> writes:
>
> > You can also see a similar situation in org-tables and example table
> > is the following
> >
> > |-----------------------------------+---------|
> > | Logical Expression                | Meaning |
> > |-----------------------------------+---------|
> > | if ["$variable1" \< "$variable2"] |         |
> > |-----------------------------------+---------|
> > | if ["$variable1" \> "$variable2"] |         |
> > |-----------------------------------+---------|
>
> Thanks.
>
> (This reply is only so that this ends up in the bug tracker.)





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

end of thread, other threads:[~2022-01-02  1:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-28  4:01 bug#52841: show-paren paring error in org-mode source blocks Yilkal Argaw
2021-12-28 12:55 ` Eli Zaretskii
2021-12-29 15:41   ` Lars Ingebrigtsen
2021-12-29 17:07     ` Eli Zaretskii
2021-12-29 17:14       ` Lars Ingebrigtsen
2021-12-29 21:08     ` Stefan Kangas
     [not found]       ` <CAJddU=o9KA-Uh16rS8-ir5mTuOR7oQL=9xqtgG2PLezfDtpg+g@mail.gmail.com>
2022-01-02  1:34         ` Stefan Kangas
2022-01-02  1:52           ` Yilkal Argaw

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