Posts

Best features for text-editing in emacs

There has been recent discussion about emacs for text editing and it got me thinking; I use emacs for a lot of non-code text editing and here are some features I use all the time that lead me to consider emacs good at text-editing. I’ll separate them into built-in and external library categories. What would you add to this list for things that help with raw text-editing (not IDE-like programming features)?

use different java version on your system

Some of my Clojure deployments are using our old deployment method, which uses immutant, but it’s deprecated and fails due to an old dependency requiring java 8-. So switch to java 18 like (assuming it’s installed) like this: sudo update-alternatives --config java Resources

rebind super (windows) key to app menu in kde

I accidentally1* replaced my menubar in KDE2 and the unintended side-effect was that I couldn’t hit the Windows key (super) and have it bring up the helpful menu and search anymore. A little bit of searching around made the answer easy; apparently, binding to Meta+F1 results in the same thing as just meta. Beautiful! Resources Answer found on askubuntu: https://askubuntu.com/questions/246886/how-do-i-open-the-application-launcher-on-kde-with-just-the-meta-windows-key/961407#961407 Footnotes 1 Well, it was on purpose, but I didn’t know it would have that effect

Applying a replacement map to characters in emacs

The Problem I have text in Cyrillic and need to replace individual characters with their transliteration. I have a tiny json of the mappings: {"в": "v","а": "a","ф": "f","ё": "yo","д": "d","ж": "zh","ы": "y","э": "e","л": "l","щ": "shch","я": "ya","й": "j","у": "u","н": "n","г": "g","с": "s","п": "p","ч": "ch","б": "b","х": "kh","е": "ye","ъ": "\"","з": "z","ю": "yu","ь": "'","ш": "sh","о": "o","к": "k","и": "i","ц": "ts","м": "m","т": "t","р": "r"} And I have a number of files that contain lists with entries like

Binding keypad numbers for exwm screen shifting

I now have a perfect use for the rarely-used numpad! Because I have three monitors connected and am an exwm/winum user to navigate all those screens from the keyboard, I have bound that rarely-used numpad to quickly allow for switching between screens, up to 9 (I am not sure my brain could handle more than 9 decisions on viewports, anyway…). The magic is that numpad numbers are a different keycodde than the normal numberline at the top of the keyboard.

Adding a new monitor to my exwm setup

I recently shuffled things with my office and found that I have hardware and ports for a third monitor to connect to my exwm setup. So, without further ado, how to get it going and registered with Linux/EXWM? Edit [2022-01-02 Sun] an easier way with arandr Downloading and installing arandr made this whole configuration much simpler than using the raw randr output. I finally made the jump when I was receiving an error at my attempts to load it manually: xrandr: Configure crtc 2 failed.

how to change the Firefox Close Tab shortcut

C-w is already a highly used shortcut system-wide on my machine, so I’d like to make a different shortcut for close-tab – say, F4. How can I make this change in Firefox? I felt the frustration of several Firefox questioners who asked the same thing and were answered as if they just didn’t know the shortcut, missing the point entirely. On Reddit, though, I receive two excellent answers. One is the easy solution, with a handy plugin that takes care of it.

emacs popular for python

When the results of the State of Emacs survey came out I was really surprised to see that its most reported programming use was in Python. There are some definite biases in the survey participants – I think it was slanted to media used by new users, which were much more plentiful than I expected but obviously much less than the full emacs-using population. Nonetheless I did not at all expect Python to top the language list ahead of Emacs’ classic best-of-class support of lisps like my Clojure, which was down in the middle of languages reported.

Emacs sorting with sort-regexp-fields

Emacs is really an endless world of commands, options, and use-cases, especially for dealing with text. Sorting text is a really common thing and often plain-old M-x sort-lines does the trick in one fell swoop. But what if you want something more sophisticated? It turns out my eyes have been opened and emacs has led me to think about sorting things in ways I never even thought about before.

ghosts in the elisp machine

What ghosts/anomalies do you encounter in the Chtulhu Mansion that is your emacs setup? Emacs is the closest thing now existing to the vaunted “lisp machines” that were originally prescribed to make lisp run effectively. This seems all the more true of exwm users like myself, who are taking the proposition of “emacs as operating system” somewhat literally (at least, to those who don’t consider the difference between a window manager and an operating system.