all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hans-Peter Deifel <hpd@hpdeifel.de>
To: emacs-devel@gnu.org
Subject: Modules: should_quit vs. process_input in Emacs 27
Date: Mon, 22 Jul 2019 23:25:33 +0200	[thread overview]
Message-ID: <87tvbdn4mq.fsf@hpdeifel.de> (raw)

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



             reply	other threads:[~2019-07-22 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 21:25 Hans-Peter Deifel [this message]
2019-07-23 14:52 ` Modules: should_quit vs. process_input in Emacs 27 Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tvbdn4mq.fsf@hpdeifel.de \
    --to=hpd@hpdeifel.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.