From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jostein@kjonigsen.net Newsgroups: gmane.emacs.bugs Subject: bug#23053: 25.0.92; error in cc-mode when editing C# file with a generic class inheritance Date: Sat, 19 Mar 2016 15:00:54 +0000 (UTC) Message-ID: References: <1458336813.1207699.553441090.44208CA4@webmail.messagingengine.com> <87wpozbd0r.fsf@acer.localhost.com> <1458372574.1341144.553674538.3D65409A@webmail.messagingengine.com> <87twk2bx56.fsf@acer.localhost.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7455_1854020736.1458399654917" X-Trace: ger.gmane.org 1458399688 11365 80.91.229.3 (19 Mar 2016 15:01:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Mar 2016 15:01:28 +0000 (UTC) To: i.lohmar@gmail.com, jostein@secure.kjonigsen.net, 23053@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 19 16:01:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ahINQ-0004Wi-0n for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Mar 2016 16:01:16 +0100 Original-Received: from localhost ([::1]:49147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahINP-0007Dk-3w for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Mar 2016 11:01:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahINJ-0007Bz-TI for bug-gnu-emacs@gnu.org; Sat, 19 Mar 2016 11:01:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahINI-0000u0-4a for bug-gnu-emacs@gnu.org; Sat, 19 Mar 2016 11:01:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahINC-0000tJ-Rq; Sat, 19 Mar 2016 11:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ahINC-0005dV-Di; Sat, 19 Mar 2016 11:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: jostein@kjonigsen.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 19 Mar 2016 15:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23053 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 23053-submit@debbugs.gnu.org id=B23053.145839965821648 (code B ref 23053); Sat, 19 Mar 2016 15:01:02 +0000 Original-Received: (at 23053) by debbugs.gnu.org; 19 Mar 2016 15:00:58 +0000 Original-Received: from localhost ([127.0.0.1]:53808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahIN8-0005d6-8W for submit@debbugs.gnu.org; Sat, 19 Mar 2016 11:00:58 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:39247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ahIN6-0005cw-Sh for 23053@debbugs.gnu.org; Sat, 19 Mar 2016 11:00:57 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 596712028F for <23053@debbugs.gnu.org>; Sat, 19 Mar 2016 11:00:56 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Sat, 19 Mar 2016 11:00:56 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=8Xd3Z4BceyDC9muEI0Ar5RsDnR4=; b=EcTJl 5spRIpr/X6nJ/GCWm8BwvKDLIedUepD9ZAfnkF0i7tfH95CBQTC1r6YxS3hnib1P o97smsYeDiTb+PtG7J45ukQUCoKdeJl4qfnW8al0Fq4oRt7GwjkUP/S4K1Znyv4v NzgOGZAy5LrEAFqfp8f2NY/4ePKsQITr7jcFPY= X-Sasl-enc: mbrBxPjIK/i2kjmoJ/ow8PbmVMRU9ShXPBcnCRKKt/jo 1458399656 Original-Received: from mail.outlook.com (ec2-52-36-134-177.us-west-2.compute.amazonaws.com [52.36.134.177]) by mail.messagingengine.com (Postfix) with ESMTPA id C2EFE68019B; Sat, 19 Mar 2016 11:00:55 -0400 (EDT) In-Reply-To: <87twk2bx56.fsf@acer.localhost.com> X-Mailer: Outlook for iOS and Android X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115088 Archived-At: ------=_Part_7455_1854020736.1458399654917 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for clearing that up. With that said: since this change was introduced in cc-mode to fix a c++ is= sue, at least one bug have been introduced in at least two other cc-mode de= rived modes: csharp-mode and java-mode. To me it therefore seems that the proper place to fix this is in cc-mode. Anyone have any major objections to that line of reasoning? Am I still dari= ng? :) -- Jostein Kj=C3=B8nigsen jostein@kjonigsen.net - https://jostein.kjonigsen.net On Sat, Mar 19, 2016 at 3:05 AM -0700, "Ingo Lohmar" w= rote: On Sat, Mar 19 2016 08:29 (+0100), Jostein Kj=C3=B8nigsen wrote: > Just to ensure all cards ar on the table... Hi. I'm the guy who kinda > involuntarily has been maintaining csharp-mode for a couple of years > now :) > > (self-defensive-mode t) > > Basically Dino Chiesa left csharp-mode unmaintained on Google Code, with > issues unaddressed and breaking bugs unfixed and no work invested after > 2011. > > In 2014, After Emacs 24 broke it, I forked the repo, moved it to Github > and took over ownership. Since then 42 issues have in some way been > addressed or closed, most of them fixed. > > Rather than add features which I can't complete or support, the focus > was on ensuring that the core language-mode code works, and if you want > IDE like features, you just supplement it with Omnisharp. > > Basically its in bug-fix mode, which by no means should be taken as > "unmaintained" :) Hi Jostein, Sorry, I should have done my homework first. It seems your work on the fork started a few months after I started using csharp-mode, and I did not become aware of it. My comments above apply to the version that Dino left at Google Code. >From your description, that all seems to me like the right direction to take the code. > If you've tried to do any work or improvements with csharp-mode, I would > love to see what changes you propose. It's not really "my" code, I'm > just trying to keep it in working order, and I have no qualms over > throwing big chunks out :) My own approach was more radical: I threw out everything that I thought did not belong to a bare-bones language major mode, and then tried to clean up the remaining code and get font-locking and indentation right. Besides a few special-case routines, that leaves me with mostly cc-mode variable settings. Incidentally that brings down the main file from more than 200k (Dino) to 36k (mine), compared to 163k (your latest). I will try to find some time to look into your code, but just from the numbers it seems that the differences are substantial. I should put my code into a repo anyway (been meaning to do that) and maybe something good will come from having both. But since I haven't used your version, I cannot reasonably file issues now anymore, sorry. FWIW, I was mostly annoyed by using arbitrary font-lock-faces (I think the function face was used for non-function symbols and so on), incomplete keyword settings and non-elisp formatting conventions. The performance problem came up in buffers with lots of literal strings, as the routines were very wasteful and used a lot of unnecessary regexp searching. > As for more closely aligning the goals of Omnisharp and csharp-mode, I > don't think that is such a far fetched idea. It has been proposed in the > past, but the Omnisharp-guys has (so far) preferred to have csharp-mode > be its own beast, which they supplement, rather than doing a full merge > (and thus taking on core language-mode responsibilities). Yeah, this was more of a general idea. There's an unfair gap in language-specific capabilities between special IDEs and Emacs for "big" languages like Java and C#, caused by the fact that those IDEs use parser and compiler information (or even duplicate their tasks). As has been discussed on this list before, part of the gap can be closed, but it's not clear to me how this would work best for basic things like syntax highlighting. ------=_Part_7455_1854020736.1458399654917 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Thanks for clearing that up.

With that said: since this change was introduced in cc-mode= to fix a c++ issue, at least one bug have been introduced in at least two = other cc-mode derived modes: csharp-mode and java-mode.

To me it therefore seems that the proper place to fix this = is in cc-mode.

Anyone have any major objections to that line of reasoning?= Am I still daring? :)

--
Jostein Kj=C3=B8nigsen
jostein@kjonigsen.net - https= ://jostein.kjonigsen.net




On Sat, Mar 19, 2016 at 3:05 AM -0700, "Ingo Loh= mar" <i.lohmar@gmail.com> wrote:

On Sat, Mar 19 2016 08:29 (+0100), Jostein Kj=C3=B8nigsen wrote:

> Just to ensure all cards ar on the table... Hi. I'm the guy who kinda
> involuntarily has been maintaining csharp-mode for a couple of years
> now :)
>
> (self-defensive-mode t)
>
> Basically Dino Chiesa left csharp-mode unmaintained on Google Code, wi=
th
> issues unaddressed and breaking bugs unfixed and no work invested afte=
r
> 2011.
>
> In 2014, After Emacs 24 broke it, I forked the repo, moved it to Githu=
b
> and took over ownership. Since then 42 issues have in some way been
> addressed or closed, most of them fixed.
>
> Rather than add features which I can't complete or support, the focus
> was on ensuring that the core language-mode code works, and if you wan=
t
> IDE like features, you just supplement it with Omnisharp.
>
> Basically its in bug-fix mode, which by no means should be taken as
> "unmaintained" :)

Hi Jostein,

Sorry, I should have done my homework first.  It seems your work on the
fork started a few months after I started using csharp-mode, and I did
not become aware of it.  My comments above apply to the version that
Dino left at Google Code.

>From your description, that all seems to me like the right direction to
take the code.

> If you've tried to do any work or improvements with csharp-mode, I wou=
ld
> love to see what changes you propose. It's not really "my" code, I'm
> just trying to keep it in working order, and I have no qualms over
> throwing big chunks out :)

My own approach was more radical: I threw out everything that I thought
did not belong to a bare-bones language major mode, and then tried to
clean up the remaining code and get font-locking and indentation right.
Besides a few special-case routines, that leaves me with mostly cc-mode
variable settings.  Incidentally that brings down the main file from
more than 200k (Dino) to 36k (mine), compared to 163k (your latest).

I will try to find some time to look into your code, but just from the
numbers it seems that the differences are substantial.  I should put my
code into a repo anyway (been meaning to do that) and maybe something
good will come from having both.  But since I haven't used your version,
I cannot reasonably file issues now anymore, sorry.

FWIW, I was mostly annoyed by using arbitrary font-lock-faces (I think
the function face was used for non-function symbols and so on),
incomplete keyword settings and non-elisp formatting conventions.

The performance problem came up in buffers with lots of literal strings,
as the routines were very wasteful and used a lot of unnecessary regexp
searching.

> As for more closely aligning the goals of Omnisharp and csharp-mode, I
> don't think that is such a far fetched idea. It has been proposed in t=
he
> past, but the Omnisharp-guys has (so far) preferred to have csharp-mod=
e
> be its own beast, which they supplement, rather than doing a full merg=
e
> (and thus taking on core language-mode responsibilities).

Yeah, this was more of a general idea.  There's an unfair gap in
language-specific capabilities between special IDEs and Emacs for "big"
languages like Java and C#, caused by the fact that those IDEs use
parser and compiler information (or even duplicate their tasks).  As has
been discussed on this list before, part of the gap can be closed, but
it's not clear to me how this would work best for basic things like
syntax highlighting.
------=_Part_7455_1854020736.1458399654917--