all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1877: Request: Regular expressions that can match Unicode general categories
@ 2009-01-12 20:38 Derick Eddington
  2019-09-30  7:45 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Derick Eddington @ 2009-01-12 20:38 UTC (permalink / raw)
  To: bug-gnu-emacs

A new Scheme major mode I've made [1] requires regular expressions that
can match characters by their Unicode general categories.  It seems
Emacs regular expressions do not provide a way to do that directly (I'm
using GNU Emacs 23.0.60.1) (I couldn't find anything about it in the
Emacs documentation, emacswiki.org, or by asking on
help-gnu-emacs@gnu.org or in that list's archives).  So currently I
pre-compute character sets for the needed general categories (using
`get-char-code-property') and place these in their positions in the
larger regular expressions.  However, including character sets for every
general category I need makes the regular expressions too large for
Emacs and it errors trying to use them (some of them are pretty big); so
currently I'm not supporting all of them that are required.  Another
issue is these character sets are duplicated in different regular
expressions and since they're so large this causes code size bloat.
Another issue is I suspect matching character sets this large is not the
most time-efficient.

If Emacs regular expressions had some construct, similar to the existing
`\cC' one, that matched a character by its general category, I think
that would solve all the above issues nicely.  PLT Scheme regular
expressions have this ability [2].  

[1]
https://code.launchpad.net/~derick-eddington/scheme-mode/derick-.emacs.d
[2] http://docs.plt-scheme.org/reference/regexp.html

Thank you for your work on Emacs and for your time,

-- 
: Derick
----------------------------------------------------------------









^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-14  6:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 20:38 bug#1877: Request: Regular expressions that can match Unicode general categories Derick Eddington
2019-09-30  7:45 ` Lars Ingebrigtsen
2019-09-30  8:45   ` Eli Zaretskii
2021-11-14  6:28     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.