8000 Easy to create a file which cannot be built, hard to delete · Issue #12 · bodil/catnip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 15, 2018. It is now read-only.

Easy to c 7955 reate a file which cannot be built, hard to delete #12

Open
alexbbrown opened this issue Dec 13, 2012 · 0 comments
Open

Easy to create a file which cannot be built, hard to delete #12

alexbbrown opened this issue Dec 13, 2012 · 0 comments

Comments

@alexbbrown
Copy link

Flush with the knowledge that Clojure symbols can have '-' in them, I find myself creating file like this:

test-svg.clj

or worse

test-svg

However, Clojure's build system expects that a namespace such as:

(ns test-svg)

Will be built as test_svg.class

I suggest the following:

  1. The new filename should be taken to be the classpath class element, and the actual filename be calculated from that.

Create:
/myproj/src/views/test-svg.clj
Actually creates:
/myproj/src/views/test_svg.clj

  1. The (ns ) declaration be automatically placed at the start of the file. It's boilerplate that I don't really need to type.

Injects:
(ns myproj.src.views.test-svg)

  1. Some support of rename is added for idiots like me (so I don't have to drop to bash and then reload, losing catnip context)

Such as

3.1) Clicking on the filename in the top left corner switches to edit mode, can change filename. Auto update ns?

3.2) If a ns-declaration conflicts with the filename, the filename be changed.

For example, if I already created my file as above, and now I find I'm happy with my scribbling, I can type:

(ns myproj.src.views.test-svg)^H^H^H^H^H^H^H^H^Hsvg-view)
^S
Renames the file and builds the new class.

I know it's sugar, but I keep creating duff files. :-) Perhaps I should be the change I want to see.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0