
A DrRacket question is there a way to mark certain positions in an open file so I can jump back to them from anywhere else in the file? For example, when working on a large file, I often need to navigate to a different part to read code there while I’m actively working on a different part. It would be nice to be able to mark the active site and jump back to it after rather than tediously scrolling back and searching around for a few moments to reorient myself.
I looked around and didn’t see such a feature. It probably doesn’t exist but thought I’d ask and hope I’m lucky.

@abmclin If you have Emacs-style keybindings enabled in DrRacket, does C-x C-x
work (like exchange-point-and-mark
in Emacs)?

@greg that keybinding doesn’t seem to work, I also looked at the list of active keybindings but don’t see it listed on there either.

I might switch back to Emacs, I hadn’t realized there was such a thing as exchange-point-and-mark

I just upgraded Racket for something, jumping from 6.7 to 6.10. Suddenly the logger is quite noisy with e.g.:
[warning] building projection of contract #<flat-contract: xexpr/c> for
(build-context . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/prop.rkt> 319 0 10714 195))
(get/build-projection . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/guts.rkt> 812 0 28280 301))
(.../more-scheme.rkt:261:28 . #f)
(mk-call . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-val-first.rkt> 400 5 17828 2114))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-val-first.rkt> 397 3 17564 3019))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 342 33 18779 125))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 342 33 18779 125))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 342 33 18779 125))
(#f . #(struct:srcloc #<path:/Users/greg/src/deals/web/main.rkt> 725 0 28187 355))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 346 33 19012 147))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 342 33 18779 125))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 342 33 18779 125))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/share/pkgs/web-server-lib/web-server/dispatchers/dispatch-servlets.rkt> 63 2 2495 1974))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 342 33 18779 125))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 342 33 18779 125))
(select-handler/no-breaks . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/private/more-scheme.rkt> 163 2 5402 511))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/collects/racket/contract/private/arrow-higher-order.rkt> 342 33 18779 125))
(#f . #(struct:srcloc #<path:/Applications/Racket_v6.10/share/pkgs/web-server-lib/web-server/private/dispatch-server-with-connect-unit.rkt> 131 8 5179 445))
What is the warning trying to tell me, and how can I fix it?
Note: This seems to be using
log-warning
. It would be nicer if it defined its own logger e.g.contract
and usedlog-contract-warning
? (That way, it could be silenced without silencing all otherlog-warning
s?)

lights the @robby signal.

that was my passive-aggressive attempt to get people to update their contract combinators to use the more recent interface

I should move it over to log-contract-warning

oh, wait: it seems to already be that way?

(log-racket/contract-info
"no late-neg-projection passed to ~s~a"
proc-name
(build-context))

in racket/contract/private/prop, line 298?

(in 6.10)

@robby Just to confirm, the xexpr/c
contract would need to change (not something in my code using it)?

Right

(well, the logger isn’t using log-warning
as far as I can tell, so maybe something needs to change elsewhere too?)

I’ll see if I can figure out part of it.

(I recently added a *Racket Logger*
mode/window to racket-mode, and want to make sure it’s not some issue on that end (although atm I don’t see how it could be; just make sure); and will share whatever I learn)

Thanks!!

oh, and I see that was the wrong log call. This is the right one, I think?

(log-racket/contract-warning
"building projection of contract ~s for~a"
ctc
(build-context))

line 816 of racket/contract/private/gut

s

I think what’s confusing me is that (define-logger foo)
normally prepends the text foo:
— the logger name — to the message.

But I don’t see "racket/contract:"
starting the message.

So I assumed it was the generic logger.

It’s not some silly bug wrt the /
in the logger name. This works: #lang racket/base
(define-logger foo)
(define-logger foo/bar)
(log-foo-fatal "hi I'm foo")
(log-foo/bar-fatal "hi I'm foo/bar")
;; Logger output
;; [ fatal] foo: hi I'm foo
;; [ fatal] foo/bar: hi I'm foo/bar

Huh.

mulls….

OK so 1. I’m totally stumped why "racket/contract:"
doesn’t start the log output and identify the logger. It would be good to figure that out. 2. Meanwhile, knowing that the logger name is racket/contract
, I can crank the log receiver up from warning
to fatal
for that logger, to silence that output (in situations where that information isn’t relevant).

@robby thanks!

Should the topic be relevant here?

Sorry, what? Do you mean should the logger topic (a.k.a. logger name) be relevant in some situations, or, do you mean our discussion here on Slack :slightly_smiling_face:, or something else?

@leif This seems relevant to your interests: https://internals.rust-lang.org/t/pre-rfc-support-declaring-varargs-functions-and-processing-a-va-list/5772

@samth Oh cool, thanks.

@abmclin if you do switch back to emacs, what you want is jump registers… there’s also bookmarks (temporary or permanent). There’s also C-x C-SPC to jump to your last edit… um. lots. :slightly_smiling_face:

@greg I mean that I would have thought you could filter based on the topic and not based on the characters that appear before the :
in the logged message.

@mflatt Based on my experimentation, it doesn’t seem like make-evaluator
from racket/sandbox
requires a configure-runtime
submodule of the language provided to the evaluator. Is this behavior intentional, or would it be useful to add that?

@lexi.lambda I think it would be useful to add that. I’m not certain of the compatibility implications (and there wouldn’t be any if we had thought to add that when submodules like configure-runtime
were introduced), but it may be ok.

Would it make sense to have a test-deps
field in #lang info
, like build-deps
, but for testing.

Since there are some packages I want to instll, but they’re only really needed for testing.

@leif Test only packages are already build deps, or did you mean you want something to not be a build dep?