visit a sequence of files

21 views
Skip to first unread message

John Clements

unread,
Apr 21, 2020, 4:29:21 PM4/21/20
to Racket Users
Here’s a question I have about both DrRacket and Emacs. It often happens in my workflow (grading files, for instance) that I want to set up a list of files, and then have an easy way to move forward or back in that list (“next file”, “previous file”). I see that emacs has a function called “next-file” which can move forward and back in a list of files apparently specified by a tags-table file; is that the easiest way to do something like this in emacs, or am I missing something obvious? In DrRacket, I’m guessing that there’s no existing functionality that would allow me to specify a list of files and move back and forth between them. I’m guessing I could implement something like this pretty easily … would this be a good job for Laurent Orseau’s Quickscript?

I would absolutely love to hear that I’ve missed something obvious!

Many thanks!

John



David Storrs

unread,
Apr 21, 2020, 4:35:14 PM4/21/20
to John Clements, Racket Users
I don't use DrRacket much, but would the normal 'previous / next window' commands work for you?  On Mac it's:
previous window:  Shft + Cmd + ~
next window: Cmd + ~

or

previous window: Cmd + <left arrow>
next window: Cmd + <right arrow>

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/38dfc78b-4d01-4ac1-b1cd-2e4b372c2d09%40mtasv.net.

John Clements

unread,
Apr 21, 2020, 4:38:44 PM4/21/20
to David Storrs, Racket Users
Well, sure… once you open all the files. Opening all the files is the painful part. Also, the display of tabs is not totally great when you have sixty or seventy of them open. Sorry, it might not have been clear that I want a list of sixty or seventy files.

John

David Storrs

unread,
Apr 21, 2020, 4:44:00 PM4/21/20
to John Clements, Racket Users
Ah, got it.  Well, as to opening all the files, you can select them all in Finder and Cmd+O.  (Presumably the equivalent works on Windows.) Can't help you with the aesthetics, sorry.

John Clements

unread,
Apr 21, 2020, 5:05:41 PM4/21/20
to David Storrs, Racket Users
I would love that, but they’re not all in one directory. Maybe the easiest solution would be to write a script to temporarily move them all into one directory. In fact, as I think about this harder, I realize that the biggest problem may be that Apple’s file dialog doesn’t facilitate moving along a nested structure in the ways that I want, so temporarily moving them into a single directory is almost certainly what I want to do.

Thanks for the ideas!

Related note: it turns out that emacs has “find-dired”, which more or less does the same thing, by allowing you to specify a virtual “directory” as a set of arguments to ‘find’.

Thanks again,

John

Robby Findler

unread,
Apr 21, 2020, 11:08:44 PM4/21/20
to John Clements, David Storrs, Racket Users
A (Racket) script that calls "open" (on a mac) and uses some state to keep track of what "next" means seems straightforward. Probably this can also be integrated via quickscript so It becomes a key binding. And maybe you want some small number of key bindings that assign grades and then move on to the next one?

(Not having tried it :)

Robby

Reply all
Reply to author
Forward
0 new messages