Recent activity

Re: External links broken in blog's RSS feed 10 days ago

From Yuan Fu to ~casouri/public-inbox


> On Mar 15, 2025, at 7:59 PM, Visuwesh <visuweshm@gmail.com> wrote:
> 
>> Good day Yuan!
>> 
>> When I was reading the post about your font (I really like it!), I
>> noticed the external links are malformed in the RSS feed.
>> 
>> Compare:
>> 
>>    <a href="https://archive.casouri.cc/note/2025/boritina/https:/klim.co.nz/retail-fonts/martina-plantijn">Martina Plantijn</a>
>> 
>> in atom.xml with:

Re: Tree-sitter Changes in Emacs 30 2 months ago

From Yuan Fu to ~casouri/public-inbox


> On Jan 1, 2025, at 7:26 AM, Lester Longley <lester@ieee.org> wrote:
> 
> Hi Yuan,
> 
> Re: https://archive.casouri.cc/note/2024/emacs-30-tree-sitter/
> 
> (1) Should "treesit-navigate-things" be "treesit-navigate-thing"?
> 
> ref. https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/treesit.el?h=emacs-30#n2688
> 
> (2) Also, example "(treesit-thing-at-point 'sexp)" doesn't seem to
> match declaration in treesit.el (branch emacs-30), in that "tactic"

Re: Using Fontsets in Emacs 1 year, 4 months ago

From Yuan Fu to ~casouri/public-inbox

> 
> I stumbled upon this article when finding how to configure a Chinese
> font for Emacs. Then I noticed the links at the footer of the article, I
> was inspired by the use of mailing list, which is really suitable for
> comments, thank you!

Replies like this always make my day, thanks for letting me know!

Yuan

Re: Minor link issue on https://archive.casouri.cc 1 year, 6 months ago

From Yuan Fu to ~casouri/public-inbox


> On Sep 16, 2023, at 2:24 AM, Noboru Ota <me@nobiot.com> wrote:
> 
> Hi Yuan,
> 
> I enjoy reading your notes. I've come to your website via your Emacs
> work, Xeft, and am delighted to learn about your interest in type and
> Pollen.
> 
> There seems to be a very minor link issue on the RSS link in your page
> at `https://archive.casouri.cc/note/index.html`.
> 
> The RSS link on it is `https://archive.casouri.cc/note/note/atom.xml`.

Re: Why should tree-sitter modes be separate modes? 2 years ago

From Yuan Fu to ~casouri/public-inbox


> On Jan 22, 2023, at 5:13 PM, Jim Blandy <jimb@red-bean.com> wrote:
> 
> The starter guide says:
> 
>> Tree-sitter modes should be separate major modes, usually named xxx-ts-mode.
> 
> I'm a maintainer of rust-mode, and it seems to me that rust-mode
> should simply use tree-sitter when it's available, and fall back to
> the old techniques otherwise. But I'm new to treesit in Emacs, so I
> don't have the full picture.
> 
> Why do you recommend keeping the tree-sitter and traditional modes separate?

Re: Tree-sitter Starter Guide 2 years ago

From Yuan Fu to ~casouri/public-inbox


> On Jan 18, 2023, at 9:29 AM, Van Ly <van.ly@sdf.org> wrote:
> 
> 
> Hello,
> 
> At the section, 1 Build Emacs with tree-sitter, the following two sudo
> commands were needed otherwise the Emacs 29 build step fails unable to
> find the shared object file.
> 
>  git clone https://github.com/tree-sitter/tree-sitter.git
>  cd tree-sitter
>  make

Re: 自动处理网页里的全角引号和标点挤压 3 years ago

From Yuan Fu to ~casouri/public-inbox

> 今天看到了你的网站上的这篇关于网页全角引号和标点挤压的文章,很有收获,感谢分享!
> 
> 另外反馈一个问题,你的网站的默认英文字体许多系统上都没有,导致英文中出现全角引号,我在Linux PC和Android手机上浏览都是这样的。

谢谢你的反馈!没想到Charter会没有。好在Charter是自由字体,我会把字体传到站上。

Re: Tree-sitter api 3 years ago

From Yuan Fu to ~emacs/emacs-devel


> On Dec 18, 2021, at 11:11 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Sat, 18 Dec 2021 18:51:25 -0800
>> Cc: Philipp <p.stephani2@gmail.com>,
>> ubolonton@gmail.com,
>> theo@thornhill.no,
>> cpitclaudel@gmail.com,
>> emacs-devel@gnu.org,
>> monnier@iro.umontreal.ca,
>> stephen_leake@stephe-leake.org,
>> john@yates-sheets.org

Re: Tree-sitter api 3 years ago

From Yuan Fu to ~theo/clws-devel


> On Dec 18, 2021, at 11:11 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Sat, 18 Dec 2021 18:51:25 -0800
>> Cc: Philipp <p.stephani2@gmail.com>,
>> ubolonton@gmail.com,
>> theo@thornhill.no,
>> cpitclaudel@gmail.com,
>> emacs-devel@gnu.org,
>> monnier@iro.umontreal.ca,
>> stephen_leake@stephe-leake.org,
>> john@yates-sheets.org

Re: Tree-sitter api 3 years ago

From Yuan Fu to ~emacs/emacs-devel

>> 
>>> Would you please ping the authors and tell them that this single issue
>>> prevents us from integrating TS into Emacs?  Maybe that would change
>>> their priorities.  I cannot imagine that the feature we are asking is
>>> hard to implement.
>> 
>> That feature in itself won't be enough.  Even with it, TreeSitter will have the same problem as GMP: allocation isn't allowed to fail, and longjmp'ing out of it isn't allowed and generally causes undefined behavior.
> 
> It may not be enough to satisfy purists, but it's enough to allow the
> user to save the session and shut down Emacs in an orderly fashion,
> instead of abruptly exiting and losing all the edits.

Uses can set tree-sitter-maximum-size to limit memory usage of tree-sitter. Buffers with size larger than that cannot enable tree-sitter. That doesn’t solve the problem directly but should let users avoid allocation failing most of the time.