Binding Emacs

Emacs is quite a beast. It’s default keybindings (non-exhaustive) list is formidable. While many of us enthusiasts are able to get around using the defaults (which are found in more places than just Emacs), or just cheat and layer a (arguably superior) input method on top, you’ll often find yourself tweaking the defaults a bit.

This is one of those nice bits about Emacs. You can tweak it almost endlessly. Keybindings can be remapped, or even supplanted. If you wanted to take any binding that mapped to undo, and instead pass it to your own custom function. You can do that. You don’t even need to know what those bindings are ahead of time. Any package that comes along and also adds a map to undo, will instead have it pointed correctly.

My Bindings

My Emacs Custom Bindings (some of)

I tend to break my keybindings down into two general categories: Personal and package. My personal bindings are for things I make myself (functions) and changing around the default bindings to my liking. This tends to be a smaller list, since I’m focusing on just what is available. Packages, since I use use-package, are bound with the package. The reason for this is to ensure that if I add or delete a package from my Emacs configuration, the whole thing is contained in a block of configuration, instead of spread out across multiple files.

(use-package embrace :ensure t :after (expand-region) :bind (("C-c E" . embrace-commander) ("C-c e" . embrace-add)))

This is something I use when I implement the complicated mappings for dired:

(use-package dired :bind (:map dired-mode-map ;; Reuse the same dired window ("RET" . dired-find-alternate-file) ("^" . (lambda() (interactive) (find-alternate-file ".."))) ;; Use 'open' to open the file with the user's choice ("E" . ndegruchy/open-in-external-app) ;; Get the file size(s) ("; d" . dired-get-size) ;; Toggle omit ("; o" . dired-omit-mode) ;; Close the frame, useful when using dired by itself ("; q" . delete-frame)) :config (setq dired-listing-switches "--group-directories-first -alh" dired-dwim-target t) (setq-default dired-omit-files-p t) (require 'dired-x) (require 'dired+) (put 'dired-find-alternate-file 'disabled nil) :hook (dired-mode . dired-hide-details-mode))

Keeping things organized is awesome, especially if you end up endlessly tweaking, like I do.

Emacs is what you make of it. While the defaults are great and are somewhat useful as-is, you’re going to run into situations where the defined bindings are less than optimal. I actually unbound a couple of keys because the way I type, when I hit M-x, I end up hitting M-z accidentally (my keyboard has a very shallow key travel).

If you do end up adventuring into the den of bindings for Emacs, take the ‘bind-key’ package/elisp with you. It helps make the binding, unbinding and defining of maps easier.

I hope you learn something from this. Customizing Emacs is a fun activity, but it can be a confusing exercise.


Some Kind of Pythonic Magic

I’ve been tinkering with my nascent Python “game”. Each time I expand on it, it’s to learn a bit more about Python, or some feature or module that seems appropriate. To that end, I’ve heard that Python comes with “batteries included”. Meaning the standard suite of tools that come with a typical install of Python is extensive.

To that end, it feels like the built in libraries are somewhat magical in how well they handle things. I’m comparing to C, whose idea of standard libraries feels unbelievably spartan in comparison. Different tools for different jobs, I suppose. There are really weird, simple pleasures in programming in Python. Consider:

import os from pathlib import Path scoreboard = Path(os.environ.get("XDG_DATA_HOME") + "/guessing-game/scores.txt") if scoreboard.exists: with"a+") as scores: // Game code here

This is delightful. I don’t have to do stuff like count to see if the return from Path is greater than 1 to indicate existence of a file, like I have to in JS when selecting elements, Path comes with a ready-made exists method that does exactly what it says on the tin. Oh, and the whole thing figures out the path on POSIX vs Windows path styles. Scrumptious!

I know my little honeymoon phase with my incredibly basic script will probably come crashing down when I want to do stuff more complicated, like have a high-scores list, but I’m enjoying it while it lasts.


Chrome Privacy

New changes to the way Google’s flagship application, Chrome, make it easier to stay on top of what Google is getting, and what you may be revealing to third-party sites. Another feature to be ignored by the masses, and questioned by people who still don’t trust them.

While, on their face, these changes make Google Chrome a little closer to other browsers in the privacy aspect. It still doesn’t feel like a genuine attempt at helping the user. It just so happens that keeping others away from their users, while still giving them privileged access to their data is something that dove-tails with their goals, for the moment. Still, they’re trying something Firefox and Safari take very seriously. Who knows where this will end up.

The Ecosystem of Google

Within Google’s sphere of influence, there is a lot to like for your average user:

  • Single sign on to lots of different first and third-party applications, like Docs, Drive, Gmail, GSuite and more
  • High quality web-based applications
  • User account data sync when you use Chrome or a Chromebook including passwords, extensions, preferences, wallets, subscriptions, etc.
  • Integration with your Android Smartphone
  • And much more

I won’t say that I haven’t been tempted to jump ship and join up with Google. I have an older Chromebook, and when I was signing into Google services, it was amazing. I could blow the thing away, and be back up in short order, everything back in place. If I weren’t so enamored with Linux and the Libre software movement, I can easily imagine me being either a hardcore Apple user or a hardcore Google user.

By and large, Google has ‘won’ this generation of smartphone, browser, search and advertising systems. The literal billions of users tied into those systems is no small feat. Even organizations like Mozilla and Microsoft often have to bend slightly to accommodate Google’s whims. This is a really weird time.

While no man lives forever, the same can be said about Google. They’re constantly killing services that don’t provide enough user telemetry or subscribers. Often, it feels like a gamble to use any one of their services because it’s just as likely to be killed a few months down the road. Other than their bread and butter, it’s a hard sell to build a business off of anything Google does.

Shiny Chromium

It’s hard to say that Chrome is a bad browser. The architecture, based on Apple’s WebKit (which, itself, was begot by KDE’s KHTML engine), and is screaming fast, well integrated on most platforms and can be used without the same UI. A feat that Mozilla has only weakly attempted in the past. The support for web standards (driven by a cabal of browser makers, such as it is) is pretty top notch.

The biggest problem with being such an 800lbs gorilla is that everyone starts to ape you. Sites target Chrome-features only, or support only Chrome are becoming more commonplace. A chilling throwback to the days of IE vs Netscape Navigator. The old beast has been felled, long live the new beast?

As I mentioned before, even titans like Microsoft bend to Google on occasion. In an attempt to hang on to browser users and tie them into their own ecosystem, Microsoft released Edge with the launch of Windows 10. A new browser, better, different and faster than their absolutely decrepit Internet Explorer (which still sees regular use in enterprise…). Try as they might, they could not edge out this competitor like they did to Netscape before. In this new Microsoft, they’ve adopted Chrome’s “Blink” engine and rebranded it as the new Edge. Same as Chrome, but different packaging.

History makes ready to repeat itself. What are we willing to do to make it fair, open and available to all? Firefox used to be all the rage, can we make it that way, again?

Awesome Computers

DuckDuckGo on a Billboard!

DuckDuckGo in the LOCAL AREA CODE!


As the tech giants attempt to consolidate control of everything from logins, services and the way we communicate, small pockets of resistance have emerged. Tools like WordPress, Jekyll and other blogging platforms have long been the mainstay of online publishing. Allowing the common man to get a presence online. Now the task before us is to expand this pocket of freedom. Enter: IndieWeb.

IndieWeb is a series of tools and concepts designed to allow for the creative expansion, promotion and even the authentication of user content. These components allow you to build an ever growing spider’s web of content that all links together. This web provides ways for other users to see what you’ve posted, follow you in different locations and generally “authenticate” your work by providing links to and from it back to other content you control.

IndieWeb Authentication

Another method of controlling your stuff is signing in through your own identity provider. IDP is not a new concept. Services and protocols like OpenID, Kerberos, Shibboleth, LDAP, and Oauth have been around for a while. Many of these tools are either defunct, hard to setup and maintain, or are not really suited for web-based Single Sign On (sso). Enter IndieAuth.

IndieAuth allows for you to setup your own Oauth (kind of) setup that authenticates you against your own domain. For instance, if you use the WordPress IndieAuth plugin, you can use the built-in login tools in WordPress to log into other sites. You’ve probably already seen this in action with “Login with Google/Facebook/Github/Twitter/Microsoft/iCloud/etc”. The concept is the same, but now you control it.


In part, all of this functionality works by implementing Microformats. These bits of information, invisibly embedded in the HTML of your site, provide extra information to other tools. Some of these tools will parse out your contact information, if provided. Others will parse out article information on your blog, or parse out connections to where the content has been posted elsewhere, like on LinkedIn or whatnot.

Like IndieAuth, Microformats are from days past. While they’ve evolved into a much more rich framework of properties, I was implementing them in the early 2000’s on Florida Coastal School of Law’s website.

Why I Don’t Use It

Excuse me? I’ve just gone on, gushing about how good the IndieWeb is and how we’re taking back the power from the man. What gives?

Simply put: I don’t need it. Most of my posts on social media are just short thoughts that don’t deserve blog level exposition. I don’t access any services that allow for IndieAuth logins, and honestly tearing apart twentytwenty to implement proper Microformats is enough to make me want to do actual productive work on something else.

I personally endorse the IndieWeb. It needs more people, more eyeballs and more implementations to succeed. The tools it has are well done, but could use some polish. Microformats, Semantic Linkbacks and other features are awesome and, if you’re up to it, not hard to simply add to your site (YMMV). If I were setting up a static site with one of those newfangled generators, I’d totally implement as much as I could. It’s easy. The problem for me is that I’m lazy, old and too pragmatic to break something that isn’t broken.