[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help writing a helm email-address-at-point fn
From: |
Tory S. Anderson |
Subject: |
Help writing a helm email-address-at-point fn |
Date: |
Sat, 09 Mar 2019 22:06:52 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
I use helm and bbdb to complete addresses in my to/from/cc fields. It sort-of
works, but I'm leveraging word-at-point. This means that if I type "Joe" and
type "<TAB>", I see the completions I expect, but if I type "Joe Somebod" I get
completions (and replace) just the "Somebod", both not taking into account the
"Joe" and also leaving it there after I make my selection. It seems like I need
to define a new "thing-at-point" function, but I'm having trouble figuring out
how.
Looking at how bbdb-company isolates the right match, I gleaned the following
regexp:
--8<---------------cut here---------------start------------->8---
(looking-back "^\\(To\\|Cc\\|Bcc\\): *.*? *\\([^,;]*\\)"
(line-beginning-position))
--8<---------------cut here---------------end--------------->8---
But I can't quite figure out how to use that to make a thing-at-point I could
drop in to replace my use of `word-at-point`. Any help would be much
appreciated.
- Tory
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Help writing a helm email-address-at-point fn,
Tory S. Anderson <=