Skip to content

Fix #56 Add special handling for Planck REPLS #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 26, 2017

Conversation

slipset
Copy link
Contributor

@slipset slipset commented Mar 24, 2017

Added support for the Planck REPL

Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

Thanks!

Copy link
Contributor

@arichiardi arichiardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! minor questions :)

inf-clojure.el Outdated
@@ -236,7 +237,15 @@ Clojure to load that file."
(define-obsolete-variable-alias 'inf-clojure-load-command 'inf-clojure-load-form "2.0.0")

(defcustom inf-clojure-load-form-lumo "(clojure.core/load-file \"%s\")"
"Format-string for building a Clojure expression to load a file.
"Planck format-string for building a Clojure expression to load a file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe little typo here, shouldn't it be for Lumo? I have probably forgot to update this one myself 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inf-clojure.el Outdated
@@ -272,7 +282,7 @@ This should usually be a combination of `inf-clojure-prompt' and
:package-version '(inf-clojure . "2.0.0"))

(defvar inf-clojure-buffer nil
"The current inf-clojure process buffer.
"The current inf-clojure process buffer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh just out of curiosity, why those forward ticks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkdoc suggested it. removed
8929305

inf-clojure.el Outdated
@@ -649,12 +680,19 @@ If you are using REPL types, it will pickup the most approapriate
:type 'string
:package-version '(inf-clojure . "2.0.0"))

(defcustom inf-clojure-completion-form-planck
"(doall (map str (planck.repl/get-completions \"%s\")))\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this (doall (map str ... was necessary because lumo returns #js. Does planck return it as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -685,6 +730,20 @@ If you are using REPL types, it will pickup the most approapriate
:type 'string
:package-version '(inf-clojure . "2.0.0"))

(defcustom inf-clojure-set-ns-form-planck
"(in-ns '%s)\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no namespace here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like in-ns lives in top-level

cljs.user=> (doc in-ns)
-------------------------
in-ns
([name])
REPL Special Function
  Sets *cljs-ns* to the namespace named by the symbol, creating it if needed.
nil
cljs.user=> (doc apropos)
-------------------------
planck.repl/apropos
([str-or-pattern])
Macro
  Given a regular expression or stringable thing, return a seq of all
  public definitions in all currently-loaded namespaces that match the
  str-or-pattern.

Copy link

@mfikes mfikes Mar 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, Planck's in-ns is a REPL special (just like in the ClojureScript REPL). It has no namespace.

@slipset
Copy link
Contributor Author

slipset commented Mar 25, 2017

Thanks for the review @arichiardi!

@bbatsov bbatsov merged commit 4e80276 into clojure-emacs:master Mar 26, 2017
@bbatsov
Copy link
Member

bbatsov commented Mar 26, 2017

👍

@slipset slipset deleted the special-handling-planck branch March 28, 2017 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants