This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-27
Channels
- # aleph (8)
- # announcements (14)
- # beginners (25)
- # cider (20)
- # cljdoc (5)
- # clojure (70)
- # clojure-europe (2)
- # clojure-germany (6)
- # clojure-italy (8)
- # clojure-nl (3)
- # clojure-russia (107)
- # clojure-spec (22)
- # clojure-uk (40)
- # clojurescript (18)
- # core-async (3)
- # cursive (8)
- # data-science (11)
- # datomic (20)
- # editors (1)
- # emacs (5)
- # figwheel-main (19)
- # fulcro (25)
- # graphql (1)
- # hoplon (2)
- # hyperfiddle (2)
- # jobs (1)
- # leiningen (3)
- # lumo (4)
- # off-topic (40)
- # pedestal (1)
- # quil (4)
- # re-frame (5)
- # shadow-cljs (105)
- # sql (4)
- # uncomplicate (1)
I have a unit test I'm making for a mode I'm working on that kills a particular region and puts it in a variable but the test doesn't seem to register region-active-p
as true
(ert-deftest kill-region-test ()
(with-current-buffer (get-buffer-create "*rack em tests*")
(rack-em-start)
(insert "Testing\n123")
(goto-char 0)
(set-mark 0)
(push-mark 4)
(activate-mark)
(should (equal nil rack-em--yank-list))
(call-interactively 'rack-em-kill-region)
(should (equal '("Test") rack-em--yank-list))))
all the rack-em-start
does is initialize rack-em--yank-list
as '()
inside rack-em-kill-region
I have
(defun rack-em-kill-region
(beg end)
(interactive (list
(region-beginning)
(region-end)))
(if (region-active-p)
(progn
(kill-region beg end)
(rack-em--add-from-kill-ring))))
and I can't seem to debug from the overseer test in emacs either
(defun rack-em--add-from-kill-ring ()
(add-to-list 'rack-em--yank-list
(substring-no-properties (first kill-ring))))