Re: how to use bbdb-snarf to capture addresses from point

Bob Newell <[email protected]> Mon, 27 Jan 2020 10:00:24 -1000
Newsgroups gmane.emacs.bbdb.user
Organization Avi Gobbler Publishing
Message-ID <[email protected]>
"Roland Winkler" <[email protected]> writes:
>> (bbdb-snarf (thing-at-point 'email))
>
> thing-at-point only returns the email address itself, not the name that
> may go with it.  Therefore, it is probably cleaner to put point and
> mark around the region you want to snarf.  Also, if you define a
> command, it is probably cleaner to spell out the snarfing rule you
> want to use (which is 'mail for the above).

You make a very good point about specifying a 'snarf' rule
explicitly, and you are right about my usage of
'thing-at-point being limited to just picking up the email
address without any related information. I've been using this
code but will certainly revise it. Thank you for the
improvements.

The trick is, though, that it isn't always possible to cleanly
define a region with just the info you want. I've tried
various things along those lines and often end up with a
completely extraneous note field.

I'll work with this a little further as time allows. When
coding a command in elisp, nearly all things are possible.

-- 
Bob Newell
Honolulu, Hawai`i
- Via Gnus/BBDB/Org/Emacs/Linux