ELPA Logo NonGNU ELPA: pinyin-isearch

pinyin-isearch Atom Feed

Description
Pinyin mode for isearch
Latest
pinyin-isearch-1.7.2.tar (.sig), 2026-Sep-02, 80.0 KiB
Maintainer
Anoncheg <vitalij@gmx.com>
Other versions:
development version
Website
https://github.com/Anoncheg1/pinyin-isearch
ELPA's Repository
CGit or Gitweb

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

Full description

build MELPA build MELPA Stable NonGNU ELPA

Eng | 中文

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

This package allow to search with pinyin without diacritical marks in pinyin text and chinese characters. Accurate regex for search created that match all variants.

Implemented as Emacs Isearch modification.

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
*-tests.el

Emacs versions support

Emacs 28.1 -> 30.2

Demonstation

Demo

Featurs

Features of Chinese characters search

Features of pinyin search

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

Activate: M-x pinyin-isearch-mode

Search: - C-s / C-r — Start forward/backward search - Type Pinyin (e.g., beijing) → highlights: 北京, Běi jīng, beijing - C-n / C-p — Navigate matches - RET — Confirm, jump to match

In other words: 1. M-x pinyin-isearch-mode [Activate] 2. C-s [Start search] 3. "beijing" [Type pinyin] → Highlights: 北京 and Běi jīng and beijing. 4. M-s h [Switch to characters-only] → Filter results to exact character matches only 5. M-s s [Enable strict mode] → More refined, exact-match-only results 6. C-n / C-p [Navigate matches] 7. RET [Confirm, jump to match]

Direct functions: M-x pinyin-isearch-forward/backward

Submode Controls (during search): | Key | Effect | |---------|--------| | M-s h | Characters-only search | | M-s p | Pinyin-only search | | M-s b | Both Pinyin & characters (default) | | M-s s | Toggle strict mode (exact matches only) | | M-s <f1> | Help reference |

Fallback: C-u C-s at any time → standard Emacs isearch (bypass Pinyin entirely)

For file-local activation, add this line at the begining of file:

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

Configuration

M-x customize-group pinyin-isearch

Option Default Effect
pinyin-isearch-default-mode both Default search type at mode start
pinyin-isearch-strict nil Global strictness setting
pinyin-isearch-full-fallback t Include Latin letter fallback
pinyin-isearch-fix-jumping-flag t Fix search-restart position behavior

Other packages

Donate, sponsor the author

You can sponsor author crypto money directly with crypto currencies: - BTC (Bitcoin) address: 1CcDWSQ2vgqv5LxZuWaHGW52B9fkT5io25

Old versions

pinyin-isearch-1.7.0.tar.lz2026-Aug-1114.2 KiB