Fork me on GitHub
#emacs
<
2018-01-01
>
qqq07:01:01

(defun wrap-hydra (f)
  (lambda ()
    (interactive)
    (evil-normal-state)
    ((symbol-function f))))
(general-define-key "<end>" (lambda () (interactive) (evil-normal-state) (hydra-end-key/body)))
(general-define-key "<end>" (wrap-hydra 'hydra-end-key/body))

the first works, but the wrap-hydra fails; what am I doing wrong?

bozhidar08:01:42

((symbol-function f)) is not valid syntax

bozhidar08:01:06

I assume you wanted to do something like (funcall f)

bozhidar08:01:47

(defun wrap-hydra (f)
  (lambda ()
    (interactive)
    (evil-normal-state)
    (funcall f)))

qqq09:01:49

can you please enlighten me on this, which step is wrong? 1. elisp is a lisp-2, f has three fields attached to it, whch can be retrieved via symbol-name symbol-value symbol-function 2. (symbol-function f) extracts the function from the symbol 3. ((symbol-function f)) calls the extracted function clearly I'm wrong somewhere; question is: which step ?i

qqq13:01:40

=== I'm weak in elisp. Is there an easy way to count the number of leading spaces in an emacs string?

bozhidar19:01:26

Or the newer seq.el (built-in since Emacs 25.1)

donmullen19:01:58

I’m doing development with emacs / cider - and noticing that on Mac OS - a process called “Loader” sometimes spikes to like > 200% CPU. Has anyone seen this before and know what I might be doing wrong? I’m doing some core.async development - wondering if I am generating threads that aren’t completing??

bozhidar19:01:30

I’ve never seen something like this myself.