Subject: bug#60465: closed (Re: bug#60465: 29.0.60; File missing error when calling treesit-install-language-grammar)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 02 Jan 2023 00:18:02 +0000

Your bug report

#60465: 29.0.60; File missing error when calling treesit-install-language-grammar 

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60465: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60465
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60465: 29.0.60; File missing error when calling treesit-install-language-grammar
From: Yuan Fu <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: Wilhelm <[email-masked]>, [email-masked]
Date: Sun, 1 Jan 2023 16:17:38 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

>> From: Wilhelm Kirschbaum <[email-masked]>
>> Date: Sun, 01 Jan 2023 13:28:38 +0200
>> 
>> I am getting the following if the [home emacs config 
>> dir]/tree-sitter directory don't exist yet. 
>> 
>> Warning (treesit): Error encountered when installing language 
>> grammar:
>> (file-missing Opening output file No such file or directory [home 
>> emacs
>> config dir]/tree-sitter/libtree-sitter-elixir.so)
>> 
>> Adding the following fixes the issue for me:
>
> Thanks.
>
>> Please let me know if I am a bit aggressive with these reports, not
>> sure if I am more annoying or somewhat helpful.
>
> No, not at all.
>
>> Is there perhaps a better way to give feedback?
>
> This is the right way, thank you for doing this.

Yes, this prevents us from forgetting about a reported problem.

Fixed and closing, thanks.

Yuan

Subject: 29.0.60; File missing error when calling treesit-install-language-grammar
From: Wilhelm Kirschbaum <[email-masked]>
To: [email-masked]
Date: Sun, 01 Jan 2023 13:28:38 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

I am getting the following if the [home emacs config 
dir]/tree-sitter directory don't exist yet. 

Warning (treesit): Error encountered when installing language 
grammar:
(file-missing Opening output file No such file or directory [home 
emacs
config dir]/tree-sitter/libtree-sitter-elixir.so)

Adding the following fixes the issue for me:

modified   lisp/treesit.el
@@ -2772,6 +2772,7 @@ treesit--install-language-grammar-1
                       (rx bos (+ anychar) ".o" eos))
                    "-o" ,lib-name))
           ;; Copy out.
+          (make-directory out-dir t)
           (copy-file lib-name (file-name-as-directory out-dir) t 
           t)
           (message "Library installed to %s/%s" out-dir 
           lib-name))
       (when (file-exists-p workdir)

Please let me know if I am a bit aggressive with these reports, 
not sure
if I am more annoying or somewhat helpful. Is there perhaps a 
better
way to give feedback?

Wilhelm