This works on XEmacs, I don’t know if this will work on GnuEmacs. Simple usage is walk throught text selecting region and pressing
C-M-m a to add them to list of multiple regions, when you are done, just press
... is normal Emacs command key sequence, like
C-M-m M-u will uppercase all regions. Code available at: http://lgarc.n_a_r_o_d.ru/xemacs-tips/multr.el.
ZajcevEvgeny has this in his ~/.emacs:
(require 'multr) (define-global-map (kbd "C-M-m") mr-regions-map)
See [[Icicles_-_Multiple_Regions?]] for another treatment of multiple regions. The regions are persistent. You can activate them or search them selectively.
Yet another treatment, written a long time ago – I haven’t evaluated how it compares to Icicles. Available at http://sites.google.com/site/steveyemacsutils/multi-select-el.
Lets you select noncontiguous regions with mouse or by regular expression. Provides some convenience functions for executing commands over the regions, and also manipulate all the regions as a single region (e.g. kill them all together).
Cool, but I tried (in XEmacs version) to avoid naroving, which causes user unexpected things if command you are executing perform some I/O in minibuffer, for example
C-M-m x M-x ispell-region RET, or
C-M-m x C-x r t, is it possible for GNU Emacs? --ZajcevEvgeny
t(this is the GnuEmacs equivalent of
zmacs-regions). You then just have to rely on the goodwill of package authors to perform operations in the marked region if TransientMarkMode is active. The narrowing solution, while ugly, avoids this problem. --LawrenceMitchell
multi-region-fetch-from-higlight– creates “regions” by looping through all highlighted regions (see HighlightTemporarily)
multi-region-fetch-from-face– same as above but use text with a certain face as input
multi-region-fetch-from-latest-isearch– use latest isearch string to create regions