Fork me on GitHub
#spacemacs
<
2016-07-19
>
reefersleep10:07:42

How do I delete a directory in Spacemacs? (It's an empty directory)

reefersleep10:07:03

I've tried navigating to it with dired (SPC a d) and then entering it, and from here, I can apparently rename it (though it does not take effect) with R. I cannot, however, delete it with d or D.

reefersleep10:07:27

What I mean by "entering" is loading into a buffer like so:

reefersleep10:07:33

/Users/doe/dev/asdf/asdg/:
  total used in directory 0 available 113259813
  drwxr-xr-x   2 doe  staff   68 Jul 19 10:29 .
  drwxr-xr-x  22 doe  staff  748 Jul 19 10:29 ..

reefersleep13:07:35

Another question: when I indent code with =, such as = a [, the result is not quite how I want it. For example, a hiccup vector containing

[component-name arg1
arg2]
will end up
[component-name arg1
 arg2]
, rather than the desired
[component-name arg1
                arg2]
. I find this very frustrating, but it I guess it's because the indenting function does not realize that a hiccup vector has a function call in the first position. Do you think this is right? It sees the vector as a flat list, and indents it as such. I wonder if there's a way to change that, though?

mahinshaw16:07:51

@reefersleep: In dired, if you mark the directory to delete with d, all you need to do is press x to execute the marked actions (in this case delete).

zane19:07:48

Oof. Making emacs aware that that particular form is a Hiccup form would be pretty hard to do.

kasuko19:07:13

@zane I’m not aware how emacs detects indenting rules but shouldn’t it be possible to make this work like the indenting of forms in ()

kasuko19:07:47

like without any special formatting I can get the following

(test
 test2
 test3)

(test test2
      test3)

kasuko19:07:16

so shouldn’t it be possible to get that behaviour with []

kasuko19:07:03

I understand it would be difficult to make it recognize hiccup functions but I think aligning to the second argument in all cases would solve it

zane19:07:02

@kasuko: The difference is that you wouldn't want that behavior always with […].

zane19:07:16

Or, at least, there isn't consensus around that. 😉

kasuko19:07:10

Definitely. But would it be possible to turn that on by a config hook? I’m looking at the clojure mode documentation now but I’m pretty useless with emacs lisp