August 30th, 2013



node.js is working funky on my work machine.

For whatever reason, jake’s jake.mkdirP which resolves to utilities.mkdirP which ultimately splits a path and calls fs.mkdirSync(currPath, mode || 0755); is not creating directories.


Rather, it’s creating a single file at the drive-root.




I’ve run this before, but only on my home machine.

Both are windows7, only work has UAC turned on.


Same drive as shell prompt or cross-drive, doesn’t make a difference (I remember running into this as an issue for _something_. Vanilla node fs?).

Running shell as Administrator doesn’t make a difference.

Reducing the path to a single directory doesn’t make a difference.






UPDATE @ 10:30pm: confirmed that jake.mkdirP(path) does work on my home machine. aaaargh. Is it a UAC thing?


UPDATE @ 2013.09.03: it does work on my work machine. The trick is that jake/utilities did not want to create directories from the root of my c: drive. Not that I got any coherent errors out of it. But switching to the d: drive got it to work. The mental disconnect came in that I was writing to the c: and d: drives at home, and thought that I had tried both of them at work. So it goes.

July 16th, 2013

See Also: part 1, part 2


An attempted install on my home system went much more smoothly, all modules appeared to be present. I ran into one remaining issue that I had encountered previously, and so I’ve opened a ticket.


I also discovered the Emacs Guide — which bills itself as an Emacs guide written for JavaScript coders. It’ll cover installation, basic text editing to taking advantage of powerful extensions made for NodeJS and JavaScript. However, it’s primarily a guide to emacs.js, and is currently incomplete (“Creating Modules”, “Creating HTML Files”, “Debugging” and “See Also” are empty sections, while “Creating Projects” exists only as a keybinding note).


Still, I’ve got some other issues with it.


By default, the code wants all of the files in the HOME directory. I don’t put my files they’re — they’re going into Dropbox, and shared across a couple of installs.

It’s not difficult to update the code for this — but if that file is updated in the project, my updates go out the window.

I think the project should support something different, but I haven’t written a replacement for it.


A minor issue is relative line-numbers. I’m sure somebody likes them. I find them distracting.


But most importantly, basic keystrokes are remapped. That the arrow-keys are mapped to other functions is perhaps forgiveable — Emacs already has line-up, line-down, prevchar, next-char mapped to certain keys. Which I never use. Because it’s stupid to use those keystrokes on a modern keyboard that has arrow keys. But, hey. I can almost follow along. Emacs-stylee, right? Although how following an obscure Emacs convention for a library that is pitched at non-Emacs-users who want a Javascript IDE is a bit perplexing.


Unforgiveable, however, is the remapping of keystrokes like kill-region. That’s a basic Emacs keybinding, and shouldn’t be screwed around with. WTF?


emacs.js has the ability too use customized profiles, but these seem to be loaded AFTER things have already been loaded, so the keybindings might be unfixable by simple means. Or maybe it is an easy fix — I haven’t really looked into the customization yet.


I want to use emacs.js — it’s got a lot of javascript-editing packages included that I’m interested in.

But the setup, lack of complete documentation, and bizarre keybindings is slowing me down.

It’s an open-source project, and I can work to minimize those problems.

I’ve opened one ticket already; these notes are part of my own further process.

May 17th, 2013

See Part One


I tried to run init.el from within my existing emacs, but got an error, so I launched it suppressing my config-files

emacs -q -l d:homeemacs.jsinit.el


Basically got the following error (although with a longer trace indicating where it had occured):

Debugger entered--Lisp error: (invalid-function (tool-bar-mode -1))
  ((tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1))
  (if window-system ((tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1)))
  eval((if window-system ((tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1))))
  call-interactively(eval-last-sexp nil nil)


The root seems to be THIS snippet that doesn’t like to work from appearance.el


(if window-system
    ((tool-bar-mode -1)
     (menu-bar-mode -1)
     (scroll-bar-mode -1)))


Now, each of those lines can execute individually, but none of them like to execute in that block.

Why is that?


Oh, my elisp-fu is woefully faded.


hrm. THIS seems to work:


(if window-system
    (progn (tool-bar-mode -1)
           (menu-bar-mode -1)
           (scroll-bar-mode -1)))


so. I update that.



set-default-font: Font Inconsolata-12′ is not defined





End Part Two


read Part One

May 17th, 2013

I’m still trying to figure out how I should be using my wiki and my blog – what content goes where?

I’ve been putting a lot more this-is-what-I-did notes into the wiki, and cleaning them up as I redo it/find other/better ways.

I’m going to try putting them HERE in the blog first (in pmwiki-markup), and then clean them up a bit for the wiki.


That’s the idea, anyway….


This is Part One; read Part Two



So, I decided to test-install emacs.js


NOTE: the installation instructions presume Linux. Because: 1337. Because: Us windows users suck.

Or something like that.


NOTE: the notes below are pretty much unedited transcripts of my attempts to get this to work. They are more a reflection on my unfamiliarity with cygwin than they are of the lack of Windows installation docs. Although making this into an ELPA package would solve this problem in one fell swoop.

read more…

January 15th, 2013

I’m tired of opening a new tab for Netflix, waiting for it to load, then typing in whatever I’m searching for.

Netflix has so much JavaScript AJAXY-goodness on it’s page that it takes YEARS to load. Well, seconds. 5 seconds? 10 seconds? AN ETERNITY!


And I’m likely to forget what I was looking for in such an abnormal span of time (relative to my attention-spa… oooh, shiny!).


So I wrote a FireFox bookmarklet to easily do a search for me.


  1. Create a new bookmark
  2. add the code (below) to the location
  3. enter a memorable keyword (like, say “nf”)


Now, open a new tab, enter your keyword, followed by your search words, like:

nf downton abbey


and you’ll get your results!


The code will accept single-quotes, but searches for titles by default, and will probably break if you want to start throwing crap in there.

If you don’t pass in any search-terms, it defaults to the Netflix home-page.


It’s simple, but if you have an idea for more functionality, let me know in the comments.


javascript:{var loc=””;if(escape(“%s”)){var srch=”%s”.replace(” “,”+”);loc=””.replace(/SRCHTERM/g,srch)}location.href=loc}

June 6th, 2012

After working on jGnoetry for a few weeks, I finally got write-access (I delayed in asking, and Edde’s been busy), and made my first commit to Edde Addad’s Poetry Generators project on SourceForge.


Given the extant of my changes — although primarily refactoring, not functionality — I probably should have made a new branch.


At any rate, now that I’ve dumped in all of my changes, future additions will be more minimal.



One last note — I’m using an old account on SourceForge, back when I used to use the handle xradiographer as my primary identity. Given that I had never made any contributions to any projects under that account, I should have just opened a new one under my real name.


Which occurred to me about 3 seconds into the commit.

June 5th, 2012

A small JavaScript bookmarklet to allow FireFox to easily search the Wayback Machine (if a URL is provided):


  1. var locAppend = '*/';
  2. var locEmpty = '';
  3. var loc = '';
  4. if('%s') {
  5.     loc = locAppend + '%s';
  6. } else {
  7.     loc = locEmpty;
  8. }
  9. location.href=loc;


  1. javascript:{var%20locAppend='*/';var%20locEmpty='';var%20loc='';if('%s'){loc=locAppend+'%s';}else{loc=locEmpty;}location.href=loc;}

May 30th, 2012

I’ve been using Emacs as my editor since… I dunno, 5, 6 years now?

Steve Yegge’s js2-mode was an excellent answer for JavaScript coding, but there were a few issues that drove me nuts. Whatever — the benefits outweighed the disadvantages.

Scroll forward to 2012, and I’m refactoring a large codebase, and trying to indent it properly, and Emacs goes nuts. I have to task-kill it several times, until I eventually narrow down the issue to js2-mode trying to indent certain regexes. Aaargh! (And I eventually figured out that I could interrupt the task without killing Emacs, it was just slow to respond….).

Over to google, and I find others with the exact problem, and a solution: Mihai Bazon has a committed patch that isn’t in the release of js2-mode, and some helper functions, as well. Hooray!

  • syndicate

    • Add to MyMSN
    • Add to MyYahoo
    • Add to Google Reader
    • Add to Bloglines
    • Add to Newsgator
    • Add to NewsIsFree