all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Setting input method automatically whenever text is to be entered.
Date: Fri, 23 Apr 2021 18:21:09 +0300	[thread overview]
Message-ID: <87fszh81sq.fsf@gmail.com> (raw)
In-Reply-To: <87pmypuh4i.fsf@gmail.com> (max brieiev's message of "Tue, 20 Apr 2021 18:10:05 +0300")

max.brieiev@gmail.com (2021-04-20 18:10 +0300) wrote:

> Hi

Hello!

> I am quite new Emacs user. I prefer to type text using Dvorak
> layout. Each time I visit new buffer or interact with minibuffer I have
> to press C-\, which is rather inconvenient. So I added the following to
> my .emacs file:
>
> (defun set-dvp-input-method (mode-hook)
>   (add-hook mode-hook
>             (lambda ()
>               (if (not (string= current-input-method "programmer-dvorak"))
>                   (set-input-method "programmer-dvorak")))))
>
> (mapc #'set-dvp-input-method
>       '(text-mode-hook
>         prog-mode-hook
>         special-mode-hook
>         minibuffer-setup-hook
>         comint-mode-hook
>         dired-mode
>         info-mode-hook
>         term-mode-hook
>         Custom-mode-hook))
[...]
> There are also some more annoyances. In some minibuffer yes-no prompts I
> have to press keys as they are located on qwerty layout, however in the
> other seemingly same prompts the key needs to be pressed as on
> Dvorak. Is there some way to fix this?

You can use `after-change-major-mode-hook' instead of specifying all
those mode-hooks manually.

BTW, I also use Dvorak ;-)

-- 
Alex



  parent reply	other threads:[~2021-04-23 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 15:10 Setting input method automatically whenever text is to be entered max.brieiev
2021-04-20 15:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-20 15:39   ` max.brieiev
2021-04-23 15:21 ` Alex Kost [this message]
2021-04-27 14:22   ` max.brieiev
2021-05-07 14:20     ` Alex Kost

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

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

  git send-email \
    --in-reply-to=87fszh81sq.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.