https://github.com/tpapp/buffer-unique-id
Generating strings that are unique in an Emacs buffer.
https://github.com/tpapp/buffer-unique-id
Last synced: 5 months ago
JSON representation
Generating strings that are unique in an Emacs buffer.
- Host: GitHub
- URL: https://github.com/tpapp/buffer-unique-id
- Owner: tpapp
- License: gpl-3.0
- Created: 2015-09-03T13:16:22.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-03T13:36:50.000Z (almost 11 years ago)
- Last Synced: 2026-01-20T20:04:17.913Z (5 months ago)
- Language: Emacs Lisp
- Size: 156 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* Overview
The function =insert-buffer-unique-id= inserts a random string, for example =x195a=. The starting string (=x= by default), the number of characters that follow (4 by default) and the string they are picked from can be customized.
The unique id is generated randomly, retrying if it is already present in the buffer. This is not a sophisticated algorithm and may fail or be inefficient in corner cases, but should suffice for the most common use case.
I wrote this when I was dealing with an R file which had many small statistical models, which I had to keep track of, and naming them was becoming tiresome.
* Bugs
Please report them using the [[https://github.com/tpapp/buffer-unique-id/issues][issue tracker on Github]].