On Fri Jan 25 2013 Sriram Karra wrote:
> On Fri, Jan 25, 2013 at 8:34 PM, Roland Winkler <wink...@gnu.org> wrote:
>     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.
> 
> Nice.

I thought more about this, and I do not believe anymore that simply
replacing calls of (buffer-)substring with (buffer-)substring-no-properties
throughout BBDB is a meaningful strategy.

- In the future, it could be meaningful to deliberately introduce
  text properties into BBDB (here, I mean the database itself).
  So IMO BBDB should not remove text properties when operating on
  text strings originating from BBDB --unless these strings are passed on
  to an application for which it is known that it cannot handle text
  properties.

- Of course, right now BBDB does not have any means to deliberately
  introduce text properties into BBDB (nor means to use them in a
  meaningful way). IMO, all currently implemented ways of populating
  BBDB should explicitly avoid that BBDB gets randomly populated
  with text properties. For this, the above strategy of replacing
  calls of (buffer-)substring with (buffer-)substring-no-properties
  is not sufficient.

- Any code grabbing text strings for BBDB should explicitly consider
  text properties.

- Once BBDB starts using text properties deliberately, there should
  also be a user option that inhibits that text properties ever
  enter the database itself. This option will have to be implemented
  rather low-level, where text strings "are really added to the
  database".

  Yet all the text processing in between the grabbing of text
  strings and adding them to the database should preserve text
  properties.

What do you think?

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