emacs-devel
[Top][All Lists]
Advanced

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

Re: [NonGNU ELPA] New package: devil


From: Susam Pal
Subject: Re: [NonGNU ELPA] New package: devil
Date: Thu, 11 May 2023 11:31:35 +0100

On Thu, 11 May 2023 at 11:09, Susam Pal <susam.pal@gmail.com> wrote:
>
> Ruijie Yu <ruijie@netyu.xyz> wrote:
> >
> >
> > Susam Pal <susam.pal@gmail.com> writes:
> >
> > >> > "Minor mode for reading and translating key sequences."
> > >>                   ^
> > >>                   is this redundant?  hard to translate without reading.
> > >>
> > >> That sounds very generic, is the package capable of doing that for any
> > >> kind of key translation.
> > >
> > > Thanks for the feedback. In that case,
> > >
> > > "Minor mode for translating key sequences."
> >
> > Can your package translate more than just modifier keys like control or
> > meta?  Like translate key sequence "j k" into something else?
> >
> > If the answer is no, then maybe you should clarify that in the
> > description.
>
> Yes, this is possible. Although the defaults cater to how I and some
> other users use this package, i.e., converting comma-prefixed key
> sequences with modifier-based key sequences, the key sequence
> translation logic does not make any assumption about modifier keys.
>
> For example, one could configure the following key translations:
>
> (setq devil-key "j")
> (require 'devil)
> (global-devil-mode)
> (setq devil-logging t)
> (setq devil-translations '(("%k k" . "RET")
>                            ("%k l" . "<f10>")
>                            ("%k m" . "C-M-")))
>
> Assuming vanilla Emacs key bindings have not been altered, now typing
> "j j" results in a newline. Typing "j l" opens the menu bar.
> Similarly, typing "j m s" results in regexp i-search.

Correction.

(setq devil-key "j")
(require 'devil)
(global-devil-mode)
(setq devil-translations '(("%k k" . "RET")
                           ("%k l" . "<f10>")
                           ("%k m" . "C-M-")))

Now "j k" inserts newline, "j l" opens menu bar, and "j m s" performs
regexp i-search.

On Thu, 11 May 2023 at 11:09, Susam Pal <susam.pal@gmail.com> wrote:
>
> Ruijie Yu <ruijie@netyu.xyz> wrote:
> >
> >
> > Susam Pal <susam.pal@gmail.com> writes:
> >
> > >> > "Minor mode for reading and translating key sequences."
> > >>                   ^
> > >>                   is this redundant?  hard to translate without reading.
> > >>
> > >> That sounds very generic, is the package capable of doing that for any
> > >> kind of key translation.
> > >
> > > Thanks for the feedback. In that case,
> > >
> > > "Minor mode for translating key sequences."
> >
> > Can your package translate more than just modifier keys like control or
> > meta?  Like translate key sequence "j k" into something else?
> >
> > If the answer is no, then maybe you should clarify that in the
> > description.
>
> Yes, this is possible. Although the defaults cater to how I and some
> other users use this package, i.e., converting comma-prefixed key
> sequences with modifier-based key sequences, the key sequence
> translation logic does not make any assumption about modifier keys.
>
> For example, one could configure the following key translations:
>
> (setq devil-key "j")
> (require 'devil)
> (global-devil-mode)
> (setq devil-logging t)
> (setq devil-translations '(("%k k" . "RET")
>                            ("%k l" . "<f10>")
>                            ("%k m" . "C-M-")))
>
> Assuming vanilla Emacs key bindings have not been altered, now typing
> "j j" results in a newline. Typing "j l" opens the menu bar.
> Similarly, typing "j m s" results in regexp i-search.



reply via email to

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