all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 64295@debbugs.gnu.org
Subject: bug#64295: [PATCH] treesit-install-language-grammar ignores out-dir
Date: Sun, 25 Jun 2023 19:43:18 -0500	[thread overview]
Message-ID: <87ttuvhwob.fsf@pub.pink> (raw)

[-- 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


             reply	other threads:[~2023-06-26  0:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26  0:43 john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-06-29  5:39 ` bug#64295: [PATCH] treesit-install-language-grammar ignores out-dir 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttuvhwob.fsf@pub.pink \
    --to=bug-gnu-emacs@gnu.org \
    --cc=64295@debbugs.gnu.org \
    --cc=jm@pub.pink \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.