Age | Commit message (Collapse) | Author |
|
|
|
|
|
That is, complying to the submodule loading protocol (cf. racket's own
enter!).
|
|
And we display it (the current path, settable via ,cd) as a string.
This was, i'm sure, a secret command nobody is using!
|
|
It is now possible to ,enter racket submodules. This is only the
first part of the story, because evalations should take place in the
submodule, not in its top level module, as it happens now.
|
|
|
|
... by the obvious device of waiting for the thread building the index
to finish.
|
|
The evaluation of the help form must happen in a good enough
namespace.
|
|
|
|
For some reason that i don't fully understand, evaluating a function
in the racket/base namespace first thing after loading errortrace
breaks the help macro (!). This patches provides a workaround by
actually invoking help first thing when Geiser starts, with alibi that
it serves to preload the help index (in a separate thread).
While i was at it, i improved the message printed in the minibuffer
when no help is found.
|
|
So, the problem was that our regexp for a Racket prompt didn't take
into account that filenames could contain white spaces: "@[^ ]*> ". A
simple solution was accepting them: "@[^>]+> " won't work because '>'
is also a valid character in filenames, so we went for "@.*> ".
The drawback is that finding the beginning of the prompt (e.g. in C-a)
fails when you're writing things like:
racket@foo bar.rkt> (> 2 3)
because here comint believes that the prompt is "racket@foo bar.rkt> (> "
And that could have side-effects elsewhere. So what i've done is
simply changing the way white-space is (not) printed in the prompt,
substituting it by underscores. That way, whe can go back to the
initial regexp, comint doesn't get confused, and users can easily
infer that "@foo_bar.rkt>" is actually referring to their
"foo bar.rkt" file.
|
|
Thanks to Haiwei Zhou for catching this one!
|
|
Our module loader is receiving load requests for module names
represented as lists that are not exactly a submodule, in the sense
that the path does not represent an actual file.
This phenomenon happens for instance when specifying a reader in a
#lang tag. E.g.
#lang at-exp racket
will cause the loader to be called with module name '(main reader) and
path <cols-path>/at-exp/main.rkt, where main.rkt does not exist.
Afterwards, we see a call to load at-exp/lang/reader/rkt, with name
reader, which is the real code.
So, for now, i'm skipping all load requests with a list name,
forwarding them to racket's default loader.
|
|
I must admit this is yet another excuse to check geiserbot over at
freenode.
|
|
Racket is returning by default their canonical "rkt" name, which
sometimes is not what's in the filesystem.
|
|
Resolved module path can now be, besides symbols, a list representing
a submodule. When deciding whether what we are loading in enter's
current loader is a module or not, we have now to take that bit into
account.
|
|
|
|
In geiser-racket.sh, there's the new option -n, which uses a new
hostname argument accepted by geiser/user's start-geiser function.
|
|
By listing it in the corresponding Makefile.am file. I wonder how
useful maintaining all this autofoo stuff really is: creating an ELPA
package could be more handy for people not using the git repo
directly, and much easier to maintain.
|
|
|
|
|
|
|
|
When no cache dir is set in the emacs customization, we ask Racket for
the one that it's using by default.
|
|
Brought to you by a comma-command in the REPL and the REPL startup
function.
|
|
On the racket side, we use a custom print handler to print
images (convertible? values; see file/convertible) in a special format:
#<Image: filename>
On the geiser side, we add a comint post-output hook to search for
that filename and replace it with inline images.
|
|
This one probably requires Racket 5.3, and incorporates some
parameterization to the module compilation and evaluation code in
Geiser's version of enter.rkt. I'm mostly mirroring what the latter
does, and i'm probably not completely understanding all corner cases,
so the two users of Geiser should keep an eye open for possible
breakage introduced by this patch.
|
|
It's not perfect and undocumented, but useful nonetheless.
|
|
This bugs was exposed by using rackunit, where all the output of, say,
check-eq? was lost for good (it was being sent to the stderr black
hole).
Hat tip Grant Retkke.
|
|
We were just ignoring it so far!
|
|
Actually, i'm not even sure the calls to format i was using were
correct at all!
|
|
|
|
As Stanisław Halik reported, autodoc was receiving a mlist (instead of
a list) as its argument when invoked in an R5RS context. Turns out we
were evaluating geiser-eval's arguments in the wrong context (the
procedure being applied and the arglist belong to the same namespace).
|
|
Thanks to Caleb Reach.
We were using current-input-port, which is not the right port in
graphical environments.
|
|
And we take the chance to lightly document the existence of this
new command in the user manual.
|
|
The catch here is that one cannot use #%variable-reference inside an
R5RS module, and, as a consequence, namespace->module-path-name was
failing badly. The solution is to take note of the module name being
entered before hand, and use that name in case of error (we could
actually use that name always, but then cheaters using Racket's enter!
would see an inconsistent name (which probably they deserve)).
|
|
This is a 2.0 fluid that governs how warning messages are displayed.
In Geiser, we need the prefix set to an empty string so that file
paths are clickable (and the display in a separate emacs buffer is nicer).
|
|
|
|
As per Andy's request. Adding it to Racket (and to the user manual),
shouldn't be difficult).
|
|
|
|
|
|
We avoid using elisp's read for symbols, reading uninterned ones
instead. And then, we cannot use symbols as keys in responses from
scheme: we're using strings instead.
|
|
When the symbol is imported and re-exported by a second module, we
display its definition name and original module, besides the name of
the module re-exporting it.
|
|
We put the value of the identifier where it belongs, and add a missing
period. Works, but geiser/doc.scm is in sore need of a refactoring.
|
|
We have a new "manual lookup" command, and Racket now displays a doc
browser buffer for help with a button activating it. In the process,
we've cleaned-up a little mess in geiser-eval.el and geiser-doc.el,
and refactored the affected Racket modules.
Next in line is providing manual lookup for Guile.
|
|
|
|
Refreshing the cache on form evaluation (had been deactivated by error
since the introduction of meta-commands). The current behaviour is not
yet completely correct: if one evaluates a form in a modified buffer,
geiser won't notice the new definition's signature, not even after the
buffer is saved if one has gone around asking for autodoc before that.
An improvement would be to make the cache sensitive to file write
times, as suggested back in the day by Eli & Neil.
|
|
We now display procedure signatures in module help, and keep a cache
in Guile, using procedure properties.
|
|
Spinning up from correct fontification of [else in this brave Racket
world.
I'm keeping the list of extra keywords lean and mean, but making it
customizable in both Racket and Guile.
|
|
Inferior schemes weren't really a good idea, were they? With remote
connections one can launch an external scheme to debug Geiser anyway.
And everything is (ahem, will be) simpler when we add new
implementations.
|
|
Separate connections for the REPL and Geiser commands was kind of
neat, but it had the problem of synchronising the current namespace
for both connections. A quick fix would have been to ask the scheme
for the current namespace for every Geiser command in the REPL, but
that, besides clunky, would add potentially prohibitive overhead for
(real) remote connections.
As it happens, using a single connection turned out to be not that
difficult and relatively clean code-wise. We could even turn back to
not use inferior schemes, and the net result of this refactoring would
be the replacement of comint-redirect (which wasn't able to match the
whole EOT token if it didn't arrive all at once) by transaction queues
(which also makes geiser-connection's implementation cleaner).
But using an inferior scheme has a dog-food value, and allows external
processes to connect to the scheme being used by Geiser without
further ado, which could be useful for debugging (although this is a
lame excuse: nothing prevents you from starting a REPL server from
emacs if you want). We'll see.
|