From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 24 22:23:46 2023 Received: (at submit) by debbugs.gnu.org; 25 Jan 2023 03:23:46 +0000 Received: from localhost ([127.0.0.1]:57996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKWO2-0006uy-2e for submit@debbugs.gnu.org; Tue, 24 Jan 2023 22:23:46 -0500 Received: from lists.gnu.org ([209.51.188.17]:51168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKWO0-0006ur-8J for submit@debbugs.gnu.org; Tue, 24 Jan 2023 22:23:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKWNz-0004Yg-Vf for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 22:23:43 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKWNx-0004Nx-Qd for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2023 22:23:43 -0500 Received: by mail-ej1-x632.google.com with SMTP id mg12so44185823ejc.5 for ; Tue, 24 Jan 2023 19:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:sender:from:to:cc:subject :date:message-id:reply-to; bh=GZ7u+1BEPY5UGtQx5NT+V5a4EOVCgRO0QhpCevJLHEk=; b=NafdrrzuUqGHN4GEf+23VwYviBISfbtKceGYc6MYzq5gO3vh2RWi4y0Qwt0/tY8vTp VfRurGGH9KzyNNy0+P801scDD+s9wV4N1ivfXzi1NSwntOhusLbYcx8jvEzzEJuL0eYa Mef6FqbX80z6x3jENtlYXSkhzbncXyIGro5EBcz9+2pcrLb9q1UrRmUoq4n4kwmmDfku SKV+iy5kg7CMwTBf0X+smXjuMEJ3ONDclwkNTWtBk6onsZTDroWZAafoJPMsLzq7ExaY 9ahqXjrRgVg4K/SEt0QZNWQMIDfODZVWUT8odYEf/fdeM9SKL22AuOHaxsKVLLlZvrwO fekA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GZ7u+1BEPY5UGtQx5NT+V5a4EOVCgRO0QhpCevJLHEk=; b=AmsGn54WBtLuKkod0qkM8p8TcLkaMtuALjN+MBm48HOftoMOpj41KK/B9z550KG9Fh R855csnVk567gXXDvrbkwFuCXkwl9LF1Q9AlJqvnaRUoiOFAnOxpNmCA1UJ1oAV8N+OM WKpi3fLrYbSAhZicCnXQHTpYXntI/yEcXZvgIHVTO0z9pXwHGavl6aaghUUUz+vZ9q9u Js0Qu86U33OjQH/zQDIPZrm79dJDDDzJ5xW3HzX6ORdSDJkym9TeFOjF1rcj4GF4fjut 9XBfF2WDQDXxqOS1NYVnAhMh0bfi4vp2zObddrTEOui7nCuKiDvjuURQPY5SxU3z9r9V Q0hQ== X-Gm-Message-State: AFqh2ko2bRbp1/BScXXOi6QSUe6ObCarim9CyYMi7aCh7PA05ZZFBIvI upAwwnJs+eGg93naDw2pdXZ88i0WY00= X-Google-Smtp-Source: AMrXdXtlXoIG1kxqPA+HYDfQ2kJlMVN7tyhJh0duVqK3VcbjKldstaNN9DXIFZkrJC+ybfN/pwY4vg== X-Received: by 2002:a17:907:8a1d:b0:84d:3822:2fc7 with SMTP id sc29-20020a1709078a1d00b0084d38222fc7mr42003356ejc.77.1674617019942; Tue, 24 Jan 2023 19:23:39 -0800 (PST) Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id kf6-20020a17090776c600b00877df3eea5fsm1683782ejc.163.2023.01.24.19.23.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Jan 2023 19:23:39 -0800 (PST) Message-ID: <08ecae1f-f937-f0c9-3272-d60f7632be99@yandex.ru> Date: Wed, 25 Jan 2023 05:23:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US To: bug-gnu-emacs@gnu.org From: Dmitry Gutov Subject: treesit-install-language-grammar can provide the default repository URL Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=raaahh@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.149, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) 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): ")) From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 07:29:27 2023 Received: (at 61051) by debbugs.gnu.org; 25 Jan 2023 12:29:27 +0000 Received: from localhost ([127.0.0.1]:58546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKeu7-0003rS-40 for submit@debbugs.gnu.org; Wed, 25 Jan 2023 07:29:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKeu3-0003rE-WB for 61051@debbugs.gnu.org; Wed, 25 Jan 2023 07:29:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKetx-000253-BT; Wed, 25 Jan 2023 07:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=z1qHbcOOKdR/0CVw3+igOrVy/d2OGrDvhA6pPOjfenw=; b=P1fxI9hEgw+L I+F1o7HJH/5zI0oKSBUaTRBnCQA5/dC+EZNgIUThVEC22wpV4o9bFsdwesddDGxxqh4uAMu0iESrR /ox+SHh4r9hpeXalpCIyxbvCmBo7cmF3lp1XRs0IWQj3LwAQYxaN2DCMMYnzufFBbGdFSOyCqUKpn 4A66ifB+1qSmDN53YxUKk8Cq29Be8VvEUBqXjJ4SEOkGBb0vFj9EkSEOqSanMZRu7p95Bq4Z31ZLQ RQeM987z3CoFebfA8LisOek71qSJCT3MZBP/oMk5tP2jS8cY2dPbcTuUtHdWmjOhPfABiw27mDXoG YyIoDBUdKFC9OMa+nDSpCg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKetw-0007kh-FM; Wed, 25 Jan 2023 07:29:16 -0500 Date: Wed, 25 Jan 2023 14:29:30 +0200 Message-Id: <83y1pqg5lh.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <08ecae1f-f937-f0c9-3272-d60f7632be99@yandex.ru> (message from Dmitry Gutov on Wed, 25 Jan 2023 05:23:37 +0200) Subject: Re: bug#61051: treesit-install-language-grammar can provide the default repository URL References: <08ecae1f-f937-f0c9-3272-d60f7632be99@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61051 Cc: 61051@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 25 Jan 2023 05:23:37 +0200 > From: Dmitry Gutov > > 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): ")) 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? From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 09:01:02 2023 Received: (at 61051) by debbugs.gnu.org; 25 Jan 2023 14:01:02 +0000 Received: from localhost ([127.0.0.1]:58660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKgKj-0000YG-L3 for submit@debbugs.gnu.org; Wed, 25 Jan 2023 09:01:01 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:36536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKgKg-0000Xk-0V for 61051@debbugs.gnu.org; Wed, 25 Jan 2023 09:01:00 -0500 Received: by mail-wr1-f48.google.com with SMTP id b7so17162982wrt.3 for <61051@debbugs.gnu.org>; Wed, 25 Jan 2023 06:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=cfB6I2vv9rWHVEPgK7ZUT6GtVwJ6f5y3aIAz6rUyn+A=; b=oK9w0oY1f5a1kCT9NpPxqKRPTpiBgDYyvTGMrdHZ4ApkNtqvEU+uCgnSIbNAFsKZTs yFDMWiNE53YkO2yYD8GZy8S8HEg/xhcSONvSyPSBS4WXhVi8cJ+EXZBNuVczK/khYmRh iQyBjUEKKRoBLSFJBju0rkCamYXPT812+CoBQBYeVYclc8Oc5GKQWn9sNIoTZBCDy9tB hQdEsrl62CrT5tFfopvM2JBK6A0mxlUju50uUh02BAsNwmdjckI2uLfiOx+/1BfPHJQS f+DFaljzLtEbkvV16cIVn2ocjYSU6ROP8Vm0vAeW/ORf3IB4mmkQhZIbvQedVNcnX7uH lFQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cfB6I2vv9rWHVEPgK7ZUT6GtVwJ6f5y3aIAz6rUyn+A=; b=CONakHmg4fxr67KzCKZU6gGr+JIjdrN4Kku+NQPdkDswvU0PETMML10t1Kcv9UYLH3 IRKmCYGVDDMHKweTi+MqbFnbcv2ZQLmQsK8ADr27WDWdovdwoXpKMP1xIggduAwOfz+D OqkZmYN5Iz6R0HlAeypICCALGuSVVQL69J6bIbjt7dYMyEoCAQQ8PCG9g2OyCP+Ia+MD CBGoQrz+bQYaViNQ9V8e43T0J1V2EX+jQxrM/aHFQo/ibK59lpPdSL6twXvLVUuYIbKH POceNLrlBhG37vF69mrcgyPpk5DmkRnBdNps3moU/zb4e1bpNjueNRDZVDyPiRZKvtvg /67A== X-Gm-Message-State: AFqh2krvkQvDZhni4J4NTPjrwrFlYqurLD+kFvVRh3GLka7jmD302qo2 viXAyIZwMPLXV0qx9RLkrvw= X-Google-Smtp-Source: AMrXdXu1q0Bkbnnk8rlaWDddorTRs9+ehKtGQ3CX+cTegQSEtSPevMirG8hRARIGw2CqcHY+Lfoizw== X-Received: by 2002:a5d:6581:0:b0:2bb:dad4:9525 with SMTP id q1-20020a5d6581000000b002bbdad49525mr26557961wru.10.1674655251574; Wed, 25 Jan 2023 06:00:51 -0800 (PST) Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q6-20020adfcd86000000b002bded7da2b8sm4567191wrj.102.2023.01.25.06.00.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 06:00:50 -0800 (PST) Message-ID: <2ede0353-6699-1196-df9e-2e4317e9ef36@yandex.ru> Date: Wed, 25 Jan 2023 16:00:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: bug#61051: treesit-install-language-grammar can provide the default repository URL Content-Language: en-US To: Eli Zaretskii References: <08ecae1f-f937-f0c9-3272-d60f7632be99@yandex.ru> <83y1pqg5lh.fsf@gnu.org> From: Dmitry Gutov In-Reply-To: <83y1pqg5lh.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 61051 Cc: 61051@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) On 25/01/2023 14:29, Eli Zaretskii wrote: >> Date: Wed, 25 Jan 2023 05:23:37 +0200 >> From: Dmitry Gutov >> >> The formathttps://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): ")) > 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: diff --git a/lisp/treesit.el b/lisp/treesit.el index 660039cc7cc..4c9bdfc0bd4 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2707,8 +2707,10 @@ treesit--install-language-grammar-build-recipe (if (equal string "") nil string))) (list lang - (read-string - "Enter the URL of the Git repository of the language grammar: ") + (let ((repo-default (format "https://github.com/tree-sitter/tree-sitter-%s" lang))) + (read-string + "Enter the URL of the Git repository of the language grammar: " + (and (treesit--check-repo-url repo-default) repo-default))) (empty-string-to-nil (read-string "Enter the tag or branch (default: default branch): ")) @@ -2722,6 +2724,16 @@ treesit--install-language-grammar-build-recipe (read-string "Enter the C++ compiler to use (default: auto-detect): ")))))) +(defun treesit--check-repo-url (url) + (defvar url-request-method) + (let ((url-request-method "HEAD")) + (let ((buffer (condition-case nil (url-retrieve-synchronously url t t) + (file-error nil)))) + (and buffer + (eql + (buffer-local-value 'url-http-response-status buffer) + 200))))) + ;;;###autoload (defun treesit-install-language-grammar (lang) "Build and install the tree-sitter language grammar library for LANG. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 09:50:35 2023 Received: (at 61051) by debbugs.gnu.org; 25 Jan 2023 14:50:36 +0000 Received: from localhost ([127.0.0.1]:58738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKh6h-0004DY-JE for submit@debbugs.gnu.org; Wed, 25 Jan 2023 09:50:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKh6f-0004DK-3s for 61051@debbugs.gnu.org; Wed, 25 Jan 2023 09:50:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKh6Y-0003hU-P0; Wed, 25 Jan 2023 09:50:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RBAJ84WhCE7nODa24zVW23UmjlGtiTtQPbEJpMqoFPQ=; b=T94uZRUkXMGY ieNynevayKKOrbnCD4Yod/odIr/PPEliXVYRwPRx3f7tZdCqVY7yurazvrLma6GpNlmyLNAq/N/6B 3mtvH+h54VUfHsU42T0JVQDP8i60U5Ht+eshwI0rj2GJqzenCwZgRNXSPSnkRcFC9f8oGuBHrdI9p 6H8mNiZYqU0hWUyILz8YN4SbfMEvsSKRompSZjc0mz4M0WOhl4uKb2VfL4VCHdaG/ZykNZRjXNAEt rMs6ldp1+6lV84UvP8ldejgoFNKB3P0ZbCOnZ0k3bVGyOUw4SW7A9y0XVFmUCfJHHioxyraf2R00k 69B9gSC8SYlxIB4B1ARzFQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKh6W-00072R-Ju; Wed, 25 Jan 2023 09:50:25 -0500 Date: Wed, 25 Jan 2023 16:50:37 +0200 Message-Id: <83lelqfz2a.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <2ede0353-6699-1196-df9e-2e4317e9ef36@yandex.ru> (message from Dmitry Gutov on Wed, 25 Jan 2023 16:00:48 +0200) Subject: Re: bug#61051: treesit-install-language-grammar can provide the default repository URL References: <08ecae1f-f937-f0c9-3272-d60f7632be99@yandex.ru> <83y1pqg5lh.fsf@gnu.org> <2ede0353-6699-1196-df9e-2e4317e9ef36@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61051 Cc: 61051@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 25 Jan 2023 16:00:48 +0200 > Cc: 61051@debbugs.gnu.org > From: Dmitry Gutov > > >> - "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. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 10:23:51 2023 Received: (at 61051-done) by debbugs.gnu.org; 25 Jan 2023 15:23:51 +0000 Received: from localhost ([127.0.0.1]:59735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKhcs-0005I2-TF for submit@debbugs.gnu.org; Wed, 25 Jan 2023 10:23:51 -0500 Received: from mail-lj1-f172.google.com ([209.85.208.172]:36786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKhcr-0005Hp-Kd for 61051-done@debbugs.gnu.org; Wed, 25 Jan 2023 10:23:50 -0500 Received: by mail-lj1-f172.google.com with SMTP id e16so20715421ljn.3 for <61051-done@debbugs.gnu.org>; Wed, 25 Jan 2023 07:23:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=MjPBbFQAkpFLmiJcG8mWFIfCPy3WScuoLEZPaOdjvjI=; b=f8lENESqDo8o8x0E9pO5bN0yEaU7XmuzOK+ts+dVLKs5w5sWb5EGwkJkJDEUgbU+Xo SDqG/Dyfrjjmpc4gX0EtltIQZBOpJXLu3lDKGyn1TAy4erLVZ3H4eMOdErMM3a2BPD7M M07s4HK5EgALQ9mmt/IpnqTbVL1VzwkBwZxmk15IaMDBelTI9T2HzdYaXwX2afhvwNEp 7yqTUTQVd0ZoJi+k82XqDemfRqVh9NmMlLWpxGP7r8gYrDHaQbik14QSXlT4d48+92fE NabYsVXQ936LDhTcVQ5ushYNZw6vlZ1xhQQ59XLyUjwNs0izzgss60x221j7gxns5Blz Wb0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MjPBbFQAkpFLmiJcG8mWFIfCPy3WScuoLEZPaOdjvjI=; b=zEyUx/hwmmRMBxhbtu1jgfAbdJDiaZ5xfogARxb533YVAM3oc4lzt7G/TMOziIptp6 z9dFh1S98vs/O2VzfPwBFCCdUAIeh3hl0G43FIhSbLyASCcjsUj4hvDobAxUM72fLPGl nhJd+YhdR5BJGwEseD5ONHgf4fDkxPjMh17tDA/ntfZT5bfsWMKz7mQktBYq8UySWXGs L8u6I7NDVXrPSDP4RrCdUZr+OomMg/5sHMb5XQzgzIX3v/cf8ZEv5iXiVumLintGE1hu BASW3rCaJMHfoISN5dicud6sb/dULxbqJKTp9pvGTp6akUdNu81W5l46/i6M1LFJTL3n bq+Q== X-Gm-Message-State: AFqh2kqiNxcMMQW79Nz4O4QXw2gf6Rdgo0HgAzzyWwmb9byUtLLopNUy eWKGtVUktRXEIRSttywdEaycoYMBRXc= X-Google-Smtp-Source: AMrXdXu0uNS324bE4PyBjp6xJf3YBFhxWVN7RFZ7WauGbsdyNw63ahDRDK1T6/0WHDvgDgwZiJv3WQ== X-Received: by 2002:a17:906:60d0:b0:877:612e:516e with SMTP id f16-20020a17090660d000b00877612e516emr90950619ejk.61.1674660212876; Wed, 25 Jan 2023 07:23:32 -0800 (PST) Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id kv15-20020a17090778cf00b00877df3eea64sm2534288ejc.155.2023.01.25.07.23.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 07:23:32 -0800 (PST) Message-ID: <77a1d0e0-f4d9-1f7b-73f0-5dff9aaa59f2@yandex.ru> Date: Wed, 25 Jan 2023 17:23:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: bug#61051: treesit-install-language-grammar can provide the default repository URL Content-Language: en-US To: Eli Zaretskii References: <08ecae1f-f937-f0c9-3272-d60f7632be99@yandex.ru> <83y1pqg5lh.fsf@gnu.org> <2ede0353-6699-1196-df9e-2e4317e9ef36@yandex.ru> <83lelqfz2a.fsf@gnu.org> From: Dmitry Gutov In-Reply-To: <83lelqfz2a.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 61051-done Cc: 61051-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) On 25/01/2023 16:50, Eli Zaretskii wrote: >> Date: Wed, 25 Jan 2023 16:00:48 +0200 >> Cc:61051@debbugs.gnu.org >> From: Dmitry Gutov >> >>>> - "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. From unknown Thu Jun 19 14:06:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 23 Feb 2023 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator