unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 15:08           ` T.V Raman
@ 2022-11-25 16:25             ` Daniel Martín
  2022-11-25 16:33               ` Eli Zaretskii
                                 ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Daniel Martín @ 2022-11-25 16:25 UTC (permalink / raw)
  To: T.V Raman; +Cc: casouri, tsdh, emacs-devel

"T.V Raman" <raman@google.com> writes:

> also the   name "ts" as part of tree-sitter is an unfortunate
> confusion since ts-mode is for typescript.
>
> I initally wrongly assumed that ts-mode was some kind of global mode
> that would enable tree-support for all supported modes, given the
> names c-ts-mode etc.

This is a good point.  The Tree-sitter Elisp library itself and its
commands already use the "treesit" abbreviation consistently.  We're
still on time to rename the new language modes to c-treesit-mode, and so
on.  Thoughts?



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 16:25             ` Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?) Daniel Martín
@ 2022-11-25 16:33               ` Eli Zaretskii
  2022-11-25 16:38               ` Theodor Thornhill
  2022-11-26  8:20               ` Yuan Fu
  2 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2022-11-25 16:33 UTC (permalink / raw)
  To: Daniel Martín; +Cc: raman, casouri, tsdh, emacs-devel

> From: Daniel Martín <mardani29@yahoo.es>
> Cc: casouri@gmail.com,  tsdh@gnu.org,  emacs-devel@gnu.org
> Date: Fri, 25 Nov 2022 17:25:09 +0100
> 
> "T.V Raman" <raman@google.com> writes:
> 
> > also the   name "ts" as part of tree-sitter is an unfortunate
> > confusion since ts-mode is for typescript.
> >
> > I initally wrongly assumed that ts-mode was some kind of global mode
> > that would enable tree-support for all supported modes, given the
> > names c-ts-mode etc.
> 
> This is a good point.  The Tree-sitter Elisp library itself and its
> commands already use the "treesit" abbreviation consistently.  We're
> still on time to rename the new language modes to c-treesit-mode, and so
> on.  Thoughts?

I don't think we should rename.  There's just one ts-mode, and many
foo-ts-mode modes, so the latter win.



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 16:25             ` Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?) Daniel Martín
  2022-11-25 16:33               ` Eli Zaretskii
@ 2022-11-25 16:38               ` Theodor Thornhill
  2022-11-25 17:50                 ` Elliott Shugerman
  2022-11-25 19:40                 ` Eli Zaretskii
  2022-11-26  8:20               ` Yuan Fu
  2 siblings, 2 replies; 16+ messages in thread
From: Theodor Thornhill @ 2022-11-25 16:38 UTC (permalink / raw)
  To: emacs-devel, Daniel Martín, T.V Raman; +Cc: casouri, tsdh



On 25 November 2022 17:25:09 CET, "Daniel Martín" <mardani29@yahoo.es> wrote:
>"T.V Raman" <raman@google.com> writes:
>
>> also the   name "ts" as part of tree-sitter is an unfortunate
>> confusion since ts-mode is for typescript.
>>
>> I initally wrongly assumed that ts-mode was some kind of global mode
>> that would enable tree-support for all supported modes, given the
>> names c-ts-mode etc.
>
>This is a good point.  The Tree-sitter Elisp library itself and its
>commands already use the "treesit" abbreviation consistently.  We're
>still on time to rename the new language modes to c-treesit-mode, and so
>on.  Thoughts?
>

I'd rather change ts-mode to typescript-mode or typescript-ts-mode. But we can discuss names, of course :-)

Even better would be some construct we've discussed many times the last months: not letting a specific implementation "own" a major mode name. So c-mode could be powered by cc mode implementation _or_ treesit.el implementation, but not a merged thing.

To me the natural progression would be to keep name as-is, then later when we have such a construct just delete the *-ts-modes.

For Emacs 30 or 31.

Theo



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 16:38               ` Theodor Thornhill
@ 2022-11-25 17:50                 ` Elliott Shugerman
  2022-11-25 23:41                   ` Rudolf Adamkovič
  2022-11-25 19:40                 ` Eli Zaretskii
  1 sibling, 1 reply; 16+ messages in thread
From: Elliott Shugerman @ 2022-11-25 17:50 UTC (permalink / raw)
  To: emacs-devel

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

I am nobody, but FWIW, I'm in favor of using "treesit" instead of "ts" in
the mode names. Even if tree sitter had a higher profile than typescript
(NB: typescript's is in fact much higher, and this is unlikely to change no
matter how much adoption tree sitter sees), the unambiguous naming scheme
is preferable. Does anyone really mind the five additional characters?

On Fri, Nov 25, 2022, 9:39 AM Theodor Thornhill <theo@thornhill.no> wrote:

>
>
> On 25 November 2022 17:25:09 CET, "Daniel Martín" <mardani29@yahoo.es>
> wrote:
> >"T.V Raman" <raman@google.com> writes:
> >
> >> also the   name "ts" as part of tree-sitter is an unfortunate
> >> confusion since ts-mode is for typescript.
> >>
> >> I initally wrongly assumed that ts-mode was some kind of global mode
> >> that would enable tree-support for all supported modes, given the
> >> names c-ts-mode etc.
> >
> >This is a good point.  The Tree-sitter Elisp library itself and its
> >commands already use the "treesit" abbreviation consistently.  We're
> >still on time to rename the new language modes to c-treesit-mode, and so
> >on.  Thoughts?
> >
>
> I'd rather change ts-mode to typescript-mode or typescript-ts-mode. But we
> can discuss names, of course :-)
>
> Even better would be some construct we've discussed many times the last
> months: not letting a specific implementation "own" a major mode name. So
> c-mode could be powered by cc mode implementation _or_ treesit.el
> implementation, but not a merged thing.
>
> To me the natural progression would be to keep name as-is, then later when
> we have such a construct just delete the *-ts-modes.
>
> For Emacs 30 or 31.
>
> Theo
>
>

[-- Attachment #2: Type: text/html, Size: 2410 bytes --]

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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 16:38               ` Theodor Thornhill
  2022-11-25 17:50                 ` Elliott Shugerman
@ 2022-11-25 19:40                 ` Eli Zaretskii
  2022-11-25 19:58                   ` Theodor Thornhill
  1 sibling, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2022-11-25 19:40 UTC (permalink / raw)
  To: Theodor Thornhill; +Cc: emacs-devel, mardani29, raman, casouri, tsdh

> Date: Fri, 25 Nov 2022 17:38:27 +0100
> From: Theodor Thornhill <theo@thornhill.no>
> CC: casouri@gmail.com, tsdh@gnu.org
> 
> I'd rather change ts-mode to typescript-mode or typescript-ts-mode.

If there was no ts-mode before, I'm okay with renaming it to
typescript-ts-mode.



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 19:40                 ` Eli Zaretskii
@ 2022-11-25 19:58                   ` Theodor Thornhill
  2022-11-25 20:13                     ` Theodor Thornhill via Emacs development discussions.
  0 siblings, 1 reply; 16+ messages in thread
From: Theodor Thornhill @ 2022-11-25 19:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, mardani29, raman, casouri, tsdh

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Fri, 25 Nov 2022 17:38:27 +0100
>> From: Theodor Thornhill <theo@thornhill.no>
>> CC: casouri@gmail.com, tsdh@gnu.org
>> 
>> I'd rather change ts-mode to typescript-mode or typescript-ts-mode.
>
> If there was no ts-mode before, I'm okay with renaming it to
> typescript-ts-mode.

Ok, patch coming up



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 19:58                   ` Theodor Thornhill
@ 2022-11-25 20:13                     ` Theodor Thornhill via Emacs development discussions.
  2022-11-26  1:04                       ` Stefan Kangas
  0 siblings, 1 reply; 16+ messages in thread
From: Theodor Thornhill via Emacs development discussions. @ 2022-11-25 20:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, mardani29, raman, casouri, tsdh

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


Hi Eli,

>
>>> Date: Fri, 25 Nov 2022 17:38:27 +0100
>>> From: Theodor Thornhill <theo@thornhill.no>
>>> CC: casouri@gmail.com, tsdh@gnu.org
>>> 
>>> I'd rather change ts-mode to typescript-mode or typescript-ts-mode.
>>
>> If there was no ts-mode before, I'm okay with renaming it to
>> typescript-ts-mode.
>
> Ok, patch coming up

Feel free to commit this, Eli.  I've only done a rename.

Theo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Rename-ts-mode-to-typescript-ts-mode.patch --]
[-- Type: text/x-diff, Size: 9129 bytes --]

From 5a8d0347ad4e3373ef849d9b818459121061b593 Mon Sep 17 00:00:00 2001
From: Theodor Thornhill <theo@thornhill.no>
Date: Fri, 25 Nov 2022 21:04:18 +0100
Subject: [PATCH] Rename ts-mode to typescript-ts-mode

* lisp/progmodes/ts-mode.el: File deleted.
* lisp/progmodes/typescript-ts-mode.el: New mode typescript-ts-mode.
* etc/NEWS: Mention the new mode.
---
 etc/NEWS                                      |  2 +-
 .../{ts-mode.el => typescript-ts-mode.el}     | 78 +++++++++----------
 2 files changed, 40 insertions(+), 40 deletions(-)
 rename lisp/progmodes/{ts-mode.el => typescript-ts-mode.el} (77%)

diff --git a/etc/NEWS b/etc/NEWS
index 0ffc849fec..3c9243784d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2969,7 +2969,7 @@ This is a lightweight variant of 'js-mode' that is used by default
 when visiting JSON files.
 
 \f
-** New mode 'ts-mode'.
+** New mode 'typescript-ts-mode'.
 A major mode based on the tree-sitter library for editing programs
 in the TypeScript language.  It includes support for font-locking,
 indentation, and navigation.
diff --git a/lisp/progmodes/ts-mode.el b/lisp/progmodes/typescript-ts-mode.el
similarity index 77%
rename from lisp/progmodes/ts-mode.el
rename to lisp/progmodes/typescript-ts-mode.el
index bdef1c4576..763686bf66 100644
--- a/lisp/progmodes/ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -1,4 +1,4 @@
-;;; ts-mode.el --- tree sitter support for TypeScript  -*- lexical-binding: t; -*-
+;;; typescript-ts-mode.el --- tree sitter support for TypeScript  -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2022 Free Software Foundation, Inc.
 
@@ -30,14 +30,14 @@
 
 (declare-function treesit-parser-create "treesit.c")
 
-(defcustom ts-mode-indent-offset 2
-  "Number of spaces for each indentation step in `ts-mode'."
+(defcustom typescript-ts-mode-indent-offset 2
+  "Number of spaces for each indentation step in `typescript-ts-mode'."
   :version "29.1"
   :type 'integer
   :safe 'integerp
   :group 'typescript)
 
-(defvar ts-mode--syntax-table
+(defvar typescript-ts-mode--syntax-table
   (let ((table (make-syntax-table)))
     ;; Taken from the cc-langs version
     (modify-syntax-entry ?_  "_"     table)
@@ -54,9 +54,9 @@ ts-mode--syntax-table
     (modify-syntax-entry ?` "\""     table)
     (modify-syntax-entry ?\240 "."   table)
     table)
-  "Syntax table for `ts-mode'.")
+  "Syntax table for `typescript-ts-mode'.")
 
-(defvar ts-mode--indent-rules
+(defvar typescript-ts-mode--indent-rules
   `((tsx
      ((parent-is "program") parent-bol 0)
      ((node-is "}") parent-bol 0)
@@ -65,33 +65,33 @@ ts-mode--indent-rules
      ((node-is ">") parent-bol 0)
      ((and (parent-is "comment") comment-end) comment-start -1)
      ((parent-is "comment") comment-start-skip 0)
-     ((parent-is "ternary_expression") parent-bol ts-mode-indent-offset)
-     ((parent-is "member_expression") parent-bol ts-mode-indent-offset)
-     ((parent-is "named_imports") parent-bol ts-mode-indent-offset)
-     ((parent-is "statement_block") parent-bol ts-mode-indent-offset)
-     ((parent-is "type_arguments") parent-bol ts-mode-indent-offset)
-     ((parent-is "variable_declarator") parent-bol ts-mode-indent-offset)
-     ((parent-is "arguments") parent-bol ts-mode-indent-offset)
-     ((parent-is "array") parent-bol ts-mode-indent-offset)
-     ((parent-is "formal_parameters") parent-bol ts-mode-indent-offset)
-     ((parent-is "template_substitution") parent-bol ts-mode-indent-offset)
-     ((parent-is "object_pattern") parent-bol ts-mode-indent-offset)
-     ((parent-is "object") parent-bol ts-mode-indent-offset)
-     ((parent-is "object_type") parent-bol ts-mode-indent-offset)
-     ((parent-is "enum_body") parent-bol ts-mode-indent-offset)
-     ((parent-is "arrow_function") parent-bol ts-mode-indent-offset)
-     ((parent-is "parenthesized_expression") parent-bol ts-mode-indent-offset)
+     ((parent-is "ternary_expression") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "member_expression") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "named_imports") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "statement_block") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "type_arguments") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "variable_declarator") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "arguments") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "array") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "formal_parameters") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "template_substitution") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "object_pattern") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "object") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "object_type") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "enum_body") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "arrow_function") parent-bol typescript-ts-mode-indent-offset)
+     ((parent-is "parenthesized_expression") parent-bol typescript-ts-mode-indent-offset)
 
      ;; TSX
-     ((parent-is "jsx_opening_element") parent ts-mode-indent-offset)
+     ((parent-is "jsx_opening_element") parent typescript-ts-mode-indent-offset)
      ((node-is "jsx_closing_element") parent 0)
-     ((parent-is "jsx_element") parent ts-mode-indent-offset)
+     ((parent-is "jsx_element") parent typescript-ts-mode-indent-offset)
      ((node-is "/") parent 0)
-     ((parent-is "jsx_self_closing_element") parent ts-mode-indent-offset)
+     ((parent-is "jsx_self_closing_element") parent typescript-ts-mode-indent-offset)
      (no-node parent-bol 0)))
   "Tree-sitter indent rules.")
 
-(defvar ts-mode--keywords
+(defvar typescript-ts-mode--keywords
   '("!" "abstract" "as" "async" "await" "break"
     "case" "catch" "class" "const" "continue" "debugger"
     "declare" "default" "delete" "do" "else" "enum"
@@ -103,14 +103,14 @@ ts-mode--keywords
     "while" "with" "yield")
   "TypeScript keywords for tree-sitter font-locking.")
 
-(defvar ts-mode--operators
+(defvar typescript-ts-mode--operators
   '("=" "+=" "-=" "*=" "/=" "%=" "**=" "<<=" ">>=" ">>>=" "&=" "^="
     "|=" "&&=" "||=" "??=" "==" "!=" "===" "!==" ">" ">=" "<" "<=" "+"
     "-" "*" "/" "%" "++" "--" "**" "&" "|" "^" "~" "<<" ">>" ">>>"
     "&&" "||" "!" "?.")
   "TypeScript operators for tree-sitter font-locking.")
 
-(defvar ts-mode--font-lock-settings
+(defvar typescript-ts-mode--font-lock-settings
   (treesit-font-lock-rules
    :language 'tsx
    :override t
@@ -128,7 +128,7 @@ ts-mode--font-lock-settings
    :language 'tsx
    :override t
    :feature 'keyword
-   `([,@ts-mode--keywords] @font-lock-keyword-face
+   `([,@typescript-ts-mode--keywords] @font-lock-keyword-face
      [(this) (super)] @font-lock-keyword-face)
 
    :language 'tsx
@@ -248,7 +248,7 @@ ts-mode--font-lock-settings
 
    :language 'tsx
    :feature 'operator
-   `([,@ts-mode--operators] @font-lock-operator-face
+   `([,@typescript-ts-mode--operators] @font-lock-operator-face
      (ternary_expression ["?" ":"] @font-lock-operator-face))
 
    :language 'tsx
@@ -278,19 +278,19 @@ ts-mode--font-lock-settings
   "Tree-sitter font-lock settings.")
 
 ;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.ts\\'" . ts-mode))
+(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
 
 ;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.tsx\\'" . ts-mode))
+(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-ts-mode))
 
 ;;;###autoload
-(define-derived-mode ts-mode prog-mode "TypeScript"
+(define-derived-mode typescript-ts-mode prog-mode "TypeScript"
   "Major mode for editing TypeScript."
   :group 'typescript
-  :syntax-table ts-mode--syntax-table
+  :syntax-table typescript-ts-mode--syntax-table
 
   (cond
-   ;; `ts-mode' requires tree-sitter to work, so we don't check if
+   ;; `typescript-ts-mode' requires tree-sitter to work, so we don't check if
    ;; user enables tree-sitter for it.
    ((treesit-ready-p 'tsx)
     ;; Tree-sitter.
@@ -308,7 +308,7 @@ ts-mode
                 (append "{}():;," electric-indent-chars))
 
     ;; Indent.
-    (setq-local treesit-simple-indent-rules ts-mode--indent-rules)
+    (setq-local treesit-simple-indent-rules typescript-ts-mode--indent-rules)
 
     ;; Navigation.
     (setq-local treesit-defun-type-regexp
@@ -318,7 +318,7 @@ ts-mode
                         "lexical_declaration")))
 
     ;; Font-lock.
-    (setq-local treesit-font-lock-settings ts-mode--font-lock-settings)
+    (setq-local treesit-font-lock-settings typescript-ts-mode--font-lock-settings)
     (setq-local treesit-font-lock-feature-list
                 '((comment declaration)
                   (constant expression identifier keyword number string)
@@ -336,6 +336,6 @@ ts-mode
     (js-mode)
     (message "Tree-sitter for TypeScript isn't available, falling back to `js-mode'"))))
 
-(provide 'ts-mode)
+(provide 'typescript-ts-mode)
 
-;;; ts-mode.el ends here
+;;; typescript-ts-mode.el ends here
-- 
2.34.1


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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 17:50                 ` Elliott Shugerman
@ 2022-11-25 23:41                   ` Rudolf Adamkovič
  0 siblings, 0 replies; 16+ messages in thread
From: Rudolf Adamkovič @ 2022-11-25 23:41 UTC (permalink / raw)
  To: Elliott Shugerman, emacs-devel

Elliott Shugerman <eeshugerman@gmail.com> writes:

> I am nobody, but FWIW, I'm in favor of using "treesit" instead of "ts"
> in the mode names.

+1.  I originally stopped following this thread by mistake because I
thought it discussed TypeScript.  Also, it would never occur to me to
search M-x for the string "ts" to see all the new Tree Sitter modes.
So, 'ts' fits the bill perfectly, but in Vim and not Emacs. :)

Rudy
-- 
"One can begin to reason only when a clear picture has been formed in
the imagination."
-- Walter Warwick Sawyer, Mathematician's Delight, 1943

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 20:13                     ` Theodor Thornhill via Emacs development discussions.
@ 2022-11-26  1:04                       ` Stefan Kangas
  2022-11-26  6:45                         ` Theodor Thornhill
  0 siblings, 1 reply; 16+ messages in thread
From: Stefan Kangas @ 2022-11-26  1:04 UTC (permalink / raw)
  To: Theodor Thornhill, Eli Zaretskii
  Cc: emacs-devel, mardani29, raman, casouri, tsdh

Theodor Thornhill via "Emacs development discussions."
<emacs-devel@gnu.org> writes:

> Feel free to commit this, Eli.  I've only done a rename.

Thanks.

However, note that it's better to rename the file in a separate commit,
containing no other changes.  That way, "git blame" provides stronger
guarantees for providing correct attribution.  (BTW, "git log" does too,
but it needs a --follow flag.)

So I did the rename separately, in your name, applied your patch on top,
and pushed the result to master (commit 374f4e38c1).  I also adjusted
the commit message slightly to reflect this:

    Rename ts-mode to typescript-ts-mode

    * lisp/progmodes/typescript-ts-mode.el: Rename from 'ts-mode' to
    'typescript-ts-mode'.  Rename all symbols to match new prefix.
    * etc/NEWS: Mention the new mode name.
    Ref: https://lists.gnu.org/r/emacs-devel/2022-11/msg01587.html



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
@ 2022-11-26  3:22 daanturo
  2022-11-26  7:43 ` Yuri Khan
  0 siblings, 1 reply; 16+ messages in thread
From: daanturo @ 2022-11-26  3:22 UTC (permalink / raw)
  To: eeshugerman; +Cc: emacs-devel

How about instead of "*-ts-modef", we use "*-tst-mode" (for TreeSitTer)
instead?

It's only a character more but also there won't be confusion with
Typescript anyway.

-- 
Daanturo.




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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-26  1:04                       ` Stefan Kangas
@ 2022-11-26  6:45                         ` Theodor Thornhill
  0 siblings, 0 replies; 16+ messages in thread
From: Theodor Thornhill @ 2022-11-26  6:45 UTC (permalink / raw)
  To: Stefan Kangas, Eli Zaretskii; +Cc: emacs-devel, mardani29, raman, casouri, tsdh



On 26 November 2022 02:04:49 CET, Stefan Kangas <stefankangas@gmail.com> wrote:
>Theodor Thornhill via "Emacs development discussions."
><emacs-devel@gnu.org> writes:
>
>> Feel free to commit this, Eli.  I've only done a rename.
>
>Thanks.
>
>However, note that it's better to rename the file in a separate commit,
>containing no other changes.  That way, "git blame" provides stronger
>guarantees for providing correct attribution.  (BTW, "git log" does too,
>but it needs a --follow flag.)
>
>So I did the rename separately, in your name, applied your patch on top,
>and pushed the result to master (commit 374f4e38c1).  I also adjusted
>the commit message slightly to reflect this:
>
>    Rename ts-mode to typescript-ts-mode
>
>    * lisp/progmodes/typescript-ts-mode.el: Rename from 'ts-mode' to
>    'typescript-ts-mode'.  Rename all symbols to match new prefix.
>    * etc/NEWS: Mention the new mode name.
>    Ref: https://lists.gnu.org/r/emacs-devel/2022-11/msg01587.html

Ah ok - thanks for the tip! And for applying :)

Theo



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-26  3:22 Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?) daanturo
@ 2022-11-26  7:43 ` Yuri Khan
  0 siblings, 0 replies; 16+ messages in thread
From: Yuri Khan @ 2022-11-26  7:43 UTC (permalink / raw)
  To: CAEb3WWYcVxdCv3qfkjjAd4ZD-+aRJLy9W_yiHe_npL2-idLwRw
  Cc: eeshugerman, emacs-devel

On Sat, 26 Nov 2022 at 14:15, daanturo <daanturo@gmail.com> wrote:

> How about instead of "*-ts-modef", we use "*-tst-mode" (for TreeSitTer)
> instead?

Maybe this approaches “test” too closely.



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-25 16:25             ` Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?) Daniel Martín
  2022-11-25 16:33               ` Eli Zaretskii
  2022-11-25 16:38               ` Theodor Thornhill
@ 2022-11-26  8:20               ` Yuan Fu
  2022-11-26  8:22                 ` Theodor Thornhill
  2022-11-26  8:31                 ` Eli Zaretskii
  2 siblings, 2 replies; 16+ messages in thread
From: Yuan Fu @ 2022-11-26  8:20 UTC (permalink / raw)
  To: Daniel Martín; +Cc: T.V Raman, tsdh, emacs-devel



> On Nov 25, 2022, at 8:25 AM, Daniel Martín <mardani29@yahoo.es> wrote:
> 
> "T.V Raman" <raman@google.com> writes:
> 
>> also the   name "ts" as part of tree-sitter is an unfortunate
>> confusion since ts-mode is for typescript.
>> 
>> I initally wrongly assumed that ts-mode was some kind of global mode
>> that would enable tree-support for all supported modes, given the
>> names c-ts-mode etc.
> 
> This is a good point.  The Tree-sitter Elisp library itself and its
> commands already use the "treesit" abbreviation consistently.  We're
> still on time to rename the new language modes to c-treesit-mode, and so
> on.  Thoughts?

Yeah we should use treesit, if nothing better appears. We had a (short) discussion on better names than xxx-ts-mode, but no one had better idea, so the name stuck.

Yuan


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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-26  8:20               ` Yuan Fu
@ 2022-11-26  8:22                 ` Theodor Thornhill
  2022-11-26  8:31                 ` Eli Zaretskii
  1 sibling, 0 replies; 16+ messages in thread
From: Theodor Thornhill @ 2022-11-26  8:22 UTC (permalink / raw)
  To: emacs-devel, Yuan Fu, Daniel Martín; +Cc: T.V Raman, tsdh



On 26 November 2022 09:20:00 CET, Yuan Fu <casouri@gmail.com> wrote:
>
>
>> On Nov 25, 2022, at 8:25 AM, Daniel Martín <mardani29@yahoo.es> wrote:
>> 
>> "T.V Raman" <raman@google.com> writes:
>> 
>>> also the   name "ts" as part of tree-sitter is an unfortunate
>>> confusion since ts-mode is for typescript.
>>> 
>>> I initally wrongly assumed that ts-mode was some kind of global mode
>>> that would enable tree-support for all supported modes, given the
>>> names c-ts-mode etc.
>> 
>> This is a good point.  The Tree-sitter Elisp library itself and its
>> commands already use the "treesit" abbreviation consistently.  We're
>> still on time to rename the new language modes to c-treesit-mode, and so
>> on.  Thoughts?
>
>Yeah we should use treesit, if nothing better appears. We had a (short) discussion on better names than xxx-ts-mode, but no one had better idea, so the name stuck.
>
>Yuan

If nothing better appears today I can do the rename this evening :)

Theo



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-26  8:20               ` Yuan Fu
  2022-11-26  8:22                 ` Theodor Thornhill
@ 2022-11-26  8:31                 ` Eli Zaretskii
  2022-11-26  9:06                   ` Theodor Thornhill
  1 sibling, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2022-11-26  8:31 UTC (permalink / raw)
  To: Yuan Fu; +Cc: mardani29, raman, tsdh, emacs-devel

> From: Yuan Fu <casouri@gmail.com>
> Date: Sat, 26 Nov 2022 00:20:00 -0800
> Cc: "T.V Raman" <raman@google.com>,
>  tsdh@gnu.org,
>  emacs-devel@gnu.org
> 
> > On Nov 25, 2022, at 8:25 AM, Daniel Martín <mardani29@yahoo.es> wrote:
> > 
> > "T.V Raman" <raman@google.com> writes:
> > 
> >> also the   name "ts" as part of tree-sitter is an unfortunate
> >> confusion since ts-mode is for typescript.
> >> 
> >> I initally wrongly assumed that ts-mode was some kind of global mode
> >> that would enable tree-support for all supported modes, given the
> >> names c-ts-mode etc.
> > 
> > This is a good point.  The Tree-sitter Elisp library itself and its
> > commands already use the "treesit" abbreviation consistently.  We're
> > still on time to rename the new language modes to c-treesit-mode, and so
> > on.  Thoughts?
> 
> Yeah we should use treesit, if nothing better appears. We had a (short) discussion on better names than xxx-ts-mode, but no one had better idea, so the name stuck.

Sorry, no more renames, and that is final.  The branching point for emacs-29
is almost upon us, and we cannot afford such changes anymore.  The
justification is quite weak anyway.  People who think "ts" means only
"typescript" will have to adapt.  (The tree-sitter library has all of its
functions start with "ts_", so we didn't invent this shorthand out of thin
air.)



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

* Re: Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?)
  2022-11-26  8:31                 ` Eli Zaretskii
@ 2022-11-26  9:06                   ` Theodor Thornhill
  0 siblings, 0 replies; 16+ messages in thread
From: Theodor Thornhill @ 2022-11-26  9:06 UTC (permalink / raw)
  To: emacs-devel, Eli Zaretskii, Yuan Fu; +Cc: mardani29, raman, tsdh



On 26 November 2022 09:31:45 CET, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Sat, 26 Nov 2022 00:20:00 -0800
>> Cc: "T.V Raman" <raman@google.com>,
>>  tsdh@gnu.org,
>>  emacs-devel@gnu.org
>> 
>> > On Nov 25, 2022, at 8:25 AM, Daniel Martín <mardani29@yahoo.es> wrote:
>> > 
>> > "T.V Raman" <raman@google.com> writes:
>> > 
>> >> also the   name "ts" as part of tree-sitter is an unfortunate
>> >> confusion since ts-mode is for typescript.
>> >> 
>> >> I initally wrongly assumed that ts-mode was some kind of global mode
>> >> that would enable tree-support for all supported modes, given the
>> >> names c-ts-mode etc.
>> > 
>> > This is a good point.  The Tree-sitter Elisp library itself and its
>> > commands already use the "treesit" abbreviation consistently.  We're
>> > still on time to rename the new language modes to c-treesit-mode, and so
>> > on.  Thoughts?
>> 
>> Yeah we should use treesit, if nothing better appears. We had a (short) discussion on better names than xxx-ts-mode, but no one had better idea, so the name stuck.
>
>Sorry, no more renames, and that is final.  The branching point for emacs-29
>is almost upon us, and we cannot afford such changes anymore.  The
>justification is quite weak anyway.  People who think "ts" means only
>"typescript" will have to adapt.  (The tree-sitter library has all of its
>functions start with "ts_", so we didn't invent this shorthand out of thin
>air.)
>

Ok :)

Theo



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

end of thread, other threads:[~2022-11-26  9:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-26  3:22 Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?) daanturo
2022-11-26  7:43 ` Yuri Khan
  -- strict thread matches above, loose matches on Subject: below --
2022-11-24  1:54 tree-sitter version? T.V Raman
2022-11-24  3:27 ` Yuan Fu
2022-11-24  4:57   ` T.V Raman
2022-11-24  5:02     ` Yuan Fu
2022-11-24  5:54       ` Tassilo Horn
2022-11-25  9:43         ` Yuan Fu
2022-11-25 15:08           ` T.V Raman
2022-11-25 16:25             ` Rename Tree-sitter major modes from "ts" to "treesit" (was Re: tree-sitter version?) Daniel Martín
2022-11-25 16:33               ` Eli Zaretskii
2022-11-25 16:38               ` Theodor Thornhill
2022-11-25 17:50                 ` Elliott Shugerman
2022-11-25 23:41                   ` Rudolf Adamkovič
2022-11-25 19:40                 ` Eli Zaretskii
2022-11-25 19:58                   ` Theodor Thornhill
2022-11-25 20:13                     ` Theodor Thornhill via Emacs development discussions.
2022-11-26  1:04                       ` Stefan Kangas
2022-11-26  6:45                         ` Theodor Thornhill
2022-11-26  8:20               ` Yuan Fu
2022-11-26  8:22                 ` Theodor Thornhill
2022-11-26  8:31                 ` Eli Zaretskii
2022-11-26  9:06                   ` Theodor Thornhill

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