bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48254: 28.0.50; minibuffer does not show the prompt of a command on


From: Gregory Heytings
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



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 via email to

[Prev in Thread] Current Thread [Next in Thread]