From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Hans-Peter Deifel Newsgroups: gmane.emacs.devel Subject: Modules: should_quit vs. process_input in Emacs 27 Date: Mon, 22 Jul 2019 23:25:33 +0200 Message-ID: <87tvbdn4mq.fsf@hpdeifel.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="12106"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.2.0; emacs 27.0.50 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 22 23:49:06 2019 Return-path: Envelope-to: ged-emacs-devel@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 1hpgB7-0002yu-EF for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2019 23:49:05 +0200 Original-Received: from localhost ([::1]:37966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpgB6-00065X-Fd for ged-emacs-devel@m.gmane.org; Mon, 22 Jul 2019 17:49:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36802) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpfqs-0001Am-6f for emacs-devel@gnu.org; Mon, 22 Jul 2019 17:28:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpfqc-0004E5-7u for emacs-devel@gnu.org; Mon, 22 Jul 2019 17:27:59 -0400 Original-Received: from hpdeifel.de ([2a03:4000:2:32e::1]:55846) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hpfqG-00037s-64 for emacs-devel@gnu.org; Mon, 22 Jul 2019 17:27:41 -0400 Original-Received: from localhost (aftr-88-217-181-74.dynamic.mnet-online.de [88.217.181.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hpdeifel.de (Postfix) with ESMTPSA id 21D352C01BF for ; Mon, 22 Jul 2019 23:25:23 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a03:4000:2:32e::1 X-Mailman-Approved-At: Mon, 22 Jul 2019 17:48:58 -0400 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238810 Archived-At: Hello Emacs hackers, I'm writing a dynamic module in C that includes a long-running computation. It uses `should_quit' as per the documentation to check from time to time if the user wants to quit, in which case the computation is immediately aborted. This works great on Emacs 26.2, but doesn't on master: The computation just keeps on computing, no matter how often the user presses C-g. The git log and the info manual in master mention the new environment function `process_inputs' that should be used instead of `should_quit'. This does indeed work, but now the module is no longer compatible with Emacs 26. What should module authors in this case do to keep their modules compatible with older Emacs versions? Conditional compilation? Also, what's the purpose of the current `should_quit' in master, if it doesn't work for the above use-case any more. Why doesn't it simply behave like the following? process_input (env) == emacs_process_input_quit Cheers, HP