"Roland Winkler" <wink...@gnu.org> writes:

> On Sat May 30 2015 Feng Shu wrote:
>> This patch make `string-match' used by `bbdb-search'
>> customizable. I use this feature to search Chinese contacts names with
>> pinyin. this is a very useful feature for CJK users.
>
> ...I am surprised: what is the purpose of replacing string-match
> with something else?  (The emacs package chinese-pyim that you are
> using seems to be documented in chinese only, which does not help
> me.)
>

I just use `pyim-hanzi2pinyin' function, which do such work:

  "你好 BBDB" -> "nihao BBDB"

so, what I want to do is like this, for example:
1. I have a contact record, which name is "你好 BBDB"
2. If use `string-match', I need type "你好" to search this record, which
need to use Chinese input method and not convenience.
3. if I use this custom, i just type "nihao", then the contact records
will be found. just type ascii.

Another toy example is that you can use "az" to match "affffggggzzkkkz",
at bbdb-search's condition, this is useful.

Maybe "string match" is not a good name for this feature.

> I can imagine that CJK might sometimes require different solutions
> than, say, western languages.  Yet I am not sure whether it is the
> right approach to then introduce custom variables like
> bbdb-string-match-function to replace string-match in (only) certain
> instances by something else.
>

Another approach is auto add "AKA" field with a fuction, the problem of
this approach is that, many different chinese-char have same pinyin, so
I need deal with many many conflites when I use this approach.


> I mean: string-match is used by emacs in a zillion of places.  If
> for some reason this built-in function does not do what you need,
> you might want to discuss at emacs-devel whether this can be
> improved in a way that will benefit all emacs code.  Or loading the
> package chinese-pyim could effectively replace string-match.
> (Yet this only works at the lisp level.  There might also be
> instances when string-match is called at the C level.)
>
> Roland

The above `string-match' only meanful in `bbdb-search',  meanless in
other situation.


-- 



------------------------------------------------------------------------------
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to