GNU bug report logs - #23204
25.1.50; Strange behaviour of ‘read-char’

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Mark Karpov <markkarpov@HIDDEN>; dated Sun, 3 Apr 2016 09:36:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 23204 <at> debbugs.gnu.org:


Received: (at 23204) by debbugs.gnu.org; 12 Jun 2016 17:13:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 12 13:13:17 2016
Received: from localhost ([127.0.0.1]:38154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bC8wn-00078W-AI
	for submit <at> debbugs.gnu.org; Sun, 12 Jun 2016 13:13:17 -0400
Received: from mail-oi0-f54.google.com ([209.85.218.54]:35894)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1bC8wl-00078J-Nt
 for 23204 <at> debbugs.gnu.org; Sun, 12 Jun 2016 13:13:15 -0400
Received: by mail-oi0-f54.google.com with SMTP id p204so178271973oih.3
 for <23204 <at> debbugs.gnu.org>; Sun, 12 Jun 2016 10:13:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:from:date:message-id
 :subject:to:cc;
 bh=dTUBLhdHo5tuQYRpAFxs9fepQHxYwLh7UQRDtw4YFbw=;
 b=HXBPZOH3qVcFRCGh0GgnwnWmBQWjgVHMj+3x13VXPc9Y4q2P1ocYi1ahEQUKvFPr7O
 P0S++t6sSoGR+AsNJZert4Jg7+MwVQKFmCy/MrY0SBqCzFPjJcnH3u8h78TWBY0TpRtp
 JoQRb6zF9jO6wpn6zIjSa43hopHRQMbxcGCHETj3RgaZDpae7u4wbw5evzPoGqurC5i5
 8lvg1o3KCjmwtpV8cIbMmSZ3ciEVlsQkkPVQpXQGg3m0QDAVnKa+LpgL449eFxBBzJTJ
 EbTjJwK7IJl3c8deKu/USRf9Ipxt3nFSIVyUv6qGGXjUPYeOUtl+CW/j3CLVzITyFtJa
 i5pQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc;
 bh=dTUBLhdHo5tuQYRpAFxs9fepQHxYwLh7UQRDtw4YFbw=;
 b=jpkkg0MU/VOGaFid4AWuHDMBvxiAI7lzoCmhPJnmbAi7MqcZSk+5JafNTi6SeInfFq
 pkFhgstg1VeNv6Ox4IODPyPqht/Y6UpB3RRVmkw1SFfbpjtIOwhITQCUHyJI7MqM0efJ
 5qhfLTZNHyILzsyivQ9u63qk4EtjvbKd57jcEvO2islC9bYo34wCZNIyrChRmsvTeM8J
 P9HfVsE51tvjpBQJRXrY1FTr7y62lNK/goKA8iO3lV7+INMs8XhPbukuOJDqP4vKz8vF
 FgkN3FmBVfjld+T1+UZ92ezvzhC48g3reB6t5RTyymcx0wQPoAb2x+OhQG8uJo1sp54j
 /BJA==
X-Gm-Message-State: ALyK8tKayFHUvM7YMm2ANG+rrVvC+VU0MeBzVW+yoHKulHYm5EIwuduwB43fW2aTrXXRDqZaxM9ZcBKx61noLA==
X-Received: by 10.202.80.195 with SMTP id e186mr4648835oib.35.1465751590344;
 Sun, 12 Jun 2016 10:13:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.5.168 with HTTP; Sun, 12 Jun 2016 10:13:09 -0700 (PDT)
In-Reply-To: <8337oigwn9.fsf@HIDDEN>
References: <87wpofx9ry.fsf@HIDDEN>
 <CAM-tV-8KUmQMv2JZWnaxFY2zzyTUXQnHbVoTstAusXycCH9W8A@HIDDEN>
 <8337oigwn9.fsf@HIDDEN>
From: Noam Postavsky <npostavs@HIDDEN>
Date: Sun, 12 Jun 2016 13:13:09 -0400
X-Google-Sender-Auth: fe1eYNIxAX9O4X52crkEZzsiXNI
Message-ID: <CAM-tV-_pgVK+oJGJLpt90yx98L+Sd8dFeG6++h1sVnc-khWGCw@HIDDEN>
Subject: =?UTF-8?B?UmU6IGJ1ZyMyMzIwNDogMjUuMS41MDsgU3RyYW5nZSBiZWhhdmlvdXIgb2Yg4oCYcmVhZA==?=
 =?UTF-8?B?LWNoYXLigJk=?=
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 23204
Cc: Mark Karpov <markkarpov@HIDDEN>, 23204 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On Sun, Jun 12, 2016 at 1:11 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
> I think the problem is specifically with invoking such commands via
> menus, and the reason is that menu handling is inside the toolkit, out
> of Emacs control.

No, without the (message nil) I see the problem when binding to <f12> t y.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23204; Package emacs. Full text available.

Message received at 23204 <at> debbugs.gnu.org:


Received: (at 23204) by debbugs.gnu.org; 12 Jun 2016 17:10:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 12 13:10:51 2016
Received: from localhost ([127.0.0.1]:38140 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bC8uR-00073o-Il
	for submit <at> debbugs.gnu.org; Sun, 12 Jun 2016 13:10:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43665)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1bC8uP-00073a-8a
 for 23204 <at> debbugs.gnu.org; Sun, 12 Jun 2016 13:10:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1bC8uI-0005Si-Kk
 for 23204 <at> debbugs.gnu.org; Sun, 12 Jun 2016 13:10:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43654)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1bC8uB-0005RN-3x; Sun, 12 Jun 2016 13:10:35 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2799
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1bC8u9-0000V0-8C; Sun, 12 Jun 2016 13:10:33 -0400
Date: Sun, 12 Jun 2016 20:11:22 +0300
Message-Id: <8337oigwn9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
In-reply-to: <CAM-tV-8KUmQMv2JZWnaxFY2zzyTUXQnHbVoTstAusXycCH9W8A@HIDDEN>
 (message from Noam Postavsky on Sun, 12 Jun 2016 13:02:30 -0400)
Subject: Re: bug#23204: 25.1.50;
 Strange behaviour of =?utf-8?B?4oCYcmVhZC1jaGFy4oCZ?=
References: <87wpofx9ry.fsf@HIDDEN>
 <CAM-tV-8KUmQMv2JZWnaxFY2zzyTUXQnHbVoTstAusXycCH9W8A@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: 23204
Cc: markkarpov@HIDDEN, 23204 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.4 (------)

> From: Noam Postavsky <npostavs@HIDDEN>
> Date: Sun, 12 Jun 2016 13:02:30 -0400
> Cc: Mark Karpov <markkarpov@HIDDEN>
> 
> I also don't quite understand why this happens, but it seems that
> using (message nil) to clear the minibuffer also works:
> 
> (defun my-command ()
>   (interactive)
>   (message nil)
>   (while (read-char "My prompt…" t)))
> 
> (global-set-key (kbd "<f12> t y") #'my-command)
> 
> (I can't bind <menu> t y in emacs -Q, I get an error message telling
> me <menu> is not a prefix key)

I think the problem is specifically with invoking such commands via
menus, and the reason is that menu handling is inside the toolkit, out
of Emacs control.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23204; Package emacs. Full text available.
Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 23204 <at> debbugs.gnu.org:


Received: (at 23204) by debbugs.gnu.org; 12 Jun 2016 17:02:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 12 13:02:37 2016
Received: from localhost ([127.0.0.1]:38129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bC8mT-0006op-Fw
	for submit <at> debbugs.gnu.org; Sun, 12 Jun 2016 13:02:37 -0400
Received: from mail-oi0-f51.google.com ([209.85.218.51]:36720)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1bC8mS-0006ob-1E
 for 23204 <at> debbugs.gnu.org; Sun, 12 Jun 2016 13:02:36 -0400
Received: by mail-oi0-f51.google.com with SMTP id p204so178066632oih.3
 for <23204 <at> debbugs.gnu.org>; Sun, 12 Jun 2016 10:02:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:from:date:message-id:subject:to:cc
 :content-transfer-encoding;
 bh=aoYb3rz3fox80m1Gy9x2jJcgzTxo+Ul2HKEuyLYtxO8=;
 b=r27hJgr7rhLjT0VjrSonTk/CEPXfGrVcX8mkzb7hpWumH9xRJV1njcVe9Ffmg5zUd7
 p7ayx+U++sz1db1PPNKs7L6oFfcEkdalMQdtZs/jcm4FwgU0xhqWl+FPQdUkGsKaz5Iz
 8Nfy0YYqJcKuNHf2SI5E8KwWo3QOVx05h+S1cngCg2tPoPe8wZTtdAqcNCVUh93FBmYs
 Wh0TxHXglA6diMipIEdv7XFAaRhF7/62W3qe3f5uEe/Cs6qSj9BHlLGKt5GwZwOr2rcw
 wpYgWGYInpe6Y6XFbXxQUhyCf3Qz1BACpDNOa2V9GIMxAoCP7Us5gJWDwOJvQx8FeH/r
 yZzA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:from:date:message-id:subject
 :to:cc:content-transfer-encoding;
 bh=aoYb3rz3fox80m1Gy9x2jJcgzTxo+Ul2HKEuyLYtxO8=;
 b=UixL8LzlQemZRYllTz++L3hQr3XKPnlyxZHDVv+SR6OvKY3W1WpgmhLUVZMeCi9HCI
 23ZWxGP37YN65Uzwxu9fBmtb75tfLPReYQnXgZaYwvIpk+p0MQhHEdVPnok3sRDgUiFV
 TeunCxkEwsZD5TzNdC46yB472y9ftykOgN8Eo4cBr7flFMqpUKBdsQmTvVBiVtlWaVSD
 7SwU6FLMIjERcCykjBuUZr6L5qNjfIdFr2VOsVy4nggBEE1stM/Na8Y/ukLlyVMgcI6L
 6h/+A73fAdmBb8zqR4EUWunHeKYzk+cDyP+1dJ0icqrbpFwLttLwzjA4FE3xp0rtCFNV
 fVsg==
X-Gm-Message-State: ALyK8tJVYmkrmCbkz7KZwfs8hTH1EoyUXBa2As06Q9Jo1MtXPqsbjXuc5p2fqhEC9/GI8xc5zNgoD24aitHIbQ==
X-Received: by 10.157.29.10 with SMTP id m10mr5942993otm.196.1465750950565;
 Sun, 12 Jun 2016 10:02:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.5.168 with HTTP; Sun, 12 Jun 2016 10:02:30 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
Date: Sun, 12 Jun 2016 13:02:30 -0400
X-Google-Sender-Auth: pP9FSRlpoz05Q_4nrARemCrJpoA
Message-ID: <CAM-tV-8KUmQMv2JZWnaxFY2zzyTUXQnHbVoTstAusXycCH9W8A@HIDDEN>
Subject: =?UTF-8?B?UmU6IGJ1ZyMyMzIwNDogMjUuMS41MDsgU3RyYW5nZSBiZWhhdmlvdXIgb2Yg4oCYcmVhZA==?=
 =?UTF-8?B?LWNoYXLigJk=?=
To: 23204 <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 23204
Cc: Mark Karpov <markkarpov@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

severity 23204 minor
quit

I also don't quite understand why this happens, but it seems that
using (message nil) to clear the minibuffer also works:

(defun my-command ()
  (interactive)
  (message nil)
  (while (read-char "My prompt=E2=80=A6" t)))

(global-set-key (kbd "<f12> t y") #'my-command)

(I can't bind <menu> t y in emacs -Q, I get an error message telling
me <menu> is not a prefix key)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23204; Package emacs. Full text available.

Message received at 23204 <at> debbugs.gnu.org:


Received: (at 23204) by debbugs.gnu.org; 3 Apr 2016 15:36:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 03 11:36:28 2016
Received: from localhost ([127.0.0.1]:50103 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1amk4i-0007sr-5x
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2016 11:36:28 -0400
Received: from smtp2.openmailbox.org ([62.4.1.36]:39889)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <markkarpov@HIDDEN>) id 1amk4h-0007sk-2l
 for 23204 <at> debbugs.gnu.org; Sun, 03 Apr 2016 11:36:27 -0400
Received: by mail2.openmailbox.org (Postfix, from userid 1004)
 id 609FE2ACB99F; Sun,  3 Apr 2016 17:36:26 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org;
 s=openmailbox; t=1459697786;
 bh=oxDHTDltDwmd5XHRa7SflyHBeoZXvqKTmdQOu6MbZE8=;
 h=From:To:Cc:Subject:Date:From;
 b=lj/tjmHATipBw1ghuAwOWxxSTdYqokz3oR9pC0zKsflP55s+Bgfuy6md6qcK+q3UF
 SgfGD+RmDDggUb36iDK2WYdpQ8IzfzEs2AEcjFY4TMqbobwpEjzxio83qATdI4NkcR
 ov4fDwx33DYgWV/jmYB2HxKRlreh2I6bY004zp8Q=
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on openmailbox-b2
X-Spam-Level: 
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,NO_RECEIVED,NO_RELAYS autolearn=no
 autolearn_force=no version=3.4.0
User-agent: mu4e 0.9.16; emacs 25.1.50.9
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org;
 s=openmailbox; t=1459697785;
 bh=oxDHTDltDwmd5XHRa7SflyHBeoZXvqKTmdQOu6MbZE8=;
 h=From:To:Cc:Subject:Date:From;
 b=ewLUFlEAedDhptjIbgoOgAWAkFmoK6iLxdEbeMkZaKe9cCBbhRozXoCMpJzUPnCRi
 t57a0Q0ZGvOi1ltBXWHrB2cThsThqVY7JTGdPyRt7axzXuKUIkJDdhtKJBKKacVR1l
 JhDnyvJkBRL9BN+YH+8dlYFoUfFiL2EGWM2pklEE=
From: Mark Karpov <markkarpov@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#23204: 25.1.50; Strange behaviour of =?utf-8?B?4oCYcmVh?=
 =?utf-8?B?ZC1jaGFy4oCZ?=
Message-ID: <878u0uslcs.fsf@HIDDEN>
Date: Sun, 03 Apr 2016 22:33:45 +0600
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.0 (-)
X-Debbugs-Envelope-To: 23204
Cc: 23204 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This works, but I do not see how it explains this behavior. IMO, the
prompt should appear no matter how the command is invoked, because that
prompt is part of that command's functioning.

Eli Zaretskii writes:

> What if you do this instead:
>
>   (global-set-key (kbd "<f8>") #'my-command)
>
> Does this work as expected?  If so, does that explain what happens in
> your original example?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23204; Package emacs. Full text available.

Message received at 23204 <at> debbugs.gnu.org:


Received: (at 23204) by debbugs.gnu.org; 3 Apr 2016 14:57:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 03 10:57:18 2016
Received: from localhost ([127.0.0.1]:50087 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1amjSo-0006xK-Eg
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2016 10:57:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:45179)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1amjSm-0006x8-ND
 for 23204 <at> debbugs.gnu.org; Sun, 03 Apr 2016 10:57:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1amjSd-00013l-O3
 for 23204 <at> debbugs.gnu.org; Sun, 03 Apr 2016 10:57:11 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54683)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1amjSd-00013h-KQ; Sun, 03 Apr 2016 10:57:07 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3078
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1amjSc-0007B9-LJ; Sun, 03 Apr 2016 10:57:07 -0400
Date: Sun, 03 Apr 2016 17:56:39 +0300
Message-Id: <83bn5qrba0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mark Karpov <markkarpov@HIDDEN>
In-reply-to: <87wpofx9ry.fsf@HIDDEN> (message from Mark Karpov on
 Sun, 03 Apr 2016 16:32:33 +0600)
Subject: Re: bug#23204: 25.1.50;
 Strange behaviour of =?utf-8?B?4oCYcmVhZC1jaGFy4oCZ?=
References: <87wpofx9ry.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.0 (------)
X-Debbugs-Envelope-To: 23204
Cc: 23204 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> From: Mark Karpov <markkarpov@HIDDEN>
> Date: Sun, 03 Apr 2016 16:32:33 +0600
> 
>   (defun my-command ()
>     (interactive)
>     (while (read-char "My prompt…" t)))
> 
> Now if you call this from lisp or like this: ‘M-x my-command RET’,
> everything is fine: you see the prompt and you can type some chars
> (press ‘C-g’ to get out of this).
> 
> But if you bind the command to key sequence, like this:
> 
>   (global-set-key (kbd "<menu> t y") #'my-command)
> 
> Then you have a nasty problem when you actually call it. Try to call it
> and then type some characters — you will see no prompt and they will
> accumulate in echo area indefinitely:
> 
>   menu t y h e r e SPC I SPC t y p e SPC t h i n g s SPC a n d SPC i t
>   SPC i s SPC g e t t i n g SPC r a t h e r SPC l o n g

What if you do this instead:

  (global-set-key (kbd "<f8>") #'my-command)

Does this work as expected?  If so, does that explain what happens in
your original example?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23204; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Apr 2016 09:35:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 03 05:35:47 2016
Received: from localhost ([127.0.0.1]:49432 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ameRe-0005zA-LL
	for submit <at> debbugs.gnu.org; Sun, 03 Apr 2016 05:35:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60078)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <markkarpov@HIDDEN>) id 1ameRc-0005yv-KD
 for submit <at> debbugs.gnu.org; Sun, 03 Apr 2016 05:35:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <markkarpov@HIDDEN>) id 1ameRW-0000NP-7I
 for submit <at> debbugs.gnu.org; Sun, 03 Apr 2016 05:35:39 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:44101)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <markkarpov@HIDDEN>) id 1ameRW-0000NL-3c
 for submit <at> debbugs.gnu.org; Sun, 03 Apr 2016 05:35:38 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51046)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <markkarpov@HIDDEN>) id 1ameRU-0000vZ-Cf
 for bug-gnu-emacs@HIDDEN; Sun, 03 Apr 2016 05:35:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <markkarpov@HIDDEN>) id 1ameRR-0000N3-0D
 for bug-gnu-emacs@HIDDEN; Sun, 03 Apr 2016 05:35:36 -0400
Received: from smtp7.openmailbox.org ([62.4.1.41]:41462)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <markkarpov@HIDDEN>) id 1ameRQ-0000M6-GH
 for bug-gnu-emacs@HIDDEN; Sun, 03 Apr 2016 05:35:32 -0400
Received: by mail2.openmailbox.org (Postfix, from userid 1004)
 id 6F5862ACB679; Sun,  3 Apr 2016 11:35:31 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org;
 s=openmailbox; t=1459676131;
 bh=DAenQxgd34sNdyQsQgypfCKdUuRg+il28Eko7gAz2XU=;
 h=From:To:Subject:Date:From;
 b=OJTVxMki0hVqJoRmyiaBQz974F6uCFi5spcljrDqpqvOVCeqjXkBcAi5c30WvI86S
 zfR9E+RwTak72eIAMO19zouwu86gSfSRZyr+LrTYBVnBBr/20TjH5o4bfd+PidoRTn
 vG0fLbrXO4VBHFyxNkiZGizV85o526U6am9OqqQo=
From: Mark Karpov <markkarpov@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org;
 s=openmailbox; t=1459676120;
 bh=DAenQxgd34sNdyQsQgypfCKdUuRg+il28Eko7gAz2XU=;
 h=From:To:Subject:Date:From;
 b=NX0QZlNEHwckE30A4hrREMgEFTCtz/uDlIFpT+Kv5AL/wtIkMxEX4lZO7X6gOZRv+
 rgmvcqadKW9BNGiRwqo44SgFaL5zhP9onS1oowgoOehvmpf+sbVFwnMpn1qvmQNx3g
 hK6j2+BQyG0nzMJy6d4JmG/rB5BJgr4YqHn82/U0=
To: bug-gnu-emacs@HIDDEN
Subject: 25.1.50; Strange behaviour of =?utf-8?B?4oCYcmVhZC1jaGFy4oCZ?=
Date: Sun, 03 Apr 2016 16:32:33 +0600
Message-ID: <87wpofx9ry.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)


I'm not sure if it's sort of feature (rather undocumented) or a bug.
Let's say I have a command that uses =E2=80=98read-char=E2=80=99 repeatedly=
, and it's
given a custom prompt as the first argument, like this:

  (defun my-command ()
    (interactive)
    (while (read-char "My prompt=E2=80=A6" t)))

Now if you call this from lisp or like this: =E2=80=98M-x my-command RET=E2=
=80=99,
everything is fine: you see the prompt and you can type some chars
(press =E2=80=98C-g=E2=80=99 to get out of this).

But if you bind the command to key sequence, like this:

  (global-set-key (kbd "<menu> t y") #'my-command)

Then you have a nasty problem when you actually call it. Try to call it
and then type some characters =E2=80=94 you will see no prompt and they will
accumulate in echo area indefinitely:

  menu t y h e r e SPC I SPC t y p e SPC t h i n g s SPC a n d SPC i t
  SPC i s SPC g e t t i n g SPC r a t h e r SPC l o n g

Does this work as intended? I would like to continue using =E2=80=98read-ch=
ar=E2=80=99,
is there a way to just display my prompt in this case as well?



In GNU Emacs 25.1.50.9 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-03-24 built on arch
Repository revision: 39577d07124ee16895b9c6aab7e2c6e7d41cc715
Windowing system distributor 'The X.Org Foundation', version 11.0.11802000
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: H

Minor modes in effect:
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  vimish-fold-global-mode: t
  vimish-fold-mode: t
  show-paren-mode: t
  rich-minority-mode: t
  minibuffer-electric-default-mode: t
  ivy-mode: t
  global-auto-revert-mode: t
  display-time-mode: t
  delete-selection-mode: t
  cyphejor-mode: t
  ace-popup-menu-mode: t
  smartparens-global-mode: t
  flyspell-lazy-mode: t
  mk-highlight-line-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-fill-mode: 1

Recent messages:
Wrote /home/mark/.emacs.d/.git/COMMIT_EDITMSG
Git finished [2 times]
<menu> t y is undefined
typit-advanced-test
Quit
Would you like to play again? (y or n) n
Quit
Type "q" in help window to restore its previous buffer.
Modalka mode enabled in current buffer
Modalka mode disabled in current buffer

Load-path shadows:
/home/mark/.emacs.d/elpa/seq-2.15/seq hides /usr/local/share/emacs/25.1.50/=
lisp/emacs-lisp/seq

Features:
(shadow mail-extr emacsbug sendmail eieio-opt speedbar sb-image ezimage
dframe sort cal-move parse-time map diary-lib diary-loaddefs cal-iso
org-element org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view jka-compr org-bibtex bibtex org-bbdb org-w3m org-agenda org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs cal-menu calendar cal-loaddefs zzz-to-char char-menu
dired-aux compile em-unix em-term term disp-table ehelp em-script
em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic
em-banner em-alias esh-var esh-io esh-cmd esh-opt esh-ext esh-proc
esh-arg esh-groups eshell esh-module esh-mode vc vc-dispatcher
markdown-mode noutline outline linum magit-blame magit-stash
magit-bisect magit-remote magit-commit magit-sequence magit magit-apply
magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert
magit-process magit-popup magit-mode magit-git crm magit-section
magit-utils git-commit help-fns log-edit message rfc822 mml mml-sec epa
derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor
async-bytecomp async tramp-sh tramp tramp-compat tramp-loaddefs trampver
shell pcomplete comint ansi-color format-spec image-mode ace-window
hl-line dired dired-loaddefs vc-git diff-mode bookmark pp typit mmt
colir color counsel esh-util etags swiper aggressive-indent easy-mmode
rainbow-delimiters whitespace hl-todo flycheck-haskell haskell-cabal
haskell-utils flycheck-color-mode-line face-remap mk-visual
smart-mode-line solarized-dark-theme solarized mk-texinfo mk-tex
mk-shakespeare mk-prolog mk-org mk-markdown mk-man mk-magit mk-lisp
mk-js mk-ibuffer mk-html mk-gnus mk-eshell mk-erc mk-elisp mk-dired
mk-clojure kill-or-bury-alive mk-calendar mk-c mk-minor-modes
common-lisp-snippets yasnippet whole-line-or-region vimish-fold paren
rich-minority minibuf-eldef ivy ffap autorevert filenotify time delsel
cyphejor ace-popup-menu smartparens-config smartparens thingatpt
flyspell ispell flyspell-lazy cl mk-highlight-line mk-global modalka
edmacro kmacro fix-input quail ace-link xref project mk-python
mk-haskell mk-utils avy-menu avy ring flycheck find-func rx subr-x seq
seq-25 misc server f dash s ucs-normalize finder-inf tex-site fix-word
advice slime-autoloads info package epg-config url-handlers url-parse
auth-source cl-seq eieio byte-opt bytecomp byte-compile cl-extra
help-mode easymenu cconv eieio-core cl-macs gv eieio-loaddefs
cl-loaddefs pcase cl-lib password-cache url-vars time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 554151 56418)
 (symbols 48 48648 0)
 (miscs 40 441 1766)
 (strings 32 115109 20051)
 (string-bytes 1 3514812)
 (vectors 16 79022)
 (vector-slots 8 1938762 165104)
 (floats 8 787 1950)
 (intervals 56 4215 460)
 (buffers 976 70)
 (heap 1024 62381 4356))




Acknowledgement sent to Mark Karpov <markkarpov@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#23204; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jun 2016 17:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.