From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.devel Subject: Re: interacting during (sit-for 0). Was: [PATCH] 5x speedup of flyspell-buffer Date: Fri, 14 Apr 2023 19:01:20 -0700 Message-ID: References: <837cug5l18.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 15 08:36:50 2023 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 1pnZWi-0007gG-PQ for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Apr 2023 08:36:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnZVj-0000b5-Cv; Sat, 15 Apr 2023 02:35:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnVED-0001uE-Qy for emacs-devel@gnu.org; Fri, 14 Apr 2023 22:01:25 -0400 Original-Received: from powdermilk.math.berkeley.edu ([169.229.140.13]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnVEA-00064U-Rh; Fri, 14 Apr 2023 22:01:25 -0400 Original-Received: by powdermilk.math.berkeley.edu (Postfix, from userid 5260) id C4D02120730; Fri, 14 Apr 2023 19:01:20 -0700 (PDT) Content-Disposition: inline In-Reply-To: Received-SPF: none client-ip=169.229.140.13; envelope-from=serganov@math.berkeley.edu; helo=powdermilk.math.berkeley.edu X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 15 Apr 2023 02:35:37 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305321 Archived-At: On Fri, Apr 14, 2023 at 06:51:31PM -0700, Ilya Zakharevich wrote: > Suppose that a variable `recursive-edit-exit-on-idle' is supported by > the even loop. Would then the following code implement > (sit-for-0-interactively 'READ-ONLY) > correctly? > > (if (or unread-command-events unread-input-method-events unread-post-input-method-events) > ;;; (with-current-buffer flyspell-large-region-buffer > (let ((buffer-read-only t) (inhibit-read-only nil) > (recursive-edit-exit-on-idle t)) > (condition-case nil > (recursive-edit) > (error nil))));;;) Thinking on this more: 'quit should be propagated (since the user should not know about an extra level of recursion). Moreover, the implementation of `recursive-edit-exit-on-idle' should disallow entering EXTRA LEVELS of recursive edit when this variable is set. > Thanks, > Ilya