Support narrowing with Chinese pinyin via pattern-transformer
#2601
Replies: 12 comments
-
太阳 ***@***.***> writes:
1. ( ) multipart/mixed (*) text/html
Hi, I'd like to use Chinese pinyin to narrow candidates, so if I enter wenjian, helm will not only match files (or buffers etc) like wenjian.org, but also files like 文件.org。
The following is how I archive that:
1. I add a new variable helm-pattern-transformer-alist.
(defvar helm-pattern-transformer-alist
'()
"An alist of regex building functions for each source.
Each key is the source name:
Each value is a function that should take a string and return a
valid regex.")
2. I change function helm-process-pattern-transformer to use helm-pattern-transformer-alist in the following way
(defun helm-process-pattern-transformer (pattern source)
"Execute pattern-transformer attribute function(s) on PATTERN in SOURCE."
(let* ((name (assoc-default 'name source))
(transformer (assoc-default name helm-pattern-transformer-alist)))
(helm-aif (or transformer
(assoc-default 'pattern-transformer source))
(helm-apply-functions-from-source source it pattern)
pattern)))
3. If you want a particular source to support narrowing with Chinese pinyin, do this
(add-to-list 'helm-pattern-transformer-alist '("Buffers" . helm-pyim-to-utf8))
My questions are:
1. Is using pattern-transformer in this way the correct way?
Yes it is correct but IMHO there is no need to modify helm source
code, see below.
2. If the answer to the first question is no, how should I do to
archive my goal?
What about this in your init file?
(cl-defmethod helm-setup-user-source ((source helm-source-buffers))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8))
This will affect helm-buffers-list and helm-mini.
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Thanks very much. I tried your method with some sources, but it didn't work in some of them. Following is what I did. It worked in (cl-defmethod helm-setup-user-source ((source helm-source-buffers))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8))
(cl-defmethod helm-setup-user-source ((source helm-moccur-class))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8))
(cl-defmethod helm-setup-user-source ((source helm-source-basic-bookmarks))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8))
(cl-defmethod helm-setup-user-source ((source helm-recentf-source))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8))
(cl-defmethod helm-setup-user-source ((source helm-source-ffiles))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8)) Also I found two problems in The file-error happened in function The second problem is because of this line, where it uses path (based on helm-pattern, so it's transformed). I'm not sure, but maybe making path base on |
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
Thanks very much.
I tried your method with some sources, but it didn't work in some of them. Following is what I did. It worked in helm-source-buffers and helm-moccur-class, but not for the other three.
(cl-defmethod helm-setup-user-source ((source helm-source-basic-bookmarks))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8))
For this one it can't work because the source is already defined in
helm-bookmarks, use this instead:
(helm-set-attr 'pattern-transformer #'helm-pyim-to-utf8 helm-source-bookmarks)
(cl-defmethod helm-setup-user-source ((source helm-recentf-source))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8))
Same for this one, use this instead:
(helm-set-attr 'pattern-transformer #'helm-pyim-to-utf8 helm-source-recentf)
(cl-defmethod helm-setup-user-source ((source helm-source-ffiles))
(setf (slot-value source 'pattern-transformer) 'helm-pyim-to-utf8))
For helm-find-files, it is more complex (fuzzy matching), as the transformation of
pattern occurs in the candidates function, so I think pattern-transformer is
not a solution here, hence the errors you have.
Could you provide the function helm-pyim-to-utf8?
Thanks.
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Thanks. You're so kind and patient! Here is
|
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
1. ( ) multipart/mixed (*) text/html
Thanks. You're so kind and patient!
Here is helm-pyim-to-utf8 (it depnds on another package pyim)
(defun helm-pyim-to-utf8 (str)
(cond ((equal 0 (length str))
str)
(t
(pyim-cregexp-build str 2))))
Thanks, the problem is this doesn't handle fuzzy, so helm-find-files is
trying to transform the regexp returned by helm-pyim-to-utf8 to a fuzzy
regexp!
(pyim-cregexp-build "文件.org" 2)
=>"\\(?:文件.\\(?:org\\|[偶区吽呕哦喔噢嚄怄欧殴沤瓯耦藕讴鸥][乳人亻仁仍仞任偌儒入冉冗刃喏嚅嚷壤壬如妊娆孺容嵘弱忍恁惹戎扔扰揉攘日朊枘染柔桡棁榕汝洳润溶溽濡热然熔燃狨瑞瓤睿禳稔穰箬糅纫纴绒绕缛肉肜芮苒若茸茹荏荛荣葚蓉蓐蕊蕤薷蚋蚺蛲蝾融蠕衽褥襦认让讱赁蹂轫软辱铷锐闰阮鞣韧颥饪饶髯鸮][丐丨个乖乾亘亢仡估伽佝供倌傀光公共关冈冠冮刚刮刽刿剐割功勾匦匮卦古句各合告呙呱呷咕咖咣咯哌哏哥哽哿嗝嘎嘏噶囗固国圪圭坩垓垢埂埚塥够夬夹妫姑媾孤宄官宫寡尕尜尬尴岗岣崞崮工巩帼干广庋庚廾弓彀归怪恭惯感戆戈戤扛扞拐括拱挂掴掼搁搞搿擀改攻故敢旮旰晷更杆杠杲构果枸柑柜栝根格桂桄桧梏梗棍棺椁概榖槁槔橄歌毂毌氿汞汩沟沩沽泔涡涫淦港溉滚澉灌炅炔牁牯牿犷狗猓玕珙琯瑰瓘瓜甘疙疳痼癸皈皋盖盥睾瞽矜矸砝硅硌磙秆稿竿笱筻箍管篙篝簋粿糕红纥纲纶绀给绠绲缑缟缸罐罟罡羔羹耕耿聒肛肝股肱胍胱-胳脘脶膈膏臌舡舸艮芥苟苷茛莞菇菏菰葛藁虢虼蚣蛄蛊蛤蜗蜾蝈衮袼裹褂观规觏觚觥诂诖诟诡该诰谷贡购贯贵贾赅赓赣赶跟跪躬轧轨轱辊辜过逛遘郜郭酐酤钆钙钢钩钴铬锅锆锢镉镐闺阁阖陔隔雇革鞲顾颃颈颌馃馆馘骨骼髂高鬲鬼鲑鲠鲧鲴鳏鳜鸪鸹鸽鹄鹘鹳鼓龚龟]\\)\\)"
(helm--mapconcat-pattern (pyim-cregexp-build "文件.org" 2))
=> "[^\\]*?\\\\[^(]*?([^?]*?\\?[^:]*?:[^文]*?文[^件]*?件
[^.]*?\\.[^\\]*?\\\\[^(]*?([^?]*?\\?[^:]*?:[^o]*?o[^r]*?r[^g]*?g[^\\]*?\\\\[^|]*?|[^[]*?\\[[^
偶]*?偶[^区]*?区[^吽]*?吽[^呕]*?呕[^哦]*?哦[^喔]*?喔[^噢]*?噢[^嚄]*?嚄[^
怄]*?怄[^欧]*?欧[^殴]*?殴[^沤]*?沤[^瓯]*?瓯[^耦]*?耦[^藕]*?藕[^讴]*?讴[^
鸥]*?鸥[^]]*?][^[]*?\\[[^乳]*?乳[^人]*?人[^亻]*?亻[^仁]*?仁[^仍]*?仍
[^仞]*?仞[^任]*?任[^偌]*?偌[^儒]*?儒[^入]*?入[^冉]*?冉[^冗]*?冗[^刃]*?刃
[^喏]*?喏[^嚅]*?嚅[^嚷]*?嚷[^壤]*?壤[^壬]*?壬[^如]*?如[^妊]*?妊[^娆]*?娆
[^孺]*?孺[^容]*?容[^嵘]*?嵘[^弱]*?弱[^忍]*?忍[^恁]*?恁[^惹]*?惹[^戎]*?戎
[^扔]*?扔[^扰]*?扰[^揉]*?揉[^攘]*?攘[^日]*?日[^朊]*?朊[^枘]*?枘[^染]*?染
[^柔]*?柔[^桡]*?桡[^棁]*?棁[^榕]*?榕[^汝]*?汝[^洳]*?洳[^润]*?润[^溶]*?溶
[^溽]*?溽[^濡]*?濡[^热]*?热[^然]*?然[^熔]*?熔[^燃]*?燃[^狨]*?狨[^瑞]*?瑞
[^瓤]*?瓤[^睿]*?睿[^禳]*?禳[^稔]*?稔[^穰]*?穰[^箬]*?箬[^糅]*?糅[^纫]*?纫
[^纴]*?纴[^绒]*?绒[^绕]*?绕[^缛]*?缛[^肉]*?肉[^肜]*?肜[^芮]*?芮[^苒]*?苒
[^若]*?若[^茸]*?茸[^茹]*?茹[^荏]*?荏[^荛]*?荛[^荣]*?荣[^葚]*?葚[^蓉]*?蓉
[^蓐]*?蓐[^蕊]*?蕊[^蕤]*?蕤[^薷]*?薷[^蚋]*?蚋[^蚺]*?蚺[^蛲]*?蛲[^蝾]*?蝾
[^融]*?融[^蠕]*?蠕[^衽]*?衽[^褥]*?褥[^襦]*?襦[^认]*?认[^让]*?让[^讱]*?讱
[^赁]*?赁[^蹂]*?蹂[^轫]*?轫[^软]*?软[^辱]*?辱[^铷]*?铷[^锐]*?锐[^闰]*?闰
[^阮]*?阮[^鞣]*?鞣[^韧]*?韧[^颥]*?颥[^饪]*?饪[^饶]*?饶[^髯]*?髯[^鸮]*?鸮
[^]]*?][^[]*?\\[[^丐]*?丐[^丨]*?丨[^个]*?个[^乖]*?乖[^乾]*?乾[^亘]*?亘[^
亢]*?亢[^仡]*?仡[^估]*?估[^伽]*?伽[^佝]*?佝[^供]*?供[^倌]*?倌[^傀]*?傀[^
光]*?光[^公]*?公[^共]*?共[^关]*?关[^冈]*?冈[^冠]*?冠[^冮]*?冮[^刚]*?刚[^
刮]*?刮[^刽]*?刽[^刿]*?刿[^剐]*?剐[^割]*?割[^功]*?功[^勾]*?勾[^匦]*?匦[^
匮]*?匮[^卦]*?卦[^古]*?古[^句]*?句[^各]*?各[^合]*?合[^告]*?告[^呙]*?呙[^
呱]*?呱[^呷]*?呷[^咕]*?咕[^咖]*?咖[^咣]*?咣[^咯]*?咯[^哌]*?哌[^哏]*?哏[^
哥]*?哥[^哽]*?哽[^哿]*?哿[^嗝]*?嗝[^嘎]*?嘎[^嘏]*?嘏[^噶]*?噶[^囗]*?囗[^
固]*?固[^国]*?国[^圪]*?圪[^圭]*?圭[^坩]*?坩[^垓]*?垓[^垢]*?垢[^埂]*?埂[^
埚]*?埚[^塥]*?塥[^够]*?够[^夬]*?夬[^夹]*?夹[^妫]*?妫[^姑]*?姑[^媾]*?媾[^
孤]*?孤[^宄]*?宄[^官]*?官[^宫]*?宫[^寡]*?寡[^尕]*?尕[^尜]*?尜[^尬]*?尬[^
尴]*?尴[^岗]*?岗[^岣]*?岣[^崞]*?崞[^崮]*?崮[^工]*?工[^巩]*?巩[^帼]*?帼[^
干]*?干[^广]*?广[^庋]*?庋[^庚]*?庚[^廾]*?廾[^弓]*?弓[^彀]*?彀[^归]*?归[^
怪]*?怪[^恭]*?恭[^惯]*?惯[^感]*?感[^戆]*?戆[^戈]*?戈[^戤]*?戤[^扛]*?扛[^
扞]*?扞[^拐]*?拐[^括]*?括[^拱]*?拱[^挂]*?挂[^掴]*?掴[^掼]*?掼[^搁]*?搁[^
搞]*?搞[^搿]*?搿[^擀]*?擀[^改]*?改[^攻]*?攻[^故]*?故[^敢]*?敢[^旮]*?旮[^
旰]*?旰[^晷]*?晷[^更]*?更[^杆]*?杆[^杠]*?杠[^杲]*?杲[^构]*?构[^果]*?果[^
枸]*?枸[^柑]*?柑[^柜]*?柜[^栝]*?栝[^根]*?根[^格]*?格[^桂]*?桂[^桄]*?桄[^
桧]*?桧[^梏]*?梏[^梗]*?梗[^棍]*?棍[^棺]*?棺[^椁]*?椁[^概]*?概[^榖]*?榖[^
槁]*?槁[^槔]*?槔[^橄]*?橄[^歌]*?歌[^毂]*?毂[^毌]*?毌[^氿]*?氿[^汞]*?汞[^
汩]*?汩[^沟]*?沟[^沩]*?沩[^沽]*?沽[^泔]*?泔[^涡]*?涡[^涫]*?涫[^淦]*?淦[^
港]*?港[^溉]*?溉[^滚]*?滚[^澉]*?澉[^灌]*?灌[^炅]*?炅[^炔]*?炔[^牁]*?牁[^
牯]*?牯[^牿]*?牿[^犷]*?犷[^狗]*?狗[^猓]*?猓[^玕]*?玕[^珙]*?珙[^琯]*?琯[^
瑰]*?瑰[^瓘]*?瓘[^瓜]*?瓜[^甘]*?甘[^疙]*?疙[^疳]*?疳[^痼]*?痼[^癸]*?癸[^
皈]*?皈[^皋]*?皋[^盖]*?盖[^盥]*?盥[^睾]*?睾[^瞽]*?瞽[^矜]*?矜[^矸]*?矸[^
砝]*?砝[^硅]*?硅[^硌]*?硌[^磙]*?磙[^秆]*?秆[^稿]*?稿[^竿]*?竿[^笱]*?笱[^
筻]*?筻[^箍]*?箍[^管]*?管[^篙]*?篙[^篝]*?篝[^簋]*?簋[^粿]*?粿[^糕]*?糕[^
红]*?红[^纥]*?纥[^纲]*?纲[^纶]*?纶[^绀]*?绀[^给]*?给[^绠]*?绠[^绲]*?绲[^
缑]*?缑[^缟]*?缟[^缸]*?缸[^罐]*?罐[^罟]*?罟[^罡]*?罡[^羔]*?羔[^羹]*?羹[^
耕]*?耕[^耿]*?耿[^聒]*?聒[^肛]*?肛[^肝]*?肝[^股]*?股[^肱]*?肱[^胍]*?胍[^
胱]*?胱[^-]*?-[^胳]*?胳[^脘]*?脘[^脶]*?脶[^膈]*?膈[^膏]*?膏[^臌]*?臌
[^舡]*?舡[^舸]*?舸[^艮]*?艮[^芥]*?芥[^苟]*?苟[^苷]*?苷[^茛]*?茛[^莞]*?莞
[^菇]*?菇[^菏]*?菏[^菰]*?菰[^葛]*?葛[^藁]*?藁[^虢]*?虢[^虼]*?虼[^蚣]*?蚣
[^蛄]*?蛄[^蛊]*?蛊[^蛤]*?蛤[^蜗]*?蜗[^蜾]*?蜾[^蝈]*?蝈[^衮]*?衮[^袼]*?袼
[^裹]*?裹[^褂]*?褂[^观]*?观[^规]*?规[^觏]*?觏[^觚]*?觚[^觥]*?觥[^诂]*?诂
[^诖]*?诖[^诟]*?诟[^诡]*?诡[^该]*?该[^诰]*?诰[^谷]*?谷[^贡]*?贡[^购]*?购
[^贯]*?贯[^贵]*?贵[^贾]*?贾[^赅]*?赅[^赓]*?赓[^赣]*?赣[^赶]*?赶[^跟]*?跟
[^跪]*?跪[^躬]*?躬[^轧]*?轧[^轨]*?轨[^轱]*?轱[^辊]*?辊[^辜]*?辜[^过]*?过
[^逛]*?逛[^遘]*?遘[^郜]*?郜[^郭]*?郭[^酐]*?酐[^酤]*?酤[^钆]*?钆[^钙]*?钙
[^钢]*?钢[^钩]*?钩[^钴]*?钴[^铬]*?铬[^锅]*?锅[^锆]*?锆[^锢]*?锢[^镉]*?镉
[^镐]*?镐[^闺]*?闺[^阁]*?阁[^阖]*?阖[^陔]*?陔[^隔]*?隔[^雇]*?雇[^革]*?革
[^鞲]*?鞲[^顾]*?顾[^颃]*?颃[^颈]*?颈[^颌]*?颌[^馃]*?馃[^馆]*?馆[^馘]*?馘
[^骨]*?骨[^骼]*?骼[^髂]*?髂[^高]*?高[^鬲]*?鬲[^鬼]*?鬼[^鲑]*?鲑[^鲠]*?鲠
[^鲧]*?鲧[^鲴]*?鲴[^鳏]*?鳏[^鳜]*?鳜[^鸪]*?鸪[^鸹]*?鸹[^鸽]*?鸽[^鹄]*?鹄
[^鹘]*?鹘[^鹳]*?鹳[^鼓]*?鼓[^龚]*?龚[^龟]*?龟
[^]]*?][^\\]*?\\\\[^)]*?)[^\\]*?\\\\[^)]*?)"
So this can't work, try to see if prepending a space before the basename
in the Helm pattern matches your file, i.e. "/home/you/ 文件.org"
instead of "/home/you/文件.org". This will have for effect to abort
fuzzy matching and switches to regexp matching.
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Thanks. I'll try to understand the cause and try what you recommended. |
Beta Was this translation helpful? Give feedback.
-
Also, I had another idea to use The idea is for candidate that contains Chinese character, transform it to Chinese pinyin. For example, 文件.org will be transformed to wen文jian件.org, so I can use wenjian to match this file. Here is the transformer (depends on pyim too. The complete modification is here. At that time I didn't know that I can use (defun helm-replace-chinese (arg)
(let ((cand (or (car-safe arg)
arg)))
(mapconcat (lambda (c)
(cond
((eq (char-charset c) 'ascii)
(char-to-string c))
(t
(let ((pinyin (pyim-pymap-cchar2py-get c)))
(if pinyin
(concat (nth 0 pinyin) (char-to-string c))
(char-to-string c))))))
cand)))
;; it does not handle candidates with form (disp . real)
(defun helm-chinese-candidate-transformer (args)
(cl-loop for arg in args
collect (cons arg (helm-replace-chinese arg))
)) I thought this way may be better (fuzzy match will not be affected(right?) and no Regular expression too big problem raised sometimes in the pattern-transformer method), but it just couldn't match Chinese characters. |
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
I thought this way may be better (fuzzy match will not be
affected(right?) and no Regular expression too big problem raised
sometimes in the pattern-transformer method), but it just couldn't
match Chinese characters.
Not sure to understand, what did you type at prompt at this time?
Chinese or normal string?
Can you give me some hints about this method? Thanks.
I have a better idea that may work (and would be much faster). Here is
what I am using in my helm config file (in the helm-setup-user-source
defmethod) to match accentued characters e.g. typing "telechargement"
match "Téléchargement":
(helm-aif (slot-value source 'match)
(setf (slot-value source 'match)
(append it
'((lambda (candidate)
(string-match (concat (helm-basedir helm-input)
(char-fold-to-regexp
(helm-basename helm-input)))
candidate))))))
Perhaps you could do the same, something like:
(helm-aif (slot-value source 'match)
(setf (slot-value source 'match)
(append it
'((lambda (candidate)
(string-match (concat (helm-basedir helm-input)
(helm-replace-chinese
(helm-basename helm-input)))
candidate))))))
Is this working for you?
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
太阳 ***@***.***> writes:
Ah! Forget to mention that this function is correct but you forget the
separator ("") in mapconcat, so it may fail silently which would explain
why your method doesn't work.
… (defun helm-replace-chinese (arg)
(let ((cand (or (car-safe arg)
arg)))
(mapconcat (lambda (c)
(cond
((eq (char-charset c) 'ascii)
(char-to-string c))
(t
(let ((pinyin (pyim-pymap-cchar2py-get c)))
(if pinyin
(concat (nth 0 pinyin) (char-to-string c))
(char-to-string c))))))
cand)))
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Thierry Volpiatto ***@***.***> writes:
太阳 ***@***.***> writes:
> I thought this way may be better (fuzzy match will not be
> affected(right?) and no Regular expression too big problem raised
> sometimes in the pattern-transformer method), but it just couldn't
> match Chinese characters.
Not sure to understand, what did you type at prompt at this time?
Chinese or normal string?
> Can you give me some hints about this method? Thanks.
I have a better idea that may work (and would be much faster). Here is
what I am using in my helm config file (in the helm-setup-user-source
defmethod) to match accentued characters e.g. typing "telechargement"
match "Téléchargement":
(helm-aif (slot-value source 'match)
(setf (slot-value source 'match)
(append it
'((lambda (candidate)
(string-match (concat (helm-basedir helm-input)
(char-fold-to-regexp
(helm-basename helm-input)))
candidate))))))
Perhaps you could do the same, something like:
(helm-aif (slot-value source 'match)
(setf (slot-value source 'match)
(append it
'((lambda (candidate)
(string-match (concat (helm-basedir helm-input)
(helm-replace-chinese
(helm-basename helm-input)))
candidate))))))
Sorry, instead of helm-replace-chinese you should use IIUC a function
that make a chinese regexp.
… Is this working for you?
--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Thierry Volpiatto ***@***.***> writes:
Thierry Volpiatto ***@***.***> writes:
> 太阳 ***@***.***> writes:
>
>> I thought this way may be better (fuzzy match will not be
>> affected(right?) and no Regular expression too big problem raised
>> sometimes in the pattern-transformer method), but it just couldn't
>> match Chinese characters.
>
> Not sure to understand, what did you type at prompt at this time?
> Chinese or normal string?
>
>> Can you give me some hints about this method? Thanks.
>
> I have a better idea that may work (and would be much faster). Here is
> what I am using in my helm config file (in the helm-setup-user-source
> defmethod) to match accentued characters e.g. typing "telechargement"
> match "Téléchargement":
>
> (helm-aif (slot-value source 'match)
> (setf (slot-value source 'match)
> (append it
> '((lambda (candidate)
> (string-match (concat (helm-basedir helm-input)
> (char-fold-to-regexp
> (helm-basename helm-input)))
> candidate))))))
>
> Perhaps you could do the same, something like:
>
> (helm-aif (slot-value source 'match)
> (setf (slot-value source 'match)
> (append it
> '((lambda (candidate)
> (string-match (concat (helm-basedir helm-input)
> (helm-replace-chinese
> (helm-basename helm-input)))
> candidate))))))
Sorry, instead of helm-replace-chinese you should use IIUC a function
that make a chinese regexp.
Sorry, this is wrong as well, finally I could match your file "文件.org"
with this:
(helm-aif (slot-value source 'match)
(setf (slot-value source 'match)
(append it
'((lambda (candidate)
(string-match helm-input
(concat (helm-basedir candidate)
(helm-replace-chinese
(helm-basename candidate)))))))))
Here what I did (correct me if wrong):
1) create file "/home/me/tmp/文件.org".
2) Launch helm-find-files.
3) type /home/me/tmp/we
and helm matched you file "文件.org".
Is it what you want to achieve?
…--
Thierry
|
Beta Was this translation helpful? Give feedback.
-
Normal string.
Great! Thanks! It's almost what I want to achieve, I just need to find a better Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'd like to use Chinese pinyin to narrow candidates, so if I enter wenjian, helm will not only match files (or buffers etc) like wenjian.org, but also files like 文件.org。
The following is how I archive that:
helm-pattern-transformer-alist
.helm-process-pattern-transformer
to usehelm-pattern-transformer-alist
in the following wayMy questions are:
I have also tried to use candidate-transformer to transform Chinese character to Chinese pinyin, but haven't make it work as expected so far.
Thanks and welcome any feedback.
Beta Was this translation helpful? Give feedback.
All reactions