emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60696: closed (30.0.50; tree-sitter: node representation breaks `pp-


From: GNU bug Tracking System
Subject: bug#60696: closed (30.0.50; tree-sitter: node representation breaks `pp-buffer')
Date: Tue, 10 Jan 2023 04:20:02 +0000

Your message dated Mon, 9 Jan 2023 20:18:55 -0800
with message-id <C1AED7FF-30BD-415E-808B-8F675F3638D0@gmail.com>
and subject line Re: bug#60696: 30.0.50; tree-sitter: node representation 
breaks  `pp-buffer'
has caused the debbugs.gnu.org bug report #60696,
regarding 30.0.50; tree-sitter: node representation breaks `pp-buffer'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
60696: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60696
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; tree-sitter: node representation breaks `pp-buffer' Date: Mon, 09 Jan 2023 22:01:40 +0000
Nodes appear pretty-printed like this:

     #<treesit-node 
       (block)
       in 159-173>

Because `pp-buffer' uses `downward-list' and `upward-list' to
determine list boundaries and where to line break.

The solution is to perhaps consider using a different notation than
`(block)' in the printed representation of the object. (Or make
`pp-buffer' much smarter, but that is perhaps far more work.)


In GNU Emacs 30.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version
 3.24.20, cairo version 1.16.0) of 2023-01-02 built on mickey-work
Repository revision: c209802f7b3721a1b95113290934a23fee88f678
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04.3 LTS

Configured using:
 'configure --with-native-compilation --with-json --with-mailutils
 --without-compress-install --with-imagemagick CC=gcc-10'




--- End Message ---
--- Begin Message --- Subject: Re: bug#60696: 30.0.50; tree-sitter: node representation breaks `pp-buffer' Date: Mon, 9 Jan 2023 20:18:55 -0800
Mickey Petersen <mickey@masteringemacs.org> writes:

> Nodes appear pretty-printed like this:
>
>      #<treesit-node 
>        (block)
>        in 159-173>
>
> Because `pp-buffer' uses `downward-list' and `upward-list' to
> determine list boundaries and where to line break.
>
> The solution is to perhaps consider using a different notation than
> `(block)' in the printed representation of the object. (Or make
> `pp-buffer' much smarter, but that is perhaps far more work.)

I see, and I guess using parenthesizes inside an object could break other 
things.
Although I like the correspondence between query syntax and printed node
type [1], it’s probably better not print parenthesizes inside an object.
Now that node is printed as #<treesit-node block in 159-173>

[1] (block) -> #<treesit-node (block) in ...>
    ";"     -> #<treesit-node ";" in ...>

Yuan


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]