[racket-dev] "bookmarks" in drracket?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Feb 3 09:36:58 EST 2012

I like the idea. Some comments:

- the bookmarks should probably be saved in a text% object, not in a
module top-level variable (alternatively, the bookmarks would have to
record a frame and an editor, and then jumping to a bookmark might
send you to another frame/tab).

- it would be good if there was some graphical representation of the
current bookmarks state.

- did you consider just having an (unordered) list of bookmarks? Then,
adding a book mark would be a keystroke that'd be separate from
jumping around, so you'd have to set them yourself, but you could
iterate around in the set bookmarks, instead of having to keep track
of which things are on top of the stack.

I think the first one probably has to be fixed before we a release
could contain this feature. (The second one seems important, but not
as much as the first.)


On Fri, Feb 3, 2012 at 1:06 AM, Stephen Chang <stchang at ccs.neu.edu> wrote:
> When using Dr Racket, I use the right-click "Jump to definition of" a
> lot but I frequently find that I also want an easy way to get back to
> the code I was previously looking at. Does anyone else think this
> would be a useful feature to have? I've implemented something that
> adds this functionality.
> If anyone wants to try it out, I've included both modified source
> files (from drracket/private) and a patch.
> With the code I added, a "bookmark" automatically gets saved when
> jumping to a definition from the right-click menu and when choosing a
> definition from the "(define ...)" menu. Multiple bookmarks accumulate
> on a stack. You can also add your own bookmarks with the right click
> menu.
> To go back to the most recent bookmark, either use the right-click
> menu, or press C-x r (is this an appropriate key binding? I chose it
> because emacs similarly uses C-x r to do bookmark-related stuff).
> Since I'm not very familiar with drracket code, I'm not sure I put
> stuff in the right place. Would anyone mind reviewing my code? It's
> only a few lines.
> Also, would something like this be better as a plugin in the future?
> _________________________
>  Racket Developers list:
>  http://lists.racket-lang.org/dev

Posted on the dev mailing list.