These are chat archives for ipython/danger_zone

Jul 2015
Jason Grout
Jul 23 2015 01:50
In making the refactoring changes for ipython/traitlets#53 across the entire codebase, I tried with Sublime and other editors, but they just couldn't do it well. I became convinced (once again) that emacs rules them all!
M-x rgrep to find all occurances of "config=" in python files across all repos. Stepping down through them, regexp in each file to move the config=True to instead be ).tag(config=True). If my regexp wasn't smart enough for the line, then C-r to recursively edit and fix it by hand. M-x all to see all matching lines in the file with "config=" on them, which I can edit in one buffer and have the changes automatically recorded back into the real buffer. Use multiple cursors to quickly select all relevant areas and make the changes by hand simultaneously. Emacs is AWESOME!
oh, and then go to the ibuffer view to see all the files I need to save. Then go to magit to save all changes and make new branches and push them upstream. Bwahahaha.
Ryan Morshead
Jul 23 2015 02:00
not sure that it'd help me with my refactoring, but is this what you're talking about?
Jason Grout
Jul 23 2015 02:10
no, none of this is using rope.
just text processing.
however, rope, or the more advanced jedi, might be good for this sort of thing too...
Jonathan Frederic
Jul 23 2015 02:18
@jasongrout does emacs use perl style regexs ?
or is it it's own style?
I think sublime uses perl style
I haven't used atom's yet (I just moved to atom at SciPy)
Jason Grout
Jul 23 2015 02:19
no, unfortunately it predates perl :)
oh, and then one last check. M-x rgrep for config= again
then do C-c / to hide all the lines containing 'tag'
hit the lines that we missed (just a few). Fix them, save again, and then start pushing to github.
the analogy is s-expressions are to lisp what buffers are to emacs.
since everything is a buffer, and everything operates on buffers
you get awesome composability of commands
rgrep returns a buffer of matches. You can then call M-x all or M-x hide-lines, just like any other buffer, to manipulate it.
Jason Grout
Jul 23 2015 02:25
you're never left saying, "wow, I now have all of my matches, I wish I could just filter these somehow". Instead, you say, "wow, all of my matches are in a buffer as lines, hot-linked to the original source files. I know how to hide lines in a buffer, etc."
Jonathan Frederic
Jul 23 2015 18:13

I'm loud

I like to yell

so my text occupies the whole room


Jul 23 2015 18:14


bluejean plugin whyyy
opens up IE
IE immediately freezes
Jonathan Frederic
Jul 23 2015 18:16
I use the app
seems to work well
IE ?
Are you not on the new mac?
Jul 23 2015 18:16
I would, but since I'm at home
my router died a while back
and whoever set up the laptops
did not give access to network settings
so I can't actually use the ethernet to whatever adapter
since that requires access to network settings
so I'm coding on my mac
and then using this laptop for internet
it's a little awkward