From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: emacs rendering comparisson between emacs23 and emacs26.3 Date: Sun, 5 Apr 2020 11:16:23 +0000 Message-ID: <20200405111623.GB5049@ACM> References: <834ku43c61.fsf@gnu.org> <83k12zz6ds.fsf@gnu.org> <054393f3-3873-ab6e-b325-0eca354d8838@gmx.at> <20200403174757.GA8266@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="118984"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, eliz@gnu.org, rrandresf@gmail.com, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 05 13:17:07 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL3H1-000Uor-2F for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Apr 2020 13:17:07 +0200 Original-Received: from localhost ([::1]:46940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL3H0-0006tF-6W for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Apr 2020 07:17:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43428) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL3GQ-0006Fh-AF for emacs-devel@gnu.org; Sun, 05 Apr 2020 07:16:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jL3GO-0007DL-Rx for emacs-devel@gnu.org; Sun, 05 Apr 2020 07:16:30 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:22250 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1jL3GO-0007CV-GO for emacs-devel@gnu.org; Sun, 05 Apr 2020 07:16:28 -0400 Original-Received: (qmail 63164 invoked by uid 3782); 5 Apr 2020 11:16:27 -0000 Original-Received: from acm.muc.de (p2E5D5461.dip0.t-ipconnect.de [46.93.84.97]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sun, 05 Apr 2020 13:16:23 +0200 Original-Received: (qmail 6049 invoked by uid 1000); 5 Apr 2020 11:16:23 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246446 Archived-At: Hello, Richard. On Sat, Apr 04, 2020 at 23:12:49 -0400, Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > 'open-paren-in-column-0-is-defun-start', if non-nil, > > > conceptually allows progmodes to avoid scanning an entire buffer > > > in order to get things like syntax highlighting and code > > > indenting right. Rather, progmodes are allowed to find the > > > first or next paren in column zero wrt a given position and base > > > further decisions on the assumption that such a paren is on the > > > "top level" of its buffer. > > This assumption proved to be very problematic. > Problematic for whom? Well, for me for a start. ;-) I had to deal with lots of bug reports, the solution to which was "please put a \ before the ( in your comment". One of these was in the copyright statement in the Emacs C sources (see bug #22884). This bug caused the typing of a "//" to take over 10 seconds to redisplay. > I don't see why. Suppose open-paren-in-column-0-is-defun-start is non-nil, and we have something like: { /* foo (but bar */ } ^ point . From the indicated point, do (scan-lists (point) -1 1). (i) scan-lists moves back and finds the comment end.... (ii) ... and thus calls back_comment. (iii) back_comment finds the ( in column zero, and wrongly assumes this is the beginning of a function. (iv) back_comment breaks off its scanning, returning "comment start not found". (v) scan_lists carries on the scanning from just before the "*/", now blissfully unaware it's actually inside a comment. (vi) scan_lists finds the (, and returns its position. The indentation and/or fontification functions in CC Mode are now confused. > > The fact is, people put parentheses in column zero inside > > comments, and nothing we can say or do will stop them. Why should > > it? > Why would we want to "stop them"? That feature is/was a _convenience_ > for users, a speedup. If you don't appreciate the speedup, so you decide > not to arrange to get it, why should I argue with you? I can still benefit > from that speedup in my projects. so I am happy and so are you. o-p-i-c-0-i-d-s is an arcane variable which very few users are aware of. Their first knowledge of it typically came in my response to their bug report saying put the backslash before the paren. There are likely many more users who have encountered wrong indentation/fontification who have just not bothered reporting it. > > these parentheses are perfectly valid in so many languages. > Nobody said they were "invalid" in any language. I think we are > miscommunicating. I think I meant that, given their validity, it is up to us as Emacs developers to arrange that they don't cause trouble, rather than expecting our users to insert these obtrusive backslashes. > -- > Dr Richard Stallman > Chief GNUisance of the GNU Project (https://gnu.org) > Founder, Free Software Foundation (https://fsf.org) > Internet Hall-of-Famer (https://internethalloffame.org) -- Alan Mackenzie (Nuremberg, Germany).