On Thu Jan 24 2013 Sriram Karra wrote:
> On Wed, Jan 23, 2013 at 9:35 PM, Roland Winkler <wink...@gnu.org> wrote:
>     On Wed Jan 23 2013 Sriram Karra wrote:
>     > #("John" 0 4 (fontified nil))
>     Could you be a bit more specific? Which version of BBDB are
>     you talking about?
> 
> BBDB v3
> 
>     Is it your own experience, or are you talking about someone else?
> 
> Someone else's. I could not reproduce it myself. The report came
> to me because ASynK is not able to process this vector form, and a
> sync of BBDB to google was failing.

Thanks, now I understand better what you are talking about.

>     I guess that text properties can end up in the database itself if
>     you are using something like (buffer-)substring instead of
>     (buffer-)substring-no-properties when grabbing a fontified text
>     string that ends up in BBDB.
> 
> The function bbdb-divide-name uses substring to extract the first and last
> names. Let me check if changing that fixes the issue for the user who
> complained about that.

OK!

> At any rate given what you have mentioned, does it make sense to
> use the -no-properties versions consistently across the code base?
> I could see ~25 instances in total.

This would be too radical. For a command such as
bbdb-copy-records-as-kill it makes sense to copy text properties.
But I just went through the code and replaced occurences of
(buffer-)substring with (buffer-)substring-no-properties where
copying text properties appears not meaningful to me. I'll install
this patch shortly. The functions which do not copy text properties
are anyway simpler than the ones that do copy them. So there is no
need to call the latter unless the text properties should be kept.

Yet I want to ask: Where did the text string come from that was
decorated with some text property so that the text string including
its text properties ended up in BBDB? I cannot see how this could
happen with the "plain" code of BBDB 3. Could it be that the user who
reported this problem was using some customization to feed BBDB that
was grabbing text strings including their text properties? Then this
is what he or she should fix first.

Roland

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to