Subject: bug#66673: closed (Re: bug#66673: [PATCH] Fix treesit-install-language-grammar recipe addition)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 22 Oct 2023 03:42:02 +0000

Your bug report

#66673: [PATCH] Fix treesit-install-language-grammar recipe addition

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].

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

Subject: Re: bug#66673: [PATCH] Fix treesit-install-language-grammar recipe addition
From: Yuan Fu <[email-masked]>
To: nvp <[email-masked]>
Cc: [email-masked]
Date: Sat, 21 Oct 2023 20:40:52 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

> On Oct 21, 2023, at 8:09 PM, nvp <[email-masked]> wrote:
> 
> 
> 
> * lisp/treesit.el (treesit-install-language-grammar): fix recipe
> addition to `treesit-language-source-alist`
> 
> Bug: `treesit-install-language-grammar` adds repeated language
> entry to `treesit-language-source-alist` causing circular list.

Thank you! I applied the path on emacs-29.

Yuan

Subject: [PATCH] Fix treesit-install-language-grammar recipe addition
From: nvp <[email-masked]>
To: [email-masked]
Date: Sat, 21 Oct 2023 20:09:21 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

* lisp/treesit.el (treesit-install-language-grammar): fix recipe
addition to `treesit-language-source-alist`

Bug: `treesit-install-language-grammar` adds repeated language
entry to `treesit-language-source-alist` causing circular list.

Recipe to reproduce:
1. `M-x treesit-install-language-grammar` `bash` (enter all defaults)
2. `M-x treesit-install-language-grammar` `bash`

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.33, cairo version 1.16.0) of 2023-10-21 built on noah-X580VD
Repository revision: 6f87ee0e3a0727e16079778a4264e6e35cd7f3a8
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Ubuntu 22.04.3 LTS

Configured using:
 'configure --prefix=/usr/local --with-modules --with-tree-sitter
--with-threads --with-x-toolkit=gtk3 --with-xwidgets --with-gnutls
--with-json --with-mailutils --with-jpeg --with-png --with-rsvg
--with-tiff --with-xml2 --with-xpm --with-imagemagick CC=gcc-12
CXX=gcc-12'
From 9968ab4c223e1f65ab6984543cb63d3c9d62860e Mon Sep 17 00:00:00 2001
From: nverno <[email-masked]>
Date: Sat, 21 Oct 2023 19:54:10 -0700
Subject: [PATCH] Fix treesit-install-language-grammar recipe addition

---
 lisp/treesit.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/treesit.el b/lisp/treesit.el
index 80bdf164b07..8100e418303 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -3354,7 +3354,7 @@ treesit-install-language-grammar
                           " ")))
               ;; If success, Save the recipe for the current session.
               (setf (alist-get lang treesit-language-source-alist)
-                    recipe))))
+                    (cdr recipe)))))
       (error
        (display-warning
         'treesit
-- 
2.34.1