Fork me on GitHub
#emacs
<
2017-02-18
>
richiardiandrea00:02:09

is there a magic trick to display with mode/package sets the background color by any chance?

qqq04:02:05

Short Question: Every time I insert evil-insert-mode (say, when I press "i" or "a"), I want (lispy-mode) to run. Long Question: Sometimes, I get kicke out of lispymode. I think it's due to ()'s not being balanced. This means, I have to press "i", M-x (lispy-mode). Now, my question is -- is there some way to setup a hook so taht any time I go from evil-normal-mode to evilinsert-mode, it always runs (lispy-mode) ?

qqq06:02:39

okay, fized the above

qqq06:02:10

new question: =============== I'm familiar with writing *.el -- have a 1K loc init.el however, I'm not familiar with patching existing libraries -- I need to fix an issue with outshine. How do I apply the following patch? https://github.com/tj64/outshine/pull/46/files

qqq06:02:09

apparently that was merged into outshine already; unfortunately, it did not solve my problem

munen16:02:10

@qqq I'm no expert in that, so take my answer with a grain of salt. Hitting i in evil-mode doesn't trigger a new mode, it just executes the function evil-insert. Found that via C-h c i RET. This function doesn't have a hook (at least not findable via C-h a evil insert RET. So, my best guess is that you'd have to use defadvice. Something like this should work. Note that I'm not checking whether lispy-mode is already running, I'll leave that up to you.

(add-function :after (symbol-function 'evil-insert) #'(lambda (x y z)
                                                        (lispy-mode)))

munen16:02:21

@piotr2b I'm writing CLJS and CLJ regularly. CLJ is well supported by Cider and Clojure-Refactor. In CLJS both modes have less functionality, but both provide proper errors when they don't support the same feature in CLJS.

piotr-yuxuan17:02:05

@munen yeah that’s what I was afraid about: less features for cljs 😕

munen17:02:51

@piotr2b Still, some things are working that make life easier. Code Eval (Cider), Cleanup of NS (Clojure Refactor).

piotr-yuxuan17:02:58

is it useable though?

munen17:02:44

I'd say yes. Jumping to definitions, code eval and cleanup of ns are things I'm definitively doing on a regular basis. Some things need a work around. For example you cannot extract a function. But you can extract a def. Of course that's not the same, but adding parameters and a docstring is still less typing than doing it completely yourself.

qqq20:02:02

suppose I have a file "http://tetris.org" and there are 10 diferent code blocks in http://tetris.org that tangle to /src/cljs/main.cljs now, I get an error saying: something bad happened on line 273 of main.cljs is there a way go inverse, to go from "line 273 of main.cljs" to "which of the 10 blocks of http://tetris.org it came from" ? if not, is easy file only supposed to have a single code block?