I have to sift through 6 really boring config files. To stay sane, I call in Emacs for support.
My task looks like this:
(click for full size)
In the lower left window I check the identifier in the table I have to complete (left column), then I search for all instances of that identifier in the right window and insert the instrument type, the SIGMA (uncertainty due to representation error defined for the type of the instrument and the location of the site) and note whether the site is marked as assimilated in the config file.
Then I also check all the other config files and note whether the site is assimilated there.
Drudge work. There are people who can do this kind of work. My wife would likely be able to do it faster without tool support than I can do it with tool support. But I’m really bad at that: When the task gets too boring I tend to get distracted - for example by writing this article.
To get the task done anyway, I create tools which make it more enjoyable. And with Emacs that’s actually quite easy, because Emacs provides most required tools out of the box.
Firstoff: My workflow before adding tools was like this:
xo
to switch from the lower left window to the config file at the right.M-x occur
then type the station identifier. This displays all occurances of the station identifier within the config file in the upper left window.xo
twice to switch to the lower left window again.I now want to simplify this to a single command per line. I’ll use F9
as key, because that isn’t yet used for other things in my Emacs setup and because it is easy to reach and my default keybinding as “useful shortcut for this file”. Other single-keystroke options would be F7
and F8
. All other F-keys are already used :)
To make this easy, I define a macro:
C-x C-(
.C-n
and C-a
.C-SPACE
and select the whole identifier with M-f
.M-x downcase-region
, copy it with M-w
and undo the downcasing with C-x u
(or use the undo key; I defined one in my xmodmap).C-x o
M-x occur
, inserting the identifier with C-y
.C-x o
C-x o
(yes, twice) to get back into the list of sites.M-f
and kill the word with C-BACKSPACE
.C-x C-)
.kmacro-call-macro
to F9
with M-x local-set-key
F9
kmacro-call-macro
.Done.
My workflow is now reduced to this:
F9
I’m pretty sure that this will save me more time today than I spent writing this text ☺
Happy hacking!
Anhang | Größe |
---|---|
2015-01-26-sane-with-emacs-task.png | 79.85 KB |
2015-01-26-sane-with-emacs-task-200.png | 7.79 KB |
2015-01-26-sane-with-emacs-task-300.png | 15.92 KB |
2015-01-26-sane-with-emacs-task-400.png | 27.28 KB |
2015-01-26-sane-with-emacs-task-450.png | 33.83 KB |
Use Node:
⚙ Babcom is trying to load the comments ⚙
This textbox will disappear when the comments have been loaded.
If the box below shows an error-page, you need to install Freenet with the Sone-Plugin or set the node-path to your freenet node and click the Reload Comments button (or return).
If you see something like Invalid key: java.net.MalformedURLException: There is no @ in that URI! (Sone/search.html)
, you need to setup Sone and the Web of Trust
If you had Javascript enabled, you would see comments for this page instead of the Sone page of the sites author.
Note: To make a comment which isn’t a reply visible to others here, include a link to this site somewhere in the text of your comment. It will then show up here. To ensure that I get notified of your comment, also include my Sone-ID.
Link to this site and my Sone ID: sone://6~ZDYdvAgMoUfG6M5Kwi7SQqyS-gTcyFeaNN1Pf3FvY
This spam-resistant comment-field is made with babcom.