auto-yasnippet icon indicating copy to clipboard operation
auto-yasnippet copied to clipboard

Change cl-some #'listp to listp in aya-create

Open ymarco opened this issue 4 years ago • 3 comments

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.

ymarco avatar Nov 16 '20 22:11 ymarco

Any updates on this?

ymarco avatar Dec 12 '20 22:12 ymarco

ping

ymarco avatar Jan 09 '21 13:01 ymarco

Looks like this project is stalled. Paging @abo-abo

jasonm23 avatar Jul 21 '22 18:07 jasonm23

@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")

abo-abo avatar Sep 10 '22 19:09 abo-abo

I honestly don't remember anything past what I've written when opening the PR

ymarco avatar Sep 10 '22 19:09 ymarco

@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 to kill-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 to aya-expand and have aya-expand forward to yank in case no vars are detected.

To keybindings can be saved this way.

abo-abo avatar Sep 11 '22 18:09 abo-abo