GNU bug report logs -
#61051
treesit-install-language-grammar can provide the default repository URL
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Wed, 25 Jan 2023 03:24:01 UTC
Severity: normal
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 25 Jan 2023 17:23:31 +0200
with message-id <77a1d0e0-f4d9-1f7b-73f0-5dff9aaa59f2 <at> yandex.ru>
and subject line Re: bug#61051: treesit-install-language-grammar can provide the default repository URL
has caused the debbugs.gnu.org bug report #61051,
regarding treesit-install-language-grammar can provide the default repository URL
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
61051: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61051
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
The format https://github.com/tree-sitter/tree-sitter-%s will work for a
lot of languages, and the user won't even have to search for the address.
The patch can look like this:
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 660039cc7cc..c1b98d085e8 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -2708,7 +2708,8 @@ treesit--install-language-grammar-build-recipe
(list
lang
(read-string
- "Enter the URL of the Git repository of the language grammar: ")
+ "Enter the URL of the Git repository of the language grammar: "
+ (format "https://github.com/tree-sitter/tree-sitter-%s" lang))
(empty-string-to-nil
(read-string
"Enter the tag or branch (default: default branch): "))
[Message part 3 (message/rfc822, inline)]
On 25/01/2023 16:50, Eli Zaretskii wrote:
>> Date: Wed, 25 Jan 2023 16:00:48 +0200
>> Cc:61051 <at> debbugs.gnu.org
>> From: Dmitry Gutov<dgutov <at> yandex.ru>
>>
>>>> - "Enter the URL of the Git repository of the language grammar: ")
>>>> + "Enter the URL of the Git repository of the language grammar: "
>>>> + (format"https://github.com/tree-sitter/tree-sitter-%s" lang))
>>>> (empty-string-to-nil
>>>> (read-string
>>>> "Enter the tag or branch (default: default branch): "))
>>> Sounds good, but wouldn't we confuse users in those cases where the
>>> Tree-sitter site doesn't have a grammar? Would it be perhaps feasible
>>> to probe first that a Git repository at the URL exists?
>> Sure, how about this:
> LGTM, thanks.
Installed, thank you.
This bug report was last modified 2 years and 115 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.