Feed on
Posts
Comments

BicycleRepairMan operates by searching and modifying python files on the filesystem, and thus has always required that you save your work before you do a query or a refactoring. I’ve never felt this to be a big deal before, but more recently I’ve been using its functionality more aggressively within emacs and I’ve started to see this as a bit of a pain.

Moreover, as BRM (hopefully) develops ‘autocomplete’ functionality IDEs are going to want to pass partially completed (unsaved) code to BRM. I originally thought this problem could be solved by passing a copy of the unsaved buffer through to BRM, however this proved to be more tricky than I thought - the pymacs python bridge for emacs doesn’t cope well with large chunks of unescaped text and even if I fix that I can’t expect that other IDEs will be problem free.

The best solution came in the form of emacs ‘autosave’ files:
For those not familiar: emacs periodically saves the contents of unsaved buffers into temporary files (just in case the power goes or something). The filenames are the same as the original filename but prefixed with a # or a dot. All I had to do was make emacs auto-save all the modified buffers prior to the query, and then have BRM load these files if they existed and were newer than the ‘real’ python ones.
I can’t think of any reason why this shouldn’t work with other IDEs - any ideas?

Viewing 2 Comments

    • ^
    • v
    Most people I know run IntelliJ in a mode where each file is aautomatically saved the moment the current file looses focus - that coupled with the rather good local history and IntelliJ users (mostly) never have to worry about saving at all. For similar IDE's having to save the file before running it shouldn't be a problem.

    For something like TextMate you should be fine working from an in-memory buffer - in 99% certain TextMate's plugins can access the entire file.
    • ^
    • v
    Hi Sam!

    For something like TextMate you should be fine working from an in-memory buffer - in 99% certain TextMate’s plugins can access the entire file.


    Actually I found the most inconvenient thing wasn't saving the buffer I was currently working on, but other ones I'd also made changes to. I'm hoping that a BRM TextMate plugin could just adopt the same strategy as above - i.e. save unsaved buffers into temporary #filename# files prior to invoking a query.
close Reblog this comment
blog comments powered by Disqus

generic acomplia purchase cialis overnight delivery cheap acomplia online buy generic clomid buy cialis low price viagra without prescription where to buy cialis lowest price levitra where to buy propecia cheap cialis from canada lasix no prescription viagra without rx cheap accutane tablets viagra online without prescription viagra no rx buying cialis online zithromax viagra in uk free cialis cialis us where to buy acomplia find cialis online buy viagra lowest price accutane prescription buy cheap accutane online cialis buy buy generic cialis online acomplia order propecia online lowest price synthroid synthroid without a prescription synthroid online buy propecia online cheap levitra online where to buy levitra cialis online review synthroid prices cialis generic cialis buy drug buy viagra on line viagra pharmacy cialis for order price of levitra zithromax online where to buy synthroid soma generic generic clomid propecia online stores viagra cheap drug cheap generic soma cialis cheap zithromax online cheap order accutane online purchase zithromax online purchase viagra online buy cheap clomid cheap generic propecia zithromax pharmacy online pharmacy cialis cheapest acomplia cost of cialis no prescription viagra free viagra purchase lasix online cialis from india viagra from india order discount cialis soma online stores find no rx cialis cialis no rx required find viagra without prescription approved cialis pharmacy lasix discount