abo-abo / avy

Jump to things in Emacs tree-style
1.71k stars 109 forks source link

Transition from avy-goto-char-timer to search command #303

Closed noctuid closed 4 years ago

noctuid commented 4 years ago

Would be nice if on failure avy-goto-char-timer did something like return the input string, so that a command could be created around it that opens swiper, for example, if there is no match in the visible buffer.

abo-abo commented 4 years ago

Thanks. The return result of avy-goto-char-timer is either a cons cell or t. We could theoretically use buffer-substring to get the text from the cons cell, but I've added a variable as well for convenience.

noctuid commented 4 years ago

Awesome, thanks!