Re: filtered execution ...
Aidan Kehoe <[email protected]> Fri, 25 Mar 2005 13:37:18 +0100
| Newsgroups | gmane.emacs.xemacs.mule |
|---|---|
| Message-ID | <[email protected]> |
Ar an ceathr=C3=BA l=C3=A1 is fiche de m=C3=AD M=C3=A1rta, scr=C3=ADobh = Tam=C3=A1s H=C3=A9ri:=20 > My question is really simple. Everybody knows the VI ":g" command. I= t > executes an "ex" command on every line that match a pattern in the > specified region (or the whole) of the text edited. >=20 > Is there something like this in xemacs? I don=E2=80=99t know of one, but three minutes=E2=80=99 hacking of apply-macro-to-region-lines, in macros.el, to take a regexp argument, and= to call re-search-forward as well as forward-line when moving on to the next action, should give you that functionality. See the documentation for start-kbd-macro for more information on macros; C-h k C-x (=20 If writing that is a problem for you, give me a shout, and I=E2=80=99ll g= et to it.=20 Also, as Stephen said last time, Mule is now mainstream, and xemacs-beta has a lot more traffic, so you=E2=80=99d be better served add= ressing your questions there :-) .=20 > I don't think vile or viper, the VI-emulation modes; but something mor= e > capable. Knowing the knowledge of our favourite editor; I could imagi= ne > a command that executes an another command (_not_ just replace; > "join-lines", for example) on each line matching a regexp. --=20 =E2=80=9CI, for instance, am gung-ho about open source because my family = is being held hostage in Rob Malda=E2=80=99s basement. But who fact-checks me, or = Enderle, when we say something in public? No-one!=E2=80=9D -- Danny O=E2=80=99Brie= n