From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Karpov Newsgroups: gmane.emacs.bugs Subject: bug#23204: 25.1.50; Strange behaviour of =?UTF-8?Q?=E2=80=98read-char=E2=80=99?= Date: Sun, 03 Apr 2016 16:32:33 +0600 Message-ID: <87wpofx9ry.fsf@openmailbox.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1459676186 29434 80.91.229.3 (3 Apr 2016 09:36:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Apr 2016 09:36:26 +0000 (UTC) To: 23204@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 03 11:36:11 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 1ameS2-0002ln-P9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Apr 2016 11:36:11 +0200 Original-Received: from localhost ([::1]:52662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ameS1-0000xV-S0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Apr 2016 05:36:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ameRx-0000xD-N4 for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 05:36:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ameRu-0000Py-DS for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 05:36:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ameRu-0000Pu-9R for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 05:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ameRu-0005zi-2q for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 05:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark Karpov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Apr 2016 09:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23204 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145967614723016 (code B ref -1); Sun, 03 Apr 2016 09:36:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Apr 2016 09:35:47 +0000 Original-Received: from localhost ([127.0.0.1]:49432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ameRe-0005zA-LL for submit@debbugs.gnu.org; Sun, 03 Apr 2016 05:35:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ameRc-0005yv-KD for submit@debbugs.gnu.org; Sun, 03 Apr 2016 05:35:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ameRW-0000NP-7I for submit@debbugs.gnu.org; Sun, 03 Apr 2016 05:35:39 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ameRW-0000NL-3c for submit@debbugs.gnu.org; Sun, 03 Apr 2016 05:35:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ameRU-0000vZ-Cf for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 05:35:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ameRR-0000N3-0D for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 05:35:36 -0400 Original-Received: from smtp7.openmailbox.org ([62.4.1.41]:41462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ameRQ-0000M6-GH for bug-gnu-emacs@gnu.org; Sun, 03 Apr 2016 05:35:32 -0400 Original-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= 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= 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-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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115918 Archived-At: 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 " 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] 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))