1

I want to use avy to jump to fields in a bibtex entry. I have only found a way to use a regex to specify jump places in avy so far. I don't want to just build a regex to match the fields in an entry, because it would also match fields in another entry, and I want to limit the jump candidates to the entry. Is this doable?

Drew
  • 75,699
  • 9
  • 109
  • 225
John Kitchin
  • 11,555
  • 1
  • 19
  • 41
  • I did find a way to limit the scope of targets; you can specify a beginning and end in (avy--generic-jump regex nil avy-style beg end). So in this case, I can construct a regex on the fields and use that to jump to a field. – John Kitchin Sep 23 '17 at 16:07

1 Answers1

1

Answering my own question... Here is a way to get an avy style jump tree to positions 1, 4 or 12. You could use any list of positions you want, e.g. calculated from some function.

(avy-with my-jumper (avy--process '(1 4 12) (avy--style-fn avy-style)))
John Kitchin
  • 11,555
  • 1
  • 19
  • 41