diff --git a/lisp/init-utils.el b/lisp/init-utils.el index a337389e2..332ec4aaf 100644 --- a/lisp/init-utils.el +++ b/lisp/init-utils.el @@ -557,9 +557,12 @@ Copied from 3rd party package evil-textobj." ;; If the first character of input in ivy is ":" or ";", ;; remaining input is converted into Chinese pinyin regex. - ((string-match "[:\|;]" (substring str 0 1)) + ((or (and (string-match "[:\|;]" (substring str 0 1)) + (setq str (substring str 1 len))) + (and (buffer-name) (or (string= "*Org Agenda*" (buffer-name)) + (string-match "\\.org$" (buffer-name))))) (my-ensure 'pinyinlib) - (setq str (pinyinlib-build-regexp-string (substring str 1 len)))) + (setq str (pinyinlib-build-regexp-string str))) ;; If the first character of input in ivy is "/", ;; remaining input is converted to pattern to search camel case word