Zamansky 48: Silver Searcher

The other day, Mike Zamansky made a post that I really liked. It was about his grading workflow and how he tries to lessen the tedium by making it as efficient as possible. As many of you know, I enjoy reading about other people’s workflows and invariably learn something useful from them. It didn’t have a video but I was planning to write about it anyway. Then, Zamansky produced an accompanying video that talks about some of the tools he uses.

Zamansky has his students submit their homework and projects into git repositories, which he clones so that he can examine and grade their work. A typical (abbreviated) setup might look something like this on his computer (stolen from his Grading Workflow post):

hw
├── doe_jane
│   ├── hw_01
│   ├── hw_02
│   └── hw_03
│ 
└── doe_john
    ├── hw_01
    └── hw_02

Suppose he’s grading hw_02. He’d like to produce a dired listing that has just the hw_02 repository for each of his students. It’s a little tricky because the hw_02 repositories have separate parent directories. You need something like find to locate those files and pipe them into dired. The dired command find-name-dired does this but adds the inode number to the listing, which makes it wrap and look confusing.

Zamansky’s solution is to use The Silver Searcher and Philip Snowberger’s ag.el package that include the function ag-dired-regexp. That allows Zamansky to search for hw_02 in the hw directory and produce a nice dired listing of all the repositories for that assignment.

The video and post are definitely worth your time. Even if you’re not a teacher, you may have a workflow that can leverage the same ideas. The video is just short of 12 minutes so you can watch it while you’re enjoying a cup of coffee.

This entry was posted in General and tagged . Bookmark the permalink.