unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64295: [PATCH] treesit-install-language-grammar ignores out-dir
@ 2023-06-26  0:43 john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-06-29  5:39 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-26  0:43 UTC (permalink / raw)
  To: 64295

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

Running interactively from emacs -Q:

  M-x t-i-l-g RET bash RET y RET RET RET RET RET ~/tmp/tree-sitter RET

installs to user-emacs-directory/tree-sitter instead of the supplied
directory.

Here’s the tiny change to make it work.


[-- Attachment #2: [PATCH] Fix treesit-install-language-grammar for custom out-dir --]
[-- Type: text/x-patch, Size: 1138 bytes --]

From 6d38e4c74488d424c2563ff57d963cadf24531f7 Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
Date: Sun, 25 Jun 2023 19:38:08 -0500
Subject: [PATCH] Fix treesit-install-language-grammar for custom out-dir
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

  M-x t-i-l-g RET bash RET y RET RET RET RET RET ~/tmp/tree-sitter RET

installs to user-emacs-directory/tree-sitter instead of the supplied
directory.

Here’s the tiny patch to make it work.
---
 lisp/treesit.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/treesit.el b/lisp/treesit.el
index df13dd9f424..81920834329 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -3094,8 +3094,7 @@ treesit-install-language-grammar
     (condition-case err
         (progn
           (apply #'treesit--install-language-grammar-1
-                 ;; The nil is OUT-DIR.
-                 (cons nil recipe))
+                 (cons out-dir recipe))
 
           ;; Check that the installed language grammar is loadable.
           (pcase-let ((`(,available . ,err)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#64295: [PATCH] treesit-install-language-grammar ignores out-dir
  2023-06-26  0:43 bug#64295: [PATCH] treesit-install-language-grammar ignores out-dir john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-06-29  5:39 ` Eli Zaretskii
  2023-06-29 15:30   ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-06-29  5:39 UTC (permalink / raw)
  To: john muhl, Yuan Fu; +Cc: 64295

> Date: Sun, 25 Jun 2023 19:43:18 -0500
> From:  john muhl via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Running interactively from emacs -Q:
> 
>   M-x t-i-l-g RET bash RET y RET RET RET RET RET ~/tmp/tree-sitter RET
> 
> installs to user-emacs-directory/tree-sitter instead of the supplied
> directory.
> 
> Here’s the tiny change to make it work.

Yuan, are you looking into this?  AFAIU, this is for the master
branch.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#64295: [PATCH] treesit-install-language-grammar ignores out-dir
  2023-06-29  5:39 ` Eli Zaretskii
@ 2023-06-29 15:30   ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-06-29 19:03     ` Yuan Fu
  0 siblings, 1 reply; 4+ messages in thread
From: john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-29 15:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 64295, Yuan Fu

Eli Zaretskii <eliz@gnu.org> writes:

> AFAIU, this is for the master branch.

Sorry for omitting that but master is correct.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#64295: [PATCH] treesit-install-language-grammar ignores out-dir
  2023-06-29 15:30   ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-06-29 19:03     ` Yuan Fu
  0 siblings, 0 replies; 4+ messages in thread
From: Yuan Fu @ 2023-06-29 19:03 UTC (permalink / raw)
  To: john muhl; +Cc: Eli Zaretskii, 64295-done



> On Jun 29, 2023, at 8:30 AM, john muhl <jm@pub.pink> wrote:
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
>> AFAIU, this is for the master branch.
> 
> Sorry for omitting that but master is correct.

Thanks, the fix is right, and the problem is on master. I’ve pushed the fix.

Yuan




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-29 19:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26  0:43 bug#64295: [PATCH] treesit-install-language-grammar ignores out-dir john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-29  5:39 ` Eli Zaretskii
2023-06-29 15:30   ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-29 19:03     ` Yuan Fu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).