From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Why doesn't emacs yield more? Date: Thu, 29 Aug 2019 21:46:04 +0300 Message-ID: <83woevajyr.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="116529"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 29 20:46:18 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i3PR3-000UDW-Ob for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Aug 2019 20:46:17 +0200 Original-Received: from localhost ([::1]:53518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3PR2-000227-Hi for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Aug 2019 14:46:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48465) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3PQi-0001z5-Ry for help-gnu-emacs@gnu.org; Thu, 29 Aug 2019 14:45:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3PQi-0000RP-N8 for help-gnu-emacs@gnu.org; Thu, 29 Aug 2019 14:45:56 -0400 Original-Received: from [176.228.60.248] (port=3647 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i3PQh-0004YY-Ve for help-gnu-emacs@gnu.org; Thu, 29 Aug 2019 14:45:56 -0400 In-reply-to: (message from ndame on Thu, 29 Aug 2019 17:39:20 +0200 (CEST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121397 Archived-At: > From: ndame > Date: Thu, 29 Aug 2019 17:39:20 +0200 (CEST) > > > Assuming it was redisplay that took most of the time: you cannot > > interrupt it, not by default.  What would be the purpose of that? > > Emacs cannot allow the display to be left in a state that is > > inconsistent with the contents of the buffer, so it will immediately > > reenter another redisplay cycle. > > If I e.g. do a C-y and consquently emacs starts a long operation then > if I interrupt then emacs could simply restore the buffer/display state > from before the C-y state. Emacs doesn't support transactional operations, not in general. Once you yank some text, the global state could be modified to the degree that rolling it back may not be possible; and Emacs doesn't know how anyway. > I didn't see my C-y operation finish because of the redisplay, so I > wouldn't mind if a C-g would cancel that too. Most use cases are different. What if, e.g., the command that hangs sends some material over a network connection, or writes it to a file, or passes it to a subprocess? You can always undo manually, of course, and that could be one more way of stopping a prolonged redisplay (assuming this is what caused the delay in your case; you still haven't described enough detail for me to know what are we talking about). > I don't know if a snapshot can be made of the current buffer/display > state, but if emacs can do that then it could simply restore the > previous snapshot instantly, so there would be no issue of inconsistent > buffer/display after interrupting. That's a far cry from how Emacs was designed and implemented. It isn't a transactional system.