NonGNU ELPA - devil

devil

Description
Minor mode for translating key sequences
Latest
devil-0.6.0.tar, 2023-Jul-30, 140 KiB
Maintainer
Susam Pal <susam@susam.net>
Website
https://github.com/susam/devil
Browse ELPA's repository
CGit or Gitweb
Badge
Manual
MANUAL

To install this package, run in Emacs:

M-x package-install RET devil RET

Full description

1 Devil Mode

Sorry, your browser does not support SVG. Sorry, your browser does not support SVG. Sorry, your browser does not support SVG. Sorry, your browser does not support SVG.

Devil mode trades your comma key in exchange for a modifier-free editing experience in Emacs. Yes, the comma key! The key you would normally wield for punctuation in nearly every corner of text. Yes, this is twisted! It would not be called the Devil otherwise, would it? If it were any more rational, we might call it something divine, like, uh, the God mode? But alas, there is nothing divine to be found here. Welcome, instead, to the realm of the Devil! You will be granted the occasional use of the comma key for punctuation, but only if you can charm the Devil. But beware, for in this sinister domain, you must relinquish your comma key and embrace an editing experience that whispers wicked secrets into your fingertips!

1.1 Introduction

Devil is available in MELPA as well as NonGNU ELPA. If you are using Emacs 28.1 or a more recent version of Emacs, you can get the latest stable version of Devil by typing M-x package-install RET devil RET. Otherwise, you need to add MELPA or NonGNU ELPA to your list of package archives and then install MELPA. More details on the installation procedure is provided in the manual.

By default, Devil mode rebinds the comma key to activate Devil. Once activated, Devil reads a so-called Devil key sequence from you. As you type your Devil key sequence, Devil translates the key sequence to a regular Emacs key sequence. If any command is bound to the translated Emacs key sequence, Devil runs that command and then deactivates itself.

By default, each comma in the Devil key sequence is translated to "C-". For example, if you type ", x , f", Devil translates it to "C-x C-f". Similarly ", m" is translated to "M-". If you type ", m x", Devil translates it to "M-x". Further ", m m" is translated to "C-M-". If you type ", m m f" Devil translates it to "C-M-f". There are several other translations available in the default translation rules that let you enjoy working with Emacs while avoiding modifier keys. Further, the Devil activation key, translation rules, etc. are customisable. Thus if you do not like the default choices made in this package, you can customise it easily to suit your preferences.

Read the manual to learn how to install, use, and customise Devil.

1.2 Channels

The author of this project hangs out at the following places online:

You are welcome to subscribe to, follow, or join one or more of the above channels to receive updates from the author or ask questions about this project.

1.3 Support

To report bugs, suggest improvements, or ask questions, create issues.

1.4 Thanks

Thanks to:

1.5 Reactions

Some amusing reactions to this project collected from various corners of the world wide web:

Every bit of this horrifies me, and I can't believe you've done it. Outstanding. Well done! – @kstrauser

This is insane. I am going to try it immediately. – @jrockway

Will defiantly check this out. – @strings

Defiantly! – @oantolin

😈 – @SequentialDesign

1.6 More

See Emacs4CL, a DIY quick-starter kit to set up Emacs for Common Lisp programming.

See Emfy, a DIY quick-starter kit to set up Emacs for general purpose editing and programming.

Old versions

devil-0.5.0.tar.lz2023-Jun-1525.8 KiB
devil-0.4.0.tar.lz2023-May-2722.8 KiB
devil-0.3.0.tar.lz2023-May-1513.5 KiB

News

Changelog

Version 0.6.0 (UNRELEASED)

Changed
  • Devil key sequence , m now translates to M- instead of C-M-.
  • Devil key sequence , m z now translates to M- instead of C-M-.
  • Devil key sequence , m , now translates to M-, instead of C-M-,.
  • Devil key sequence , m m now translates to C-M- instead of M-.
  • Repeatable key sequence , m m f changed to , m f.
  • Repeatable key sequence , m m b changed to , m b.
  • Repeatable key sequence , m m y changed to , m y.
  • Repeatable key sequence , m m ^ changed to , m ^.
Removed
  • Devil key translation from m z to M-.
  • Devil key translation from m m to m.
  • Devil key translation from m to M-.

Version 0.5.0 (2023-06-15)

Added
  • Function devil-set-key to set a new Devil key and update the mode's keymap.
  • Reinstate variable devil-version since it is useful in determining the source version conveniently. It helps during troubleshooting the package when installed from MELPA which sets the package version to a version derived from the current date and time.
  • Command devil-describe-key to describe Devil key sequences.
  • Command devil-toggle-logging to toggle logging.
  • Special key , h , k to execute devil-describe-key.
  • Special key , h , l to execute devil-toggle-logging.
Changed
  • Customising devil-key also updates the mode's keymap.
  • When no binding exists for the translated key sequence, convert the key sequence to a fallback key sequence for terminal Emacs according to local-function-key-map and execute any command bound to the fallback key sequence. For example, when the Devil key sequence , x <tab> is converted to C-x <tab>, since no command is bound to this key sequence, it is further translated to C-x TAB and the command indent-rigidly bound to it is executed.
  • Format control sequence to show the Devil key sequence read by Devil has changed from %k to %r.
  • The default special key sequences no longer merely insert literal characters into the buffer. That behaviour was problematic in isearch-mode because typing special keys like , , and , SPC in isearch-mode inserted the literal characters in the buffer as opposed to appending these characters to the search pattern. The default special key sequences now invoke devil-execute-key instead which carefully look up the current binding for the current special key and executes it. This produces the correct behaviour of special keys even in isearch-mode.
Fixed
  • Fix special key sequence , <return> which was broken by the previous release of version 0.4.0.
  • Fix special key , , in isearch-mode.

Version 0.4.0 (2023-05-27)

Added
  • Customisable variable devil-all-keys-repeatable that makes all Devil key sequences repeatable when set to t.
  • Key , s to the default list of repeatable keys.
  • Key , d to the default list of repeatable keys.
  • Key , m m ^ to the default list of repeatable keys.
  • Translate m m to m to support typing key sequences like C-c m.
  • Translate m z to M- to support typing key sequences like C-c M-m and C-M-m.
Changed
  • When a Devil key sequence translates to an Emacs key sequence with both the control key and an uppercase letter, the uppercase letter is further translated to its shifted form, e.g., C-M-V is translated to C-M-S-v.
Fixed
  • Fix key translation when the Devil key is a key vector, e.g., (kbd "<left>")
  • Fix key translation of key sequences involving function keys, e.g., , <tab>, , <backspace>, etc. For example, earlier , <tab> translated to C-TAB and caused "undefined" error even if there was a command bound to C-<tab>. With this fix, , <tab> is now translated to C-<tab> and invokes the command bound to it, if any.

… …