NonGNU ELPA - pinyin-isearch

pinyin-isearch Atom Feed

Description
Pinyin mode for isearch
Latest
pinyin-isearch-1.7.0.tar (.sig), 2026-Aug-11, 70.0 KiB
Maintainer
github.com/Anoncheg1,codeberg.org/Anoncheg
Website
https://github.com/Anoncheg1/pinyin-isearch
Browse ELPA's repository
CGit or Gitweb
Badge

To install this package from Emacs, use package-install or list-packages.

Full description

build MELPA build MELPA Stable

Eng | 中文

pinyin-isearch - Emacs package for toneless pinyin search in pinyin and Chinese characters.

Allow to search with pinyin without diacritical marks in pinyin text. With few characters you will find all variants.

Emacs Isearch "submode" that replace isearch-regexp-function to generate regex for search.

For example: to find "Shànghǎi" and "上海" in text you just type: C-s shanghai.

Based on Emacs "chinese-sisheng", "chinese-py", "chinese-punct".

Files

pinyin-isearch.el
 ├─ pinyin-isearch-pinyin.el (→ pinyin-isearch-loaders.el)
 ├─ pinyin-isearch-chars.el (→ pinyin-isearch-loaders.el)
 └─ pinyin-isearch-loaders.el

Demonstation

Demo

Featurs

  • should not conflict with other isearch modes
  • fix isearch jumping without return.
  • fallback to search for normal latin text by default

Features of Chinese characters search

  • search from the first character entered.
  • punctulation Chinese search with ascii charactes: .,[]<>()$-"` and much more.
  • accurate dissasemble to all possible variants.

Features of pinyin search

  • white spaces are ignored between syllables
  • tone or diacritical mark required only in first syllable in text: Zhēn de ma

Installation

from MELPA

1) Add to ~/.emacs

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)

2) Install via M-x package-install RET cui RET~ or ~M-x package-list-packages

from GitHub or Codeberg

1) git clone https://repo/user/pinyin-isearch

2) Add to ~/.emacs

(add-to-list 'load-path "/path-to/pinyin-isearch/")
(require 'pinyin-isearch)
(pinyin-isearch-load) ;; force loading (optional) before mode

Usage

After C-s/r in isearch mode: - M-s h to activate Chinese characters seearch only submode. - M-s p to activate pinyin search only submode. - M-s s to activate strict pinyin and Chinese characters submode. - M-s u to activate strict Chinese characters isearch submode. - M-s n to activate default Pinyin-isearch mode. - M-s r to activate standard search.

or with M-x pinyin-isearch-forward/backward

You can set this mode by default per file with:

;-*- mode: pinyin-isearch; -*-

Configuration

M-x customize-group pinyin-isearch

Variable pinyin-isearch-default-mode used to set default mode for C-s/r isearch: pinyin only or Chinese characters only or some strict version.