{"action":"created","issue":{"url":"https://api.github.com/repos/greghendershott/racket-mode/issues/114","labels_url":"https://api.github.com/repos/greghendershott/racket-mode/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/greghendershott/racket-mode/issues/114/comments","events_url":"https://api.github.com/repos/greghendershott/racket-mode/issues/114/events","html_url":"https://github.com/greghendershott/racket-mode/issues/114","id":62606465,"number":114,"title":"trace not working properly","user":{"login":"zzhu2011","id":5303703,"avatar_url":"https://avatars.githubusercontent.com/u/5303703?v=3","gravatar_id":"","url":"https://api.github.com/users/zzhu2011","html_url":"https://github.com/zzhu2011","followers_url":"https://api.github.com/users/zzhu2011/followers","following_url":"https://api.github.com/users/zzhu2011/following{/other_user}","gists_url":"https://api.github.com/users/zzhu2011/gists{/gist_id}","starred_url":"https://api.github.com/users/zzhu2011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzhu2011/subscriptions","organizations_url":"https://api.github.com/users/zzhu2011/orgs","repos_url":"https://api.github.com/users/zzhu2011/repos","events_url":"https://api.github.com/users/zzhu2011/events{/privacy}","received_events_url":"https://api.github.com/users/zzhu2011/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-18T06:40:09Z","updated_at":"2015-03-19T21:36:34Z","closed_at":null,"body":"Hi,\r\nSeems the trace is not properly. \r\nNot sure whether this is my emacs config problem or the racket mode problem.\r\n\r\n```\r\n#lang scheme\r\n(require racket/trace)\r\n(define (f x) (if (zero? x) 0 (add1 (f (sub1 x)))))\r\n(trace f)\r\n\r\nhell.rkt> (f 10)\r\n>(f 10)\r\n> (f 9)\r\n> >(f 8)\r\n> (f 7)\r\n> >(f 6)\r\n> (f 5)\r\n> >(f 4)\r\n> (f 3)\r\n> >(f 2)\r\n> (f 1)\r\n> >[10] (f 0)\r\n< < < <[10] 0\r\n< < < < < 1\r\n< < < < <2\r\n< < < < 3\r\n< < < <4\r\n< < < 5\r\n< < <6\r\n< < 7\r\n< <8\r\n< 9\r\n<10\r\n10\r\n```\r\n\r\nthe right one is like this:\r\n\r\n```\r\n> (f 10)\r\n>(f 10)\r\n> (f 9)\r\n> >(f 8)\r\n> > (f 7)\r\n> > >(f 6)\r\n> > > (f 5)\r\n> > > >(f 4)\r\n> > > > (f 3)\r\n> > > > >(f 2)\r\n> > > > > (f 1)\r\n> > > >[10] (f 0)\r\n< < < <[10] 0\r\n< < < < < 1\r\n< < < < <2\r\n< < < < 3\r\n< < < <4\r\n< < < 5\r\n< < <6\r\n< < 7\r\n< <8\r\n< 9\r\n<10\r\n10\r\n```"},"comment":{"url":"https://api.github.com/repos/greghendershott/racket-mode/issues/comments/83768825","html_url":"https://github.com/greghendershott/racket-mode/issues/114#issuecomment-83768825","issue_url":"https://api.github.com/repos/greghendershott/racket-mode/issues/114","id":83768825,"user":{"login":"greghendershott","id":265119,"avatar_url":"https://avatars.githubusercontent.com/u/265119?v=3","gravatar_id":"","url":"https://api.github.com/users/greghendershott","html_url":"https://github.com/greghendershott","followers_url":"https://api.github.com/users/greghendershott/followers","following_url":"https://api.github.com/users/greghendershott/following{/other_user}","gists_url":"https://api.github.com/users/greghendershott/gists{/gist_id}","starred_url":"https://api.github.com/users/greghendershott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greghendershott/subscriptions","organizations_url":"https://api.github.com/users/greghendershott/orgs","repos_url":"https://api.github.com/users/greghendershott/repos","events_url":"https://api.github.com/users/greghendershott/events{/privacy}","received_events_url":"https://api.github.com/users/greghendershott/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T21:36:34Z","updated_at":"2015-03-19T21:36:34Z","body":"Wow. That's interesting. I can repro this. It seems to be an issue with comint-mode treating the `>` as part of the REPL prompt.\r\n\r\n`racket/trace` lets you changed the \"in\" and \"out\" characters. When I do this:\r\n\r\n```\r\n(parameterize ([current-prefix-in \"}\"]\r\n               [current-prefix-out \"{\"])\r\n  (f 10))\r\n```\r\n\r\nI get\r\n\r\n```\r\n}(f 10)\r\n} (f 9)\r\n} }(f 8)\r\n} } (f 7)\r\n} } }(f 6)\r\n} } } (f 5)\r\n} } } }(f 4)\r\n} } } } (f 3)\r\n} } } } }(f 2)\r\n} } } } } (f 1)\r\n} } } }[10] (f 0)\r\n{ { { {[10] 0\r\n{ { { { { 1\r\n{ { { { {2\r\n{ { { { 3\r\n{ { { {4\r\n{ { { 5\r\n{ { {6\r\n{ { 7\r\n{ {8\r\n{ 9\r\n{10\r\n10\r\n```\r\n\r\nI'm not suggesting this as a real work-around. I'm just sharing this as a note to myself about roughly what's happening. I will fix."}}