From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#21329: 25.0.50; Flyspell minor mode produces weird effects on keyboard macros Date: Thu, 27 Aug 2015 21:33:16 -0400 Message-ID: References: <877fom5i9z.fsf@openmailbox.org> <83io84hhte.fsf@gnu.org> <83k2sjfkxu.fsf@gnu.org> <83io83fhyr.fsf@gnu.org> <83d1yag44r.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1440725667 29281 80.91.229.3 (28 Aug 2015 01:34:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Aug 2015 01:34:27 +0000 (UTC) Cc: markkarpov@openmailbox.org, 21329@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 28 03:34:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZV8YV-0000Jc-M0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Aug 2015 03:34:11 +0200 Original-Received: from localhost ([::1]:45474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZV8YU-0006BJ-7B for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Aug 2015 21:34:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZV8YQ-0006BB-NL for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2015 21:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZV8YM-0006ks-M7 for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2015 21:34:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZV8YM-0006ko-In for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2015 21:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZV8YM-0006WY-77 for bug-gnu-emacs@gnu.org; Thu, 27 Aug 2015 21:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Aug 2015 01:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21329 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21329-submit@debbugs.gnu.org id=B21329.144072560225033 (code B ref 21329); Fri, 28 Aug 2015 01:34:02 +0000 Original-Received: (at 21329) by debbugs.gnu.org; 28 Aug 2015 01:33:22 +0000 Original-Received: from localhost ([127.0.0.1]:40671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZV8Xh-0006Vh-M4 for submit@debbugs.gnu.org; Thu, 27 Aug 2015 21:33:21 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50801) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZV8Xe-0006VX-2Y for 21329@debbugs.gnu.org; Thu, 27 Aug 2015 21:33:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A5FgA731xV/5P+d0tcgxCEAoVVwD6CTQQCAoE8PBEBAQEBAQEBgQpBBYNdAQEDAVYjEAs0EhQYDSSINwjPIwEBAQEBBQEBAQEeizqFBQeELQEEnxeGaYsrghSBRSOBZlWBWSKCeAEBAQ X-IPAS-Result: A0A5FgA731xV/5P+d0tcgxCEAoVVwD6CTQQCAoE8PBEBAQEBAQEBgQpBBYNdAQEDAVYjEAs0EhQYDSSINwjPIwEBAQEBBQEBAQEeizqFBQeELQEEnxeGaYsrghSBRSOBZlWBWSKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="161634205" Original-Received: from 75-119-254-147.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([75.119.254.147]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Aug 2015 21:33:16 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 921EDAE0D6; Thu, 27 Aug 2015 21:33:16 -0400 (EDT) In-Reply-To: <83d1yag44r.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 26 Aug 2015 05:44:36 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:105896 Archived-At: >> > Would it work to loop until input-pending-p returns non-nil? >> Maybe that can be made to work, but it's likely to introduce >> other problems. > Which ones, for example? Not sure. I just know that we've already tried various different alternatives for this code. All the problems have been "corner cases", IIRC, and many of them were nasty enough to make us rewrite the function completely. One possible problem is that input-pending-p might return t in cases where the pending input is "not significant", in the sense that read-event won't return it (maybe because it will consume it internally as in the case of event bounds to special-event-map, IIRC). >> I was thinking more about refactoring read-event so as to provide a new >> `wait-for-event` which stops just before we actually consume the event. > How will it be different from what input-pending-p already does? It will be different in that it will wait until an event arrives. But yes, maybe the implementation of the two can be shared. Stefan PS: I suggest you try and install your suggested patch, in the mean time. I don't understand enough of its impact to judge its quality, but it's worth a try. Just make sure you add a good comment in the code explaining the problem this is trying to fix.