auto-yasnippet
auto-yasnippet copied to clipboard
Change cl-some #'listp to listp in aya-create
res
seems to be a list of strings, not a list of lists. aya-create
was not working for me before this change, it didn't register the region, and now it does.
Any updates on this?
ping
Looks like this project is stalled. Paging @abo-abo
@ymarco What was your use case? It seems to me the current code is working as intended:
(aya--parse "foo bar")
;; => ("foo bar")
(aya--parse "~foo bar")
;; => (((idx . 1) (value . "foo") (ucase)) " bar")
I honestly don't remember anything past what I've written when opening the PR
@ymarco No problem. I'll close the issue. But reading this gave me an idea of improving my config:
(aya--parse "foo bar") ;; => ("foo bar")
if no vars are detected, it's just a list with a string in it. Very similar to a copied region.
So why not have auto-yasnippet
handle copying regions?
- Use the above as a predicate and have
aya-create
forward tokill-ring-save
if no vars are detected. - If the vars are detected, save them as text properties or something and put them on the
kill-ring
anyway - Re-bind M-w to
aya-create
and C-y toaya-expand
and haveaya-expand
forward toyank
in case no vars are detected.
To keybindings can be saved this way.