all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Susam Pal <susam.pal@gmail.com>
To: Ruijie Yu <ruijie@netyu.xyz>
Cc: Philip Kaludercic <philipk@posteo.net>, emacs-devel@gnu.org
Subject: Re: [NonGNU ELPA] New package: devil
Date: Thu, 11 May 2023 11:09:37 +0100	[thread overview]
Message-ID: <CAK-5M93D6V6C9=ZnSu3JtKEEHPPN8vdPBzDv9-wXGcwno4kUGA@mail.gmail.com> (raw)
In-Reply-To: <sdvttwj8b5b.fsf@netyu.xyz>

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.

Regards,
Susam



  reply	other threads:[~2023-05-11 10:09 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11  5:23 [NonGNU ELPA] New package: devil Payas Relekar
2023-05-11  6:26 ` Po Lu
2023-05-11  6:33 ` Eli Zaretskii
2023-05-11  6:52   ` Philip Kaludercic
2023-05-11  7:07     ` Eli Zaretskii
2023-05-12 15:02       ` Brian Cully via Emacs development discussions.
2023-05-11  8:09     ` Susam Pal
2023-05-11  8:45       ` Philip Kaludercic
2023-05-11  8:58         ` Eli Zaretskii
2023-05-11  9:08           ` Susam Pal
2023-05-11  9:12             ` Philip Kaludercic
2023-05-11  9:19               ` Susam Pal
2023-05-11  9:34                 ` Ruijie Yu via Emacs development discussions.
2023-05-11 10:09                   ` Susam Pal [this message]
2023-05-11 10:31                     ` Susam Pal
2023-05-11 10:36             ` Eli Zaretskii
2023-05-11  8:56       ` Eli Zaretskii
2023-05-12 16:19   ` Jim Porter
2023-05-13  7:10     ` Philip Kaludercic
2023-05-13  9:05       ` Susam Pal
2023-05-15 22:12         ` Richard Stallman
2023-05-17 13:30         ` João Távora
2023-05-17 14:06           ` Philip Kaludercic
2023-05-17 15:41             ` João Távora
2023-05-17 15:46               ` Eli Zaretskii
2023-05-13 22:30     ` Richard Stallman
2023-05-14  4:29       ` Naming guidelines for ELPA packages (was: Re: [NonGNU ELPA] New package: devil) Jim Porter
2023-05-14  7:47         ` Naming guidelines for ELPA packages Philip Kaludercic
2023-05-14 19:23           ` Jim Porter
2023-05-14 19:33             ` Philip Kaludercic
2023-05-19  3:49               ` Jim Porter
2023-05-19  4:33                 ` Akib Azmain Turja
2023-05-20 16:51                   ` Philip Kaludercic
2023-05-21 21:03                   ` Richard Stallman
2023-05-14 21:36         ` Stefan Monnier via Emacs development discussions.
2023-05-14 22:17           ` Jim Porter
2023-05-14 23:00             ` Stefan Monnier
2023-05-15  1:36               ` Jim Porter
2023-05-15 22:15         ` Naming guidelines for ELPA packages (was: Re: [NonGNU ELPA] New package: devil) Richard Stallman
2023-05-15 22:15         ` Richard Stallman
2023-05-16  4:51           ` Jim Porter
2023-05-16  8:42           ` Naming guidelines for ELPA packages Madhu
  -- strict thread matches above, loose matches on Subject: below --
2023-05-09  1:57 [NonGNU ELPA] New package: devil Susam Pal
2023-05-09  8:42 ` Philip Kaludercic
2023-05-09  8:52   ` Eli Zaretskii
2023-05-09  8:58     ` Philip Kaludercic
2023-05-09 18:19       ` chad
2023-05-09 22:07         ` Susam Pal
2023-05-09 20:56   ` Susam Pal
2023-05-10  6:09     ` Philip Kaludercic
2023-05-10 21:00       ` Susam Pal
2023-05-10 21:56       ` Richard Stallman

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='CAK-5M93D6V6C9=ZnSu3JtKEEHPPN8vdPBzDv9-wXGcwno4kUGA@mail.gmail.com' \
    --to=susam.pal@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=philipk@posteo.net \
    --cc=ruijie@netyu.xyz \
    /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.