Ok. Some elements of answer: - DrRacket can be started with the option "-singleInstance" to make sure that an existing window is reused to open new files. This option must be used each time the `drracket` executable is called, so it's better to simply make an alias. This also requires libunique to be installed (e.g., "sudo apt-get install libunique-1.0.0"). - `man drracket` seems to suggest that there's no way to pass any information to the DrRacket instance other than file names. - The right thing to do here would be to modify DrRacket to accept lines and columns. - I know it's possible to control the cursor position from within DrRacket once we have the info of the line. Something like that for example: https://github.com/Metaxal/script-plugin/blob/master/examples/goto-line.rkt - One (portable) workaround is to listen to a specific socket and make a small client that sends information through that socket when executing something like `racket -l send-to-drracket-socket -- <file> <line>` that sends relevant info to the aforementioned socket, but that sounds overkill for just this feature (although this socket could in principle be used for any interaction with DrRacket from the outside).
On Thu, May 28, 2015 at 11:54 AM, Lux <glsdes...@gmail.com> wrote: > > Do you mean opening the file from a menu within DrRacket or from the > outside, like from the command line? > > Hi Laurent, thanks for your answer. Yes, I mean from the command line > (more specifically I need it to be launched as a system command, which is > almost the same). I am on Linux but I think if this feature exist it will > be multiplatform. > > I have this little script which extract TODO lines alike from a collection > of source files and present them nicely formatted in a webpage served > locally. I can click on one of them and open the specified location on > gvim. I'd like to do the same with DrRacket. > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.