From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#33784: 27.0.50; some case c-backward-token-2 takes cpu more and emacs hang Date: Tue, 18 Dec 2018 21:05:07 +0000 Message-ID: <20181218210507.GD8949@ACM> References: <20181218174716.96822.qmail@mail.muc.de> <83tvjad5x7.fsf@gnu.org> <20181218185505.GC8949@ACM> <83r2eed4fy.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1545167414 26161 195.159.176.226 (18 Dec 2018 21:10:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2018 21:10:14 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 33784@debbugs.gnu.org, linux.xhyang@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 18 22:10:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZMcx-0006YD-Lt for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Dec 2018 22:10:07 +0100 Original-Received: from localhost ([::1]:56317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZMez-0006Yu-7Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Dec 2018 16:12:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZMes-0006YX-O9 for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 16:12:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZMeo-0005ay-Ls for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 16:12:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49512) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZMeo-0005aF-As; Tue, 18 Dec 2018 16:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZMeo-0003TJ-17; Tue, 18 Dec 2018 16:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 18 Dec 2018 21:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33784 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 33784-submit@debbugs.gnu.org id=B33784.154516747913288 (code B ref 33784); Tue, 18 Dec 2018 21:12:01 +0000 Original-Received: (at 33784) by debbugs.gnu.org; 18 Dec 2018 21:11:19 +0000 Original-Received: from localhost ([127.0.0.1]:53770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZMe7-0003SG-C4 for submit@debbugs.gnu.org; Tue, 18 Dec 2018 16:11:19 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:20186 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1gZMe6-0003S7-8y for 33784@debbugs.gnu.org; Tue, 18 Dec 2018 16:11:19 -0500 Original-Received: (qmail 74297 invoked by uid 3782); 18 Dec 2018 21:11:15 -0000 Original-Received: from acm.muc.de (p2E5D5B55.dip0.t-ipconnect.de [46.93.91.85]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 18 Dec 2018 22:11:15 +0100 Original-Received: (qmail 13602 invoked by uid 1000); 18 Dec 2018 21:05:07 -0000 Content-Disposition: inline In-Reply-To: <83r2eed4fy.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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" Xref: news.gmane.org gmane.emacs.bugs:153576 Archived-At: Hello, Eli. On Tue, Dec 18, 2018 at 21:23:45 +0200, Eli Zaretskii wrote: > > Date: Tue, 18 Dec 2018 18:55:05 +0000 > > Cc: linux.xhyang@gmail.com, 33784@debbugs.gnu.org > > From: Alan Mackenzie > > The current strategy is silently to ignore (font-lock-mode) when the > > buffer name begins with a space. It feels to me like an easy to > > implement, but suboptimal, workaround to a real problem, whatever that > > real problem might be. > The real problem is probably performance. But that's a guess; someone > will have to do the forensics to find out which change did that, and > then try to find related bug reports and/or discussions. Hah! The change, not to fontify buffers with names beginning with spaces, was made by Simon Marshall on 1995-12-09. The list archives only go back to 2000. :-( I suspect what happened was that back last millenium, there was a strong convention for what a buffer with a name beginning with a space meant, and it was perfectly OK then not to fontify such a buffer. Over time, that convention became diluted such that even buffers created by users (e.g. by with-temp-buffer) get names starting with a space. But that's only a guess. Maybe the solution would be not to start with-temp-buffer names with a space. Indeed page "Buffer Names" in Elisp states "Buffers that are ephemeral and generally uninteresting to the user have names starting with a space", which is ambiguous - does a buffer have to be both ephemeral and generally uninteresting, or will one of these properties do? Probably the latter. Maybe the documentation for with-temp-buffer should be amended to recommend Lisp programmers not to use it for buffers holding user text. Or something like that. -- Alan Mackenzie (Nuremberg, Germany).