austinhaas / scrim Goto Github PK
View Code? Open in Web Editor NEWAn Emacs package for Clojure REPL interaction
License: GNU General Public License v3.0
An Emacs package for Clojure REPL interaction
License: GNU General Public License v3.0
It's too easy to hit the "unbalanced parens" issue.
This may only pertain to displaying output in the echo area.
The output filter function that gets called when new output arrives may be called multiple times for each output. We already filter out prompts, trailing newlines, and empty strings, but desired output might also be split into multiple calls, and only the last will be displayed in the echo area. That will look incorrect.
Determine if there is any way to modify comint's behavior. If not, then we may need to buffer the output.
Proposal: Each time output is received, use comint's fns to find the output between the last input and the current prompt.
For when you want to glance at the REPL, then return to whatever buffer it may have replaced.
I notice this frequently when:
This may depend on #28
I.e., to a file.
I clear the REPL often, for simplicity and sometimes for performance reasons. It would be nice to have the entire history sometimes.
This may be an issue with comint, or something below it.
Cider does not appear to suffer from this issue.
scrim--get-arglists uses elisp's read function, which doesn't understand clojure syntax.
The problem is that scrim--echo-output
uses comint-last-input-end
to determine where the output starts, but that isn't set if scrim-echo-input-p
is nil. The result is that it just keeps displaying the complete history.
A fallback could be to search for the end of the last prompt.
I think we should make echo input the only option and do this instead: #19.
Not sure how easy this is to implement, because we might have to parse EDN in elisp.
Might make it easy to colorize the output by type.
This applies to functions that use scrim--redirect-result-from-process
, and it affects the repl vars like e*
and 1*
.
Needs cljs.pprint ns, not clojure.pprint ns.
Not sure if there is a simple solution.
(defn foo% [] 1)
error in process filter: if: Format string ends in middle of format specifier
error in process filter: Format string ends in middle of format specifier
Currently, eldoc just looks up the symbol in whatever namespace is currently loaded. This may lead to unexpected results.
Not sure we want this. May be more trouble than it is worth.
Allow user to specify the threshold.
The user should be able to interactively show/hide the full input.
Consider using hideshow or something based on emacs' set-selective-display
.
In Clojure, eldoc won't look up a symbol unless the current namespace matches the current buffer. In ClojureScript, `ns always returns nil. To make eldoc work in ClojureScript at all, that check doesn't happen. This causes a few issues:
The arguments need to be passed to make-comint-in-buffer
as SWITCHES.
Proposal: don't send ":" to the repl.
E.g., if a command applies to a function, then search up for the nearest containing function symbol.
This causes the current function symbol (based on point) to display in the minibuffer with its argument lists.
Intial support: 94f7da1
Barely tested in clj, not cljs. Seems to work, but needs improvement.
Known issues:
if: <unknown symbol>
. One possible solution might be to get the documentation for the symbol and parse it; seems like what we want is on the 3rd line after a couple spaces.When code is originally loaded, via require, symbols will have metadata associated with them that indicates the file and line from where it was loaded. If you eval the code after that, :file
will be changed to "NO_SOURCE_PATH"
.
I really don't know the best way to handle this. That metadata really only tells you where the code originally came from; if you edit any of the source files, that info may become stale.
It would be good to know how Clojure sets those values in the first place. This might be a good place to start: clojure/clojure@6bbfd94
Steps to reproduce:
"\."
at the REPL prompt.Actual behavior:
The REPL responds with a message: "Unsupported escape character: \."
, and no prompt is returned.
Expected behavior:
Same error message, but a prompt is returned.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.