From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Three strikes them out Date: Sun, 01 Jun 2008 22:16:24 -0400 Message-ID: References: <48403C07.5080404@gmail.com> <484113E8.1040008@gmail.com> <4841177E.8020708@gmx.at> <484118F0.2050805@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1212373011 19448 80.91.229.12 (2 Jun 2008 02:16:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Jun 2008 02:16:51 +0000 (UTC) Cc: martin rudalics , Emacs Devel To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 02 04:17:32 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K2zc3-0004wg-PK for ged-emacs-devel@m.gmane.org; Mon, 02 Jun 2008 04:17:32 +0200 Original-Received: from localhost ([127.0.0.1]:51392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2zbH-0000NR-JA for ged-emacs-devel@m.gmane.org; Sun, 01 Jun 2008 22:16:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2zbC-0000ND-H9 for emacs-devel@gnu.org; Sun, 01 Jun 2008 22:16:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2zbB-0000Mt-5e for emacs-devel@gnu.org; Sun, 01 Jun 2008 22:16:38 -0400 Original-Received: from [199.232.76.173] (port=53694 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2zbA-0000Mq-Vc for emacs-devel@gnu.org; Sun, 01 Jun 2008 22:16:37 -0400 Original-Received: from 206-248-132-168.dsl.teksavvy.com ([206.248.132.168]:47930 helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K2zbA-0003mc-Nh for emacs-devel@gnu.org; Sun, 01 Jun 2008 22:16:36 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 3EFD5B4239; Sun, 1 Jun 2008 22:16:25 -0400 (EDT) In-Reply-To: <484118F0.2050805@gmail.com> (Lennart Borgman's message of "Sat, 31 May 2008 11:22:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98205 Archived-At: >> >> What makes you think the problem is in the timers? >> >> I can't remember encountering such a problem. >> > >> > I know that something is looping during fontification. (Sometimes it is >> > my bad, sometimes it is things I do not understand.) >> >> What happens when you set `jit-lock-context-time' to a very large value? > I can dig up one of those cases that loops and try it, but why do you > propose that? (It might of course help a bit to find out where the problem > happens and I have one case where this could indeed be interesting, but I am > not sure if that is what you mean.) > The general problem that looping in a timer may hang Emacs is what I really > wanted to address here. Yes, but depending on how it happens, the way to solve it may be different. E.g. is the problem that C-g is ignored? Or that it is obeyed but we immediately get back into the problematic code? Is the problematic code really triggered by timers, rather than by display hooks like jit-lock? I think there's a lot of room for improvement in how Emacs allows the user to get back control in some cases, but this is all very difficult. Regarding Miles's issue with "hitting C-g frantically", this is an important point (I do that too in all kinds of cases), but that doesn't mean we can't do what you want: it just means we have to distinguish those two situations. E.g. the "3 C-g" rules might only apply if some amount of time elapses between them, and if the currently running code in all 3 is "similar", ... that doesn't sound quite right either, but that just indicates that it's a hard problem ;-) Stefan