Subject: Re: bug#48871: 27.2; Unusably slow in C# mode

From: jan <[email-masked]>
Date: Sun, 6 Jun 2021 15:53:11 +0100

Hi,
I don't recall installing c# but may well have happened.
>From package-list-packages:

csharp-mode        20210328.2004 installed             C# mode derived mode

Which does not say built-in so likely I did. Looking in the unzipped
emacs 27.2 , no relevant *sharp* file in it, and did find it in the
elpa directory, so I guess must have.

Started with -Q.  Did the M-x load-file for csharp-mode.el (FYI also
had to do load-file for csharp-compilation.el before that to make it
happy).

Finally got to load the C# file itself, exactly the same. No faster.

Troublesome C# file attached.

cheers

jan

On 06/06/2021, Eli Zaretskii <[email-masked]> wrote:
>> From: jan <[email-masked]>
>> Date: Sun, 6 Jun 2021 14:34:19 +0100
>> Cc: [email-masked]
>>
>> had already tried the -Q option. Emacs started but when I tried "M-x
>> csharp-mode" it didn't recognise it. I tried exactly the same on the
>> normally-started emacs to check I was entering it correctly and that
>> did understand it.
>> I guess the -Q effectively disables some modes? I was surprised.
>>
>> Yep, customisation may well  be the issue here.
>
> So let's try to figure out why "emacs -Q" fails to load csharp-mode.
> Since there's no such mode bundled with Emacs, I guess you downloaded
> it from somewhere?  Then try this:
>
>   emacs -Q
>   M-x load-file RET /path/to/csharp-mode.el RE
>
> The last line assumes that the Lisp file which defines the function
> csharp-mode is called csharp-mode.el; if not, change the file name to
> fit the reality.  Also, "/path/to/" should be replaced with the actual
> absolute file name of the file on your system.
>
> Then say what you tried:
>
>    M-x csharp-mode RET
>
> If that still doesn't work, please show the error messages.  Likely
> they will identify packages csharp-mode depends on that you also need
> to load with "M-x load-file".
>
>> I have a file of equivalent size which should demo the issue but can't
>> zip it as gmail blocks anything with a zip attached, I can post as
>> attachment directly but it's 220KBytes, you ok with that on your
>> mailing list?
>
> Yes, it's okay.  But let's first try and see whether "emacs -Q"
> exhibits the same problem, okay?
>