unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gregory Heytings <gregory@heytings.org>
To: max.brieiev@gmail.com
Cc: 48254@debbugs.gnu.org
Subject: bug#48254: 28.0.50; minibuffer does not show the prompt of a command on first invocation
Date: Tue, 11 May 2021 09:35:34 +0000	[thread overview]
Message-ID: <a8104bf9de7cd2785d31@heytings.org> (raw)
In-Reply-To: <87wns51vi5.fsf@gmail.com>


>
> My preference here would be to enter text (longer than a single key 
> press) with dvorak, but to answer one-key-press prompts with dvorak 
> disabled.
>
> But no matter what my preference is, things should remain consistent. As 
> you see from previous message, confirmation prompt after 'C-x C-c' 
> (seems to be `map-y-or-n-p`) must be completed with qwerty, but regular 
> `y-or-n-p` prompts must be completed with dvorak. Is this expected?
>

As far as I understand, input methods were not designed to do what you 
want to do, so while this is not what you expect, it's how things work. 
And indeed, C-x C-c is save-buffers-kill-emacs, which calls 
save-some-buffers, which uses map-y-or-n-p.

>> (defun enable-english-dvorak ()
>>   (if (memq this-command '(find-file execute-extended-command switch-to-buffer))
>>       (set-input-method "english-dvorak")))
>> (add-hook 'minibuffer-setup-hook #'enable-english-dvorak)
>
> Thanks. For me this should probably be something like this:
>
> (defun enable-english-dvorak ()
>  (if (or (not (memq this-command '(y-or-n-p map-y-or-n-p)))
>          (and read-answer-short (equal this-command 'read-answer)))
>      (set-input-method "english-dvorak")))
> (add-hook 'minibuffer-setup-hook #'enable-english-dvorak)
>

Indeed, it is possible (and perhaps easier for your use case) to reverse 
the logic.  I'd guess that you'll find other commands to add to that list 
as time goes.

>
> Thanks again for taking your time to answer my concerns.
>

You're welcome!  Do you have other questions, or can this bug report be 
closed?





  reply	other threads:[~2021-05-11  9:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 13:47 bug#48254: 28.0.50; minibuffer does not show the prompt of a command on first invocation max.brieiev
2021-05-06 19:23 ` Gregory Heytings
2021-05-07 14:45   ` max.brieiev
2021-05-07 15:28     ` Gregory Heytings
2021-05-08  8:26       ` max.brieiev
2021-05-09 22:37         ` Gregory Heytings
2021-05-11  9:15           ` max.brieiev
2021-05-11  9:35             ` Gregory Heytings [this message]
2021-05-11  9:47               ` max.brieiev
2021-05-11 11:01                 ` Gregory Heytings
2021-05-11  9:40             ` max.brieiev
2021-05-11 17:47             ` Juri Linkov

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=a8104bf9de7cd2785d31@heytings.org \
    --to=gregory@heytings.org \
    --cc=48254@debbugs.gnu.org \
    --cc=max.brieiev@gmail.com \
    /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).