unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: rms@gnu.org, 23129@debbugs.gnu.org
Subject: bug#23129: 25.1.50; Prefix key is not echoed during minibuffer completion
Date: Mon, 28 Mar 2016 19:16:33 +0300	[thread overview]
Message-ID: <83io06y3vi.fsf@gnu.org> (raw)
In-Reply-To: <5a83c42d-50c1-4217-b1dd-506814a7ed34@default> (message from Drew Adams on Mon, 28 Mar 2016 09:00:35 -0700 (PDT))

> Date: Mon, 28 Mar 2016 09:00:35 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 23129@debbugs.gnu.org
> 
> > Does the following simple recipe exhibit the same behavior?
> > (If not, please tell why not.)
> > 
> >   emacs -Q
> >   C-x C-f C-x
> > 
> > "C-x C-f" causes the prompt showing the current directory; typing
> > "C-x" afterwards has no visible effect, whereas you expect it to echo
> > the usual "C-x-".  Right?
> 
> Is `C-x' a prefix key in `minibuffer-local-filename-completion-map'
> at that point?

What's the significance of minibuffer-local-filename-completion-map
for the purposes of this issue?

> > How do you mean "should"?
> 
> How do I mean "should"?  Should.  It is helpful for a user
> (as well as consistent) to echo the prefix keys s?he hits.

There's also "should" as in "it did this yesterday or the last year".

> > AFAICT, this is a deliberate feature:
> 
> Do you have evidence for that?

I've read the code.  It does this explicitly and purposefully, there's
no mistake about that.

> Yes, I know the bug is longstanding.  And as long as we're
> guessing, I guess it is an oversight.

We are not guessing, see below.  The function echo_now is the one that
echoes the prefix keys; look at the conditions (and the commentary,
for that matter).

I hope Richard will be able to shed some light on this.  The code is
very old, it was present in the initial commit in Jan 1992:


  /* If in middle of key sequence and minibuffer not active,
                                      ^^^^^^^^^^^^^^^^^^^^^
     start echoing if enough time elapses.  */

  if (minibuf_level == 0   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      && !end_time
      && !current_kboard->immediate_echo
      && (this_command_key_count > 0
	  || !NILP (call0 (Qinternal_echo_keystrokes_prefix)))
      && ! noninteractive
      && echo_keystrokes_p ()
      && (/* No message.  */
	  NILP (echo_area_buffer[0])
	  /* Or empty message.  */
	  || (BUF_BEG (XBUFFER (echo_area_buffer[0]))
	      == BUF_Z (XBUFFER (echo_area_buffer[0])))
	  /* Or already echoing from same kboard.  */
	  || (echo_kboard && ok_to_echo_at_next_pause == echo_kboard)
	  /* Or not echoing before and echoing allowed.  */
	  || (!echo_kboard && ok_to_echo_at_next_pause)))
    {
      /* After a mouse event, start echoing right away.
	 This is because we are probably about to display a menu,
	 and we don't want to delay before doing so.  */
      if (EVENT_HAS_PARAMETERS (prev_event))
	echo_now ();
      else
	{
	  Lisp_Object tem0;

	  save_getcjmp (save_jump);
	  restore_getcjmp (local_getcjmp);
	  tem0 = sit_for (Vecho_keystrokes, 1, 1);
	  restore_getcjmp (save_jump);
	  if (EQ (tem0, Qt)
	      && ! CONSP (Vunread_command_events))
	    echo_now ();
	}
    }





  reply	other threads:[~2016-03-28 16:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<e28dfa52-d2e2-40ae-80e2-112b30cdad25@default>
     [not found] ` <<83shzay6fd.fsf@gnu.org>
2016-03-28 16:00   ` bug#23129: 25.1.50; Prefix key is not echoed during minibuffer completion Drew Adams
2016-03-28 16:16     ` Eli Zaretskii [this message]
2022-01-24 11:07       ` Lars Ingebrigtsen
     [not found] <<<e28dfa52-d2e2-40ae-80e2-112b30cdad25@default>
     [not found] ` <<<83shzay6fd.fsf@gnu.org>
     [not found]   ` <<5a83c42d-50c1-4217-b1dd-506814a7ed34@default>
     [not found]     ` <<83io06y3vi.fsf@gnu.org>
2016-03-28 17:32       ` Drew Adams
2016-04-08 15:56         ` Drew Adams
2016-04-08 16:03           ` Eli Zaretskii
2016-03-27 22:34 Drew Adams
2016-03-28 15:21 ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83io06y3vi.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23129@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=rms@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).