Fork me on GitHub
#emacs
<
2017-12-30
>
qqq00:12:23

in emacs, is there an easy way to do outlining/folding based on sexp ?

gonewest81805:12:42

I’m on vacation without a laptop but it looks as if origami.el supports recursive folding and unfolding. Presumably lists, vectors, hash maps, sets, etc are all interactively foldable.

qqq06:12:33

playing with it now, orgami mode looks like what . Ineed; thanks!

qqq07:12:53


anyone know how that works with creating new parsers ?

qqq07:12:18

the regex seems to be matching both the start and the end

tianshu08:12:28

is there a JavaScript-like Array in Emacs Lisp? I want to mutate it with push and pop.

qqq08:12:56

as a regex, what does "(def\\w*\\s-*\\(\\s_\\|\\w\\|[:?!]\\)*\\([ \\t]*(.*?)\\)?" mean

qqq08:12:01

I get the (def is a literal (def

qqq08:12:08

and \\w is \w is word

qqq08:12:16

and \\s is \s is space

qqq08:12:31

but what is \\s-* and \\s_

cmack08:12:39

https://www.emacswiki.org/emacs/RegularExpression may help. They look like expressions that work with the syntax table

qqq09:12:22

thanks really useful, \s- whitespace character and \s_ symbol constituent explains alot

qqq09:12:41

what is the meaning of .*? in emacs ?

qqq09:12:46

(as a regexp)

gfredericks16:12:07

the clojure executable & deps.edn seem like they could be a very good integration point for org-mode stuff

gfredericks16:12:47

I'd love to figure out how to have code snippets in org-files, with optional deps listed, and have it run perfectly with no extra context necessary

qqq20:12:14

I've been playing with origami for code folding. It's not behaving as I would like it to. Then I realized one thing: eamcs/cider already indents my clojure code properly; is there a nice way to get code folding via simply indenting ?

gonewest81800:12:51

Ah, sorry — I had hoped origami would work for you. On the one hand, there are other folding plugins besides origami. Perhaps one of the others... on the other hand, I think Origami determines folds via indentation when no specific regexp exists. You could nuke the clojure regexp (and/or manually unset clojure mode?) to see if that works better for you.

qqq00:12:26

origami is very interesting

qqq00:12:43

for the regex one, I plyaed with defining my own regex, but could never get it quite to work (either overlap, or matching until end of file)

qqq00:12:58

for the indent method, it appears, in elisp mode, to ikgnore any line that does not start with (def

qqq00:12:09

so it's a very nice lib, but there's some magic going on