This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-17
Channels
- # aleph (7)
- # announcements (1)
- # aws (12)
- # beginners (118)
- # calva (15)
- # cider (17)
- # clj-kondo (1)
- # cljdoc (11)
- # cljsrn (1)
- # clojure (108)
- # clojure-dev (32)
- # clojure-europe (3)
- # clojure-italy (4)
- # clojure-kc (1)
- # clojure-nl (4)
- # clojure-portugal (1)
- # clojure-spec (29)
- # clojure-uk (69)
- # clojurescript (91)
- # cursive (14)
- # datomic (8)
- # emacs (13)
- # figwheel-main (12)
- # graphql (4)
- # jackdaw (1)
- # jobs (14)
- # lambdaisland (3)
- # luminus (3)
- # nyc (1)
- # off-topic (14)
- # onyx (23)
- # pedestal (8)
- # re-frame (4)
- # reitit (3)
- # shadow-cljs (6)
- # spacemacs (7)
- # specter (2)
- # tools-deps (3)
- # unrepl (4)
- # vim (7)
- # xtdb (10)
Hey Folks, I am struggling to find out the way to select a form. I need to delete only a form and don`t know how to achieve that in emacs. Any help please?
@quieterkali If you are using smartparens then use the function sp-kill-sexp
to kill the balanced expression following point. If point is inside an expression and there is no following expression, kill the topmost enclosing expression.
sorry @U05254DQM for taking so long to answer your message, actually I am using paredit
paredit-kill
looks like it does what you want from the paredit cheetsheet http://pub.gajendra.net/src/paredit-refcard.pdf. I haven’t used paredit in about 5 years, so can’t confirm, sorry
Very often I need to convert a single line string to multi-line, I’d use fill-paragraph
, but that’s not enough - Clojure (sadly) doesn’t support multi-line strings, so I have to wrap it into (str ,,,)
. Has anyone already written a function that does that conversion (and back to single line)? e.g.:
(foo "bla-bla-bla ,,,,,,")
becomes:
(foo (str "bla-bla-bla"
",,,,"
",,,,"))
Clojure does support multi-line strings. It doesn't support Python and some other language's feature of a triple-quoted string.
e.g. most doc strings are multi-line strings.
fill-paragraph works on them, with some limitations I haven't quite figured out completely, or tried to change fill-paragraph to improve upon. When writing doc strings, I often put the leading and ending double-quote on lines of their own, which seems to avoid a behavior of fill-paragraph that it will not do anything if there is a double-quote at the beginning and end of the string on one line.
ah, yeah, my bad… what I meant to say that :
(foo "foo bar")
and
(foo "foo
bar")
won’t eval the same way, but
(foo (str "foo"
"bar"))
wouldit shouldn’t be crazy difficult to write an elisp function that does that transform, that’s why I thought maybe someone already wrote one
understood. makes sense. I haven't.