all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
@ 2023-12-08 13:44 Jacob Leeming
  2023-12-08 14:30 ` bug#67709: Jacob Leeming
  2023-12-16 11:39 ` bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Jacob Leeming @ 2023-12-08 13:44 UTC (permalink / raw)
  To: 67709

From emacs -Q:

Evaluate this elisp to set up treesitter for csharp:

(setq treesit-language-source-alist '((c-sharp
"https://github.com/tree-sitter/tree-sitter-c-sharp" "master" "src"))
      treesit-load-name-override-list '((c-sharp
"libtree-sitter-csharp" "tree_sitter_c_sharp"))
      major-mode-remap-alist '((csharp-mode . csharp-ts-mode)))

Insert the following text into a csharp-ts-mode buffer:

void ExampleFunction(
    int arg1,
  int arg2,
 int arg3,
int arg4,
    int arg5
)
{
    Console.WriteLine(arg1);
}

Try to indent the parameters of the function with
indent-for-tab-command. Nothing will happen.

This issue can be fixed with the following patch:



diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index 53c52e6..8cc4e95 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -704,7 +704,8 @@ csharp-ts-mode--indent-rules
      ((parent-is "object_type") parent-bol csharp-ts-mode-indent-offset)
      ((parent-is "enum_body") parent-bol csharp-ts-mode-indent-offset)
      ((parent-is "arrow_function") parent-bol csharp-ts-mode-indent-offset)
-     ((parent-is "parenthesized_expression") parent-bol
csharp-ts-mode-indent-offset))))
+     ((parent-is "parenthesized_expression") parent-bol
csharp-ts-mode-indent-offset)
+     ((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset))))

 (defvar csharp-ts-mode--keywords
   '("using" "namespace" "class" "if" "else" "throw" "new" "for"





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

* bug#67709:
  2023-12-08 13:44 bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode Jacob Leeming
@ 2023-12-08 14:30 ` Jacob Leeming
  2023-12-08 14:39   ` bug#67709: Eli Zaretskii
  2023-12-16 11:39 ` bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Jacob Leeming @ 2023-12-08 14:30 UTC (permalink / raw)
  To: 67709-done

duplicate of 67710





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

* bug#67709:
  2023-12-08 14:30 ` bug#67709: Jacob Leeming
@ 2023-12-08 14:39   ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-12-08 14:39 UTC (permalink / raw)
  To: Jacob Leeming; +Cc: jacobtophatleeming, 67709

reopen 67709
merge 67710 67709
thanks

> From: Jacob Leeming <jacobtophatleeming@gmail.com>
> Date: Fri, 8 Dec 2023 14:30:20 +0000
> 
> duplicate of 67710

We don't close duplicates, we merge them.





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

* bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
  2023-12-08 13:44 bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode Jacob Leeming
  2023-12-08 14:30 ` bug#67709: Jacob Leeming
@ 2023-12-16 11:39 ` Eli Zaretskii
  2023-12-23  9:02   ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-12-16 11:39 UTC (permalink / raw)
  To: Jacob Leeming, Theodor Thornhill; +Cc: 67709

> From: Jacob Leeming <jacobtophatleeming@gmail.com>
> Date: Fri, 8 Dec 2023 13:44:14 +0000
> 
> >From emacs -Q:
> 
> Evaluate this elisp to set up treesitter for csharp:
> 
> (setq treesit-language-source-alist '((c-sharp
> "https://github.com/tree-sitter/tree-sitter-c-sharp" "master" "src"))
>       treesit-load-name-override-list '((c-sharp
> "libtree-sitter-csharp" "tree_sitter_c_sharp"))
>       major-mode-remap-alist '((csharp-mode . csharp-ts-mode)))
> 
> Insert the following text into a csharp-ts-mode buffer:
> 
> void ExampleFunction(
>     int arg1,
>   int arg2,
>  int arg3,
> int arg4,
>     int arg5
> )
> {
>     Console.WriteLine(arg1);
> }
> 
> Try to indent the parameters of the function with
> indent-for-tab-command. Nothing will happen.
> 
> This issue can be fixed with the following patch:
> 
> 
> 
> diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
> index 53c52e6..8cc4e95 100644
> --- a/lisp/progmodes/csharp-mode.el
> +++ b/lisp/progmodes/csharp-mode.el
> @@ -704,7 +704,8 @@ csharp-ts-mode--indent-rules
>       ((parent-is "object_type") parent-bol csharp-ts-mode-indent-offset)
>       ((parent-is "enum_body") parent-bol csharp-ts-mode-indent-offset)
>       ((parent-is "arrow_function") parent-bol csharp-ts-mode-indent-offset)
> -     ((parent-is "parenthesized_expression") parent-bol
> csharp-ts-mode-indent-offset))))
> +     ((parent-is "parenthesized_expression") parent-bol
> csharp-ts-mode-indent-offset)
> +     ((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset))))
> 
>  (defvar csharp-ts-mode--keywords
>    '("using" "namespace" "class" "if" "else" "throw" "new" "for"

Theo, any comments?  Should I install this?

Thanks.





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

* bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
  2023-12-16 11:39 ` bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode Eli Zaretskii
@ 2023-12-23  9:02   ` Eli Zaretskii
  2023-12-28  8:04     ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-12-23  9:02 UTC (permalink / raw)
  To: theo; +Cc: jacobtophatleeming, 67709

Ping!  Theo, could you please look into this?

> Cc: 67709@debbugs.gnu.org
> Date: Sat, 16 Dec 2023 13:39:58 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Jacob Leeming <jacobtophatleeming@gmail.com>
> > Date: Fri, 8 Dec 2023 13:44:14 +0000
> > 
> > >From emacs -Q:
> > 
> > Evaluate this elisp to set up treesitter for csharp:
> > 
> > (setq treesit-language-source-alist '((c-sharp
> > "https://github.com/tree-sitter/tree-sitter-c-sharp" "master" "src"))
> >       treesit-load-name-override-list '((c-sharp
> > "libtree-sitter-csharp" "tree_sitter_c_sharp"))
> >       major-mode-remap-alist '((csharp-mode . csharp-ts-mode)))
> > 
> > Insert the following text into a csharp-ts-mode buffer:
> > 
> > void ExampleFunction(
> >     int arg1,
> >   int arg2,
> >  int arg3,
> > int arg4,
> >     int arg5
> > )
> > {
> >     Console.WriteLine(arg1);
> > }
> > 
> > Try to indent the parameters of the function with
> > indent-for-tab-command. Nothing will happen.
> > 
> > This issue can be fixed with the following patch:
> > 
> > 
> > 
> > diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
> > index 53c52e6..8cc4e95 100644
> > --- a/lisp/progmodes/csharp-mode.el
> > +++ b/lisp/progmodes/csharp-mode.el
> > @@ -704,7 +704,8 @@ csharp-ts-mode--indent-rules
> >       ((parent-is "object_type") parent-bol csharp-ts-mode-indent-offset)
> >       ((parent-is "enum_body") parent-bol csharp-ts-mode-indent-offset)
> >       ((parent-is "arrow_function") parent-bol csharp-ts-mode-indent-offset)
> > -     ((parent-is "parenthesized_expression") parent-bol
> > csharp-ts-mode-indent-offset))))
> > +     ((parent-is "parenthesized_expression") parent-bol
> > csharp-ts-mode-indent-offset)
> > +     ((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset))))
> > 
> >  (defvar csharp-ts-mode--keywords
> >    '("using" "namespace" "class" "if" "else" "throw" "new" "for"
> 
> Theo, any comments?  Should I install this?
> 
> Thanks.
> 
> 
> 
> 





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

* bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
  2023-12-23  9:02   ` Eli Zaretskii
@ 2023-12-28  8:04     ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-01-09 19:59       ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-12-28  8:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jacobtophatleeming, 67709

Eli Zaretskii <eliz@gnu.org> writes:

> Ping!  Theo, could you please look into this?
>

Absolutely, thanks!

Theo

>> Cc: 67709@debbugs.gnu.org
>> Date: Sat, 16 Dec 2023 13:39:58 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>> 
>> > From: Jacob Leeming <jacobtophatleeming@gmail.com>
>> > Date: Fri, 8 Dec 2023 13:44:14 +0000
>> > 
>> > >From emacs -Q:
>> > 
>> > Evaluate this elisp to set up treesitter for csharp:
>> > 
>> > (setq treesit-language-source-alist '((c-sharp
>> > "https://github.com/tree-sitter/tree-sitter-c-sharp" "master" "src"))
>> >       treesit-load-name-override-list '((c-sharp
>> > "libtree-sitter-csharp" "tree_sitter_c_sharp"))
>> >       major-mode-remap-alist '((csharp-mode . csharp-ts-mode)))
>> > 
>> > Insert the following text into a csharp-ts-mode buffer:
>> > 
>> > void ExampleFunction(
>> >     int arg1,
>> >   int arg2,
>> >  int arg3,
>> > int arg4,
>> >     int arg5
>> > )
>> > {
>> >     Console.WriteLine(arg1);
>> > }
>> > 
>> > Try to indent the parameters of the function with
>> > indent-for-tab-command. Nothing will happen.
>> > 
>> > This issue can be fixed with the following patch:
>> > 
>> > 
>> > 
>> > diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
>> > index 53c52e6..8cc4e95 100644
>> > --- a/lisp/progmodes/csharp-mode.el
>> > +++ b/lisp/progmodes/csharp-mode.el
>> > @@ -704,7 +704,8 @@ csharp-ts-mode--indent-rules
>> >       ((parent-is "object_type") parent-bol csharp-ts-mode-indent-offset)
>> >       ((parent-is "enum_body") parent-bol csharp-ts-mode-indent-offset)
>> >       ((parent-is "arrow_function") parent-bol csharp-ts-mode-indent-offset)
>> > -     ((parent-is "parenthesized_expression") parent-bol
>> > csharp-ts-mode-indent-offset))))
>> > +     ((parent-is "parenthesized_expression") parent-bol
>> > csharp-ts-mode-indent-offset)
>> > +     ((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset))))
>> > 
>> >  (defvar csharp-ts-mode--keywords
>> >    '("using" "namespace" "class" "if" "else" "throw" "new" "for"
>> 
>> Theo, any comments?  Should I install this?
>> 
>> Thanks.
>> 
>> 
>> 
>> 





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

* bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
  2023-12-28  8:04     ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-01-09 19:59       ` Eli Zaretskii
  2024-01-20  9:05         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-01-09 19:59 UTC (permalink / raw)
  To: Theodor Thornhill; +Cc: jacobtophatleeming, 67709

> From: Theodor Thornhill <theo@thornhill.no>
> Cc: jacobtophatleeming@gmail.com, 67709@debbugs.gnu.org
> Date: Thu, 28 Dec 2023 09:04:13 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Ping!  Theo, could you please look into this?
> >
> 
> Absolutely, thanks!

Any progress?

> >> Cc: 67709@debbugs.gnu.org
> >> Date: Sat, 16 Dec 2023 13:39:58 +0200
> >> From: Eli Zaretskii <eliz@gnu.org>
> >> 
> >> > From: Jacob Leeming <jacobtophatleeming@gmail.com>
> >> > Date: Fri, 8 Dec 2023 13:44:14 +0000
> >> > 
> >> > >From emacs -Q:
> >> > 
> >> > Evaluate this elisp to set up treesitter for csharp:
> >> > 
> >> > (setq treesit-language-source-alist '((c-sharp
> >> > "https://github.com/tree-sitter/tree-sitter-c-sharp" "master" "src"))
> >> >       treesit-load-name-override-list '((c-sharp
> >> > "libtree-sitter-csharp" "tree_sitter_c_sharp"))
> >> >       major-mode-remap-alist '((csharp-mode . csharp-ts-mode)))
> >> > 
> >> > Insert the following text into a csharp-ts-mode buffer:
> >> > 
> >> > void ExampleFunction(
> >> >     int arg1,
> >> >   int arg2,
> >> >  int arg3,
> >> > int arg4,
> >> >     int arg5
> >> > )
> >> > {
> >> >     Console.WriteLine(arg1);
> >> > }
> >> > 
> >> > Try to indent the parameters of the function with
> >> > indent-for-tab-command. Nothing will happen.
> >> > 
> >> > This issue can be fixed with the following patch:
> >> > 
> >> > 
> >> > 
> >> > diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
> >> > index 53c52e6..8cc4e95 100644
> >> > --- a/lisp/progmodes/csharp-mode.el
> >> > +++ b/lisp/progmodes/csharp-mode.el
> >> > @@ -704,7 +704,8 @@ csharp-ts-mode--indent-rules
> >> >       ((parent-is "object_type") parent-bol csharp-ts-mode-indent-offset)
> >> >       ((parent-is "enum_body") parent-bol csharp-ts-mode-indent-offset)
> >> >       ((parent-is "arrow_function") parent-bol csharp-ts-mode-indent-offset)
> >> > -     ((parent-is "parenthesized_expression") parent-bol
> >> > csharp-ts-mode-indent-offset))))
> >> > +     ((parent-is "parenthesized_expression") parent-bol
> >> > csharp-ts-mode-indent-offset)
> >> > +     ((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset))))
> >> > 
> >> >  (defvar csharp-ts-mode--keywords
> >> >    '("using" "namespace" "class" "if" "else" "throw" "new" "for"
> >> 
> >> Theo, any comments?  Should I install this?
> >> 
> >> Thanks.
> >> 
> >> 
> >> 
> >> 
> 





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

* bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
  2024-01-09 19:59       ` Eli Zaretskii
@ 2024-01-20  9:05         ` Eli Zaretskii
  2024-01-20  9:10           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2024-01-20  9:05 UTC (permalink / raw)
  To: theo; +Cc: jacobtophatleeming, 67709

Ping! Ping! Any progress there?

> Cc: jacobtophatleeming@gmail.com, 67709@debbugs.gnu.org
> Date: Tue, 09 Jan 2024 21:59:41 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Theodor Thornhill <theo@thornhill.no>
> > Cc: jacobtophatleeming@gmail.com, 67709@debbugs.gnu.org
> > Date: Thu, 28 Dec 2023 09:04:13 +0100
> > 
> > Eli Zaretskii <eliz@gnu.org> writes:
> > 
> > > Ping!  Theo, could you please look into this?
> > >
> > 
> > Absolutely, thanks!
> 
> Any progress?
> 
> > >> Cc: 67709@debbugs.gnu.org
> > >> Date: Sat, 16 Dec 2023 13:39:58 +0200
> > >> From: Eli Zaretskii <eliz@gnu.org>
> > >> 
> > >> > From: Jacob Leeming <jacobtophatleeming@gmail.com>
> > >> > Date: Fri, 8 Dec 2023 13:44:14 +0000
> > >> > 
> > >> > >From emacs -Q:
> > >> > 
> > >> > Evaluate this elisp to set up treesitter for csharp:
> > >> > 
> > >> > (setq treesit-language-source-alist '((c-sharp
> > >> > "https://github.com/tree-sitter/tree-sitter-c-sharp" "master" "src"))
> > >> >       treesit-load-name-override-list '((c-sharp
> > >> > "libtree-sitter-csharp" "tree_sitter_c_sharp"))
> > >> >       major-mode-remap-alist '((csharp-mode . csharp-ts-mode)))
> > >> > 
> > >> > Insert the following text into a csharp-ts-mode buffer:
> > >> > 
> > >> > void ExampleFunction(
> > >> >     int arg1,
> > >> >   int arg2,
> > >> >  int arg3,
> > >> > int arg4,
> > >> >     int arg5
> > >> > )
> > >> > {
> > >> >     Console.WriteLine(arg1);
> > >> > }
> > >> > 
> > >> > Try to indent the parameters of the function with
> > >> > indent-for-tab-command. Nothing will happen.
> > >> > 
> > >> > This issue can be fixed with the following patch:
> > >> > 
> > >> > 
> > >> > 
> > >> > diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
> > >> > index 53c52e6..8cc4e95 100644
> > >> > --- a/lisp/progmodes/csharp-mode.el
> > >> > +++ b/lisp/progmodes/csharp-mode.el
> > >> > @@ -704,7 +704,8 @@ csharp-ts-mode--indent-rules
> > >> >       ((parent-is "object_type") parent-bol csharp-ts-mode-indent-offset)
> > >> >       ((parent-is "enum_body") parent-bol csharp-ts-mode-indent-offset)
> > >> >       ((parent-is "arrow_function") parent-bol csharp-ts-mode-indent-offset)
> > >> > -     ((parent-is "parenthesized_expression") parent-bol
> > >> > csharp-ts-mode-indent-offset))))
> > >> > +     ((parent-is "parenthesized_expression") parent-bol
> > >> > csharp-ts-mode-indent-offset)
> > >> > +     ((parent-is "parameter_list") parent-bol csharp-ts-mode-indent-offset))))
> > >> > 
> > >> >  (defvar csharp-ts-mode--keywords
> > >> >    '("using" "namespace" "class" "if" "else" "throw" "new" "for"
> > >> 
> > >> Theo, any comments?  Should I install this?
> > >> 
> > >> Thanks.
> > >> 
> > >> 
> > >> 
> > >> 
> > 
> 
> 
> 
> 





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

* bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode
  2024-01-20  9:05         ` Eli Zaretskii
@ 2024-01-20  9:10           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 9+ messages in thread
From: Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-01-20  9:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: jacobtophatleeming, 67709

[-- Attachment #1: Type: text/html, Size: 5573 bytes --]

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

end of thread, other threads:[~2024-01-20  9:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-08 13:44 bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode Jacob Leeming
2023-12-08 14:30 ` bug#67709: Jacob Leeming
2023-12-08 14:39   ` bug#67709: Eli Zaretskii
2023-12-16 11:39 ` bug#67709: 29.1.50; [patch] missing indent rule for parameter list in csharp-ts-mode Eli Zaretskii
2023-12-23  9:02   ` Eli Zaretskii
2023-12-28  8:04     ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-09 19:59       ` Eli Zaretskii
2024-01-20  9:05         ` Eli Zaretskii
2024-01-20  9:10           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors

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.