in the bottom window when it really is a different file
(ie, using a same-file predicate that involves opening
the files and comparing the ports)
closes PR 12635 (hopefully -- if not, then we can reopen)
Specifically:
- make predicate symbols and variables be original (and,
in the former case, have srclocs)
- remove the originality in the quoted syntax constants
that the expansion introduces
I think there is probably something better that should be done
with those introduced syntax constants, possibly relacing
them with #f, or possibly replacing them with source location
lists, but I'm not sure how they are used, so I've just left
them in there.
(Also, very minor Rackety in check syntax)
like textual-read-eval-print-loop
There is still a difference, however, because drracket's REPL has a
notion of multiple expressions that are submitted simultaneously that
textual-read-eval-print-loop doesn't. For example, if you type this at
the prompt:
(car) (+ 1 2)
then textual-read-eval-print-loop will print out the error and then 3,
but drracket will print only the error (ditto if (car) were replaced
by a continuation abort).
This difference is, IMO, a good thing, since it lets you use a single
interaction to do multiple things, but stops as soon as there is an
error. (It is also how drracket has behaved for a long time.)
closes PR 12790
There was an exception raised and then handled internally when the
slideshow/pict-convert library was loaded; DrRacket loaded this
library during the dynamic-extent of a handler it installed into
the global-port-print-handler, which causes a (non-tail) infinite
loop.
Renamed `convert' to `pict-convert', etc., to avoid confusion
with `file/convert' bindings.
Moved out of `slideshow/pict' to `slideshow/pict-convert', because
most `slideshow/pict' clients do not need it.
pixel of space in between lines in DrRacket.
This change is based on Matthew's experience having a look
at the font setup on the three platforms.
He writes:
> * Mac OS X: the convention seems to be to add space between lines.
> TextEdit, for example, looks like DrRacket: the maze has spaces.
>
> (I can't find a font that makes the maze look right, actually, even
> if I adjust the line spacing.)
>
> * Windows: the convention seems to be that space is built into the
> font. DrRacket (and SirMail) draw lines more sparsely than Notepad.
>
> Perhaps consistent with the differing conventions, the height of
> "Courier New" at 11-pixel size is 14 on Windows, 13 on Mac OS X.
>
> * Unix: the convention seems to be to add space. DrRacket looks like
> the default Terminal and Text Editor programs on Ubuntu.
>
> The maze nevertheless looks right everywhere, because the glyphs
> extend an extra pixel above the declared bounding box!
so that printing an error no longer blocks (on user actions) but still
uses the GUI. Also: when new errors are generated while a dialog box
showing an error is still open, then just ignore those errors. Also,
if an error is generated that has been shown in the last 5 minutes, ignore
the new one.
detect if a (n online check syntax) rename would conflict with
an existing name. (This can happen because the remote place's
custodian gets shutdown due to, for example, another tab's online
check syntax running.)
can get "stale" and cause DrRacket to deadlock (this commit just sets
up some stuff to make one fix possible, but that fix doesn't seem to
be working, so the actual fix is disabled (see comment in commit))
coloring for blame assignment in check syntax) try to color
the right-hand side of a binding that actually comes from
a lambda-bound variable (and thus crash for not finding the
right-hand side)
Began scribble docs
Added `compiled-bitmap' and `compiled-bitmap-list', which embed bitmaps
computed at expansion time into compiled files (safe 3D values)
Please merge into release
This removes all the SVG sources, parsing, and marked-layer colorizing, the PNG binaries in the distribution, and the dependence of DrRacket on `slideshow/pict'.
Icons are now produced by drawing on a bitmap-dc%, inferring or building a z map, choosing a material, and sending these to a two-pass ray tracer. This is for the most part hidden behind an API consisting of functions from colors and optional sizes and materials to `bitmap%'s.
Contracts and documentation forthcoming.
be a frame and react to changes in focus of the main drracket window.
didn't finish because there does not seem to be an equivalent to
on-subwindow-focus that lets the frame detect when one of its
children gets the focus.
related to PR 12474
to be a hierarchical-list-item<%> object, but now it is
a list of language names (same information, different data)
and one place didn't get updated.
Closes PR 12462
the purpose of drawing arrows.
The computation to fill in the cache seems to actually be pretty quick and
the work to clear the cache when it is out of date (via a call to on-change)
can be substantial on big files, so just not maintaining the cache seems better.
(there are 7254 arrows in drracket/private/unit.rkt, stored in an interval map,
and iterating over the interval-map in a for loop seems to be time consuming)
Also, DrRacket could get into a state where switching tabs would trigger a
call to on-change, which means that switching tabs would take a few seconds.
the state that online check syntax uses (indirectly via scribble)
to lookup documentation.
since the kill-safe abstraction moved some computation over to
another thread, the values of various parameters (current-directory
in this case) were not preserved. So when scribble then ended up
resolving a module path with the wrong current directory, this
bad value got cached. Then later, when check syntax tries to figure
out what file to open to jump to it, it got the cached bogus value
(even though current-directory was right when check syntax asked
for the filename).
closes PR 12538
cope with the case where the thread has been killed (the nacks are
apparently not triggered on thread death in some cases)
(optimistically) closes PR 12427
before wiring up / initializing the new tab. This means that the
file's name is not asked for, and thus a new "untitled" number is not
allocated too early
closes PR 12361 (and hopefully introduces no new ones)
- SVG icon sources
- Playback-style icons, logos, stop signs, magnifying glasses, etc., in diffuse and shiny styles
- Program to pre-render SVG files (icons/private/svg/render-png.rkt)
- Pre-rendered icons (PNGs in power-of-2 sizes)
- Made `icons' a module, with functions to conveniently load icons and convert to/from picts
- Scribble docs for `icons'
- Used new icons in DrRacket toolbar
This fixes a bunch of little things, including switch tabs between
windows with different states (closing PR 12341) and switching to
a non-module language.
- Delays drawing arrows until mouse hovers for a very short time
- Delays drawing arrows when scrolling
- Tooltips appear in the correct pane when the editor is split
- Fixes infinite event queue with scrolling a split editor while a tooltip is displayed
for syntax errors (i.e., exn:fail:syntax? exceptions)
Overall, it seems important to (in most cases) not show the stack that
leads to the point where raise-syntax-error is called, so as not to
confuse users who might think that that stack is useful information
in understanding how to fix the syntax error.
I've resisted this technique for avoiding those stacks for a long
time, mostly because common syntax errors in the standard settings
don't usually get the stacktrace button because they usually have
empty stacks (partly thanks to the with-stack-checkpoint dance).
But now that the underlying racket-generated stack is shown too, and
not just the errortrace-generated stack, it is harder to make those go
away. More precisely, DrRacket used to be able to rely on the fact
that files that were compiled to .zo files would not have the
instrumentation in them and thus stackframes from that code would not
show up in the stacktrace. No longer.
So, it seems time to try this alternative.
In particular, instead of trying to collect all of the arrows and do some kind
of a smart transitive closure (that tries to avoid adding links that would "skip"
expressions but doesn't always manage it), the new code tries instead to build
the right links directly while traversing the fully expanded expression
This also seems to have been a minor performance improvement. When running the
information collection phase of check syntax (ie, not counting the time for
expansion) on a 1.8 GHz core i7, for collects/framework/private/text.rkt,
the times went from:
cpu time: 7347 real time: 7413 gc time: 211
cpu time: 7328 real time: 7393 gc time: 239
cpu time: 7356 real time: 7418 gc time: 240
to:
cpu time: 7562 real time: 7632 gc time: 265
cpu time: 7555 real time: 7618 gc time: 269
cpu time: 7552 real time: 7617 gc time: 262
closes PR 11835
do not include in 5.2
Specifically, in the case that we're inheriting a language setting
from some earlier preference or something and the language we're
inheriting is one that saves prefixes, and the current file being
opened does not match any of the possible prefixes, then revert
to the not-a-language language, instead of using the value from
the preference
Also: finish the removal of the EoPL language level from the
DrRacket langauge dialog, and clean up the 'get guidance' dialog
Please cherrypick this commit to the 5.2 release branch
I believe that this can go wrong in the case that you edit a buffer and switch tabs
before drracket fully finishes responding to the edited buffer (due to a queue-callback
that postpones some of the response to editing the buffer) for online expansion.
At least, this is how I guess that the error below happened:
send: target is not an object: #f for method: get-view
=== context ===
/Users/robby/git/exp/plt/collects/racket/private/class-internal.rkt:4602:0: obj-error
/Users/robby/git/exp/plt/collects/drracket/private/module-language.rkt:1485:6: get-box method in .../module-language.rkt:1151:4
/Users/robby/git/exp/plt/collects/drracket/private/module-language.rkt:1397:6: invalidate-online-error-ranges method in .../module-language.rkt:1151:4
/Users/robby/git/exp/plt/collects/drracket/private/module-language.rkt:1387:6: clear-old-error method in .../module-language.rkt:1151:4
/Users/robby/git/exp/plt/collects/drracket/private/module-language.rkt:1177:6: buffer-modified method in .../module-language.rkt:1151:4
/Users/robby/git/exp/plt/collects/mred/private/wx/common/timer.rkt:34:38
/Users/robby/git/exp/plt/collects/mred/private/wx/common/queue.rkt:432:6
/Users/robby/git/exp/plt/collects/mred/private/wx/common/queue.rkt:472:32
/Users/robby/git/exp/plt/collects/mred/private/wx/common/queue.rkt:618:3
esc;c:x send-toplevel-form-to-repl
m:c:x send-toplevel-form-to-repl
c:c;c:e send-toplevel-form-to-repl
c:c;c:r send-selection-to-repl
c:c;m:e send-toplevel-form-to-repl-and-go
c:c;m:r send-selection-to-repl-and-go
c:c;c:z move-to-interactions
Took the inspiration for the list from the keybindings
available in Scheme mode in Emacs.
Closes PR 12211 (and probably others)
This is a backwards incompatible change; there is a more complex change
that just stubs this stuff out that may be better that we may need
isntead of this commit.