Narrow your view on multiple-cursor marks

The discussion in the comments of this post is great. It reveals a couple of ways to narrow your view, in a few frameworks. In particular it reveals that in multiple-cursors, all it takes is a call to mc-hide-unmatched-lines-mode.

(mc-hide-unmatched-lines-mode &optional ARG)
Minor mode when enabled hides all lines where no cursors (and
also hum/lines-to-expand below and above) To make use of this
mode press “C-‘” while multiple-cursor-mode is active. You can
still edit lines while you are in mc-hide-unmatched-lines
mode. To leave this mode press or “C-g”

Just be sure to exit this mode before closing Emacs as it is a little confusing to return to nothing.

Easily browsing the kill-ring

Ever wish you could just look through everything you’ve killed recently to find out if you killed that piece of text that you think you killed, but you’re not quite sure?

I haven’t, but kind of wish I did, because this package looks interesting.
Wondering if my workflow obviates the need for it, or, I’m just “doing it wrong”.

Elmacro Shows Keyboard Macros or Latest Interactive Commands As Emacs Lisp

elmacro shows keyboard macros or latest interactive commands as emacs lisp.
This package might pique your curiosity. Surely everyone has wondered how to do something like this, especially if you use the macro recorder a lot.
While I don’t have an immediate need for it, I look forward to being able to address it with this package.

A reference card for code execution in org 8

refcard-org-babel “contains the reference documentation that describes how to perform code execution within Org mode documents using Org Babel 8”.
Look forward to referencing this when I read about other’s personal org workflows, and, document down my own.

How to handle the enter key while inside of comment blocks

This post reveals a nice function comment-indent-new-line which gives you the
right kind of indentation for block comments. That got me wondering if my
enter key-binding should do different things depending upon whether or not the
cursor is inside of a comment block or not. Specifically, if it is, then call
the aforementioned function, else call the normal binding. This seems that it
might be an improvement

This post explains how to check if the cursor is inside of a comment block:

(nth 4 (syntax-ppss))

It is not nil when the point (cursor) is inside of a comment block.

Great to know.

I decided not to make this change yet, but, I wanted to capture how, here.

The Lenticular Text Style of Literate Programming

This announcement is pretty exciting because it reveals a new-to-me take on literate programming. The style is to store a single file as a source, and render disparate parts of that file in different buffers in a mode correct for the content.

For example you may have an Emacs Lisp file serve as the source and two separate buffers, one Emacs Lisp and one Organization (Mode), to work on the content, with all of the mode-specific assistance.

Is it a new idea? It is new to me and I am curious to find out about other approaches people have taken to realize this style.

Here is an overview and a nice video that demonstrates it.

Probably Try to Avoid local-set-key

When I first learned how to set up Emacs, I really liked local-set-key because you didn’t have to know about the keymap for the mode you just had to make the call in that mode’s hook. That is simple and makes total sense. That has worked well for me for years until two things happened:

  • Wanted to use prefix commands
  • Re-started using Windows again on a daily basis

The former is part of the natural expansion of use and its refinement. The latter is similar, but specific to running Emacs on Windows.

The last time that I ran Emacs on Windows I did not use the Super key. Then I went off into the wilderness and use it a lot only to return and find that Windows owns lot of my keybindings. Not only were they owned, but they would not let go of them no matter how I tried! Because if this major inconvenience, I’ve got no reasonable choice other than refactoring some of my perfect bindings into something, ahem, better.

This refactoring would have been pretty easy if I’d jus done normal keybindings against keymaps, but I didn’t, I used local-set-key. So this becomes a good learning opportunity about the key-map names and additionally how, at least for myself, this is generally a bad approach because makes re-factoring harder.

The good thing is that at least up front there is a good time savings, I suppose.