From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#3938: bug#5923: 23.1.95; minibuffer-message discards input events Date: Wed, 06 Jul 2016 17:25:03 +0300 Message-ID: <838txeoncw.fsf@gnu.org> References: <6ED90800C89F408BB0C3F86660BB4C10@us.oracle.com> <7C90907943E64115BA7CFABFB144BD24@us.oracle.com> <497D764814894831A571BD283D21B9DA@us.oracle.com> <45AB7455D0FD4FCC9ED735A11D8CCEF0@us.oracle.com> <0CFCF01B9DFA4AEF9648A708DF097A91@us.oracle.com> <87shvod8zn.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1467815184 6205 80.91.229.3 (6 Jul 2016 14:26:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2016 14:26:24 +0000 (UTC) Cc: npostavs@users.sourceforge.net, 5923@debbugs.gnu.org, 3938@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 06 16:26:14 2016 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 1bKnmH-0005Lz-Ia for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2016 16:26:13 +0200 Original-Received: from localhost ([::1]:33807 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKnmG-0007QL-Rt for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2016 10:26:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKnm7-0007DP-M0 for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 10:26:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKnm6-0001Ti-G8 for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 10:26:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKnm6-0001TZ-DN for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 10:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bKnm6-0000TR-4F for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2016 10:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2016 14:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3938 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 3938-submit@debbugs.gnu.org id=B3938.14678151411778 (code B ref 3938); Wed, 06 Jul 2016 14:26:02 +0000 Original-Received: (at 3938) by debbugs.gnu.org; 6 Jul 2016 14:25:41 +0000 Original-Received: from localhost ([127.0.0.1]:39614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKnlh-0000SY-SP for submit@debbugs.gnu.org; Wed, 06 Jul 2016 10:25:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bKnlc-0000SI-PQ for 3938@debbugs.gnu.org; Wed, 06 Jul 2016 10:25:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKnlU-0001GK-F4 for 3938@debbugs.gnu.org; Wed, 06 Jul 2016 10:25:27 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKnlU-0001Et-B1; Wed, 06 Jul 2016 10:25:24 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4359 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bKnlO-0006n0-34; Wed, 06 Jul 2016 10:25:19 -0400 In-reply-to: (message from Drew Adams on Tue, 5 Jul 2016 14:19:28 +0000 (UTC)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:120488 Archived-At: --=-=-= Content-Type: text/plain > Date: Tue, 5 Jul 2016 14:19:28 +0000 (UTC) > From: Drew Adams > Cc: 5923@debbugs.gnu.org, 3938@debbugs.gnu.org > > > >> Actually, the problem is here in `sit-for': > > >> > > >> (let ((read (read-event nil nil seconds))) > > >> (or (null read) > > >> (progn > > >> (if (eq overriding-terminal-local-map > > >> universal-argument-map) > > >> (setq read (cons t read))) > > >> (push read unread-command-events) > > >> nil)))))) > > >> > > >> Since the value of `overriding-terminal-local-map' is not > > >> `universal-argument-map' in my case, it fails to treat any > > >> input received properly. > > > > > > However, something else must be going on also, because the sit-for code is > > > identical for Emacs 22, and I don't see the bug in Emacs 22. > > > > Is this bug fixed? The special casing of this in `sit-for' has been > > removed meanwhile, but also the overriding-map-is-bound and > > universal-argument-other-key have been removed, so it's hard to run the > > code examples in current (version 25) Emacs. > > I don't know if it is fixed, and I don't have the time to dig into > this again. (What you quoted was by no means the last part of this > bug thread, BTW.) I would _not_ assume that this bug has been fixed. > I think someone would need to dig into this, to debug it. One could hope for a more cooperative response, I think. It took me all of 5 minutes, without knowing anything about icicles and very little about the new implementation of universal-argument, to convert your test file to the current sources (see the attached). With it, I convinced myself that the bug is indeed fixed: typing the first 's' interrupts the wait immediately, and displays "ssss" in the echo area. Please verify that my changes to the test file are valid and the bug is indeed fixed. Thanks. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=bug-5923-emacs-25.el Content-Transfer-Encoding: quoted-printable (defvar icicle-universal-argument-map (let ((map (make-sparse-keymap)) (universal-argument-minus ;; For backward compatibility, minus with no modifiers is an ordin= ary ;; command if digits have already been entered. `(menu-item "" negative-argument :filter ,(lambda (cmd) (if (integerp prefix-arg) nil cmd))))) (define-key map [switch-frame] (lambda (e) (interactive "e") (handle-switch-frame e) (icicle-universal-argument--mode))) (define-key map [?\C-u] 'icicle-universal-argument-more) (define-key map [?-] universal-argument-minus) (define-key map [?0] 'icicle-digit-argument) (define-key map [?1] 'icicle-digit-argument) (define-key map [?2] 'icicle-digit-argument) (define-key map [?3] 'icicle-digit-argument) (define-key map [?4] 'icicle-digit-argument) (define-key map [?5] 'icicle-digit-argument) (define-key map [?6] 'icicle-digit-argument) (define-key map [?7] 'icicle-digit-argument) (define-key map [?8] 'icicle-digit-argument) (define-key map [?9] 'icicle-digit-argument) (define-key map [kp-0] 'icicle-digit-argument) (define-key map [kp-1] 'icicle-digit-argument) (define-key map [kp-2] 'icicle-digit-argument) (define-key map [kp-3] 'icicle-digit-argument) (define-key map [kp-4] 'icicle-digit-argument) (define-key map [kp-5] 'icicle-digit-argument) (define-key map [kp-6] 'icicle-digit-argument) (define-key map [kp-7] 'icicle-digit-argument) (define-key map [kp-8] 'icicle-digit-argument) (define-key map [kp-9] 'icicle-digit-argument) (define-key map [kp-subtract] universal-argument-minus) map) "...") (defun icicle-universal-argument--mode () (prefix-command-update) (set-transient-map icicle-universal-argument-map nil)) (defun icicle-universal-argument () (interactive) (prefix-command-preserve-state) (setq prefix-arg (list 4)) (icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg) (icicle-universal-argument--mode)) (defun icicle-digit-argument (arg) (interactive "P") (digit-argument) (icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg)) (defun icicle-negative-argument (arg) (interactive "P") (negative-argument arg) (icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg)) (defun icicle-universal-argument-more (arg) (interactive "P") (universal-argument-more arg) (icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg)) (defun icicle-universal-argument-minus (arg) (interactive "P") (universal-argument-minus arg) (icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg)) (defun icicle-msg-maybe-in-minibuffer (format-string &rest args) (apply #'message format-string args) (sit-for 1)) (define-key minibuffer-local-completion-map [remap universal-argument] 'icicle-universal-argument) (define-key minibuffer-local-completion-map [remap negative-argument] 'icicle-negative-argument) (define-key minibuffer-local-completion-map [remap digit-argument] 'icicle-digit-argument) --=-=-=--