jsulliva@cvbnet.UUCP (Jeff Sullivan, x4096 MS 4-2) (03/15/90)
Is there a way to set up GNU emacs to "remember" the last
field(s) you typed? For example:
search-forward string1
query-replace string1 with string2
In the above case, if string1 were "remembered", I wouldn't
have to type it in again. This is a nice feature that I have
found in Freemacs (a GNU emacs work-alike for the PC).
Thanks in advance,
-Jeffmdb@ESD.3Com.COM (Mark D. Baushke) (03/17/90)
On 15 Mar 90 15:01:04 GMT, jsulliva@cvbnet.UUCP (Jeff Sullivan) said:
Jeff> Is there a way to set up GNU emacs to "remember" the last
Jeff> field(s) you typed? For example:
Jeff> search-forward string1
Jeff> query-replace string1 with string2
Jeff> In the above case, if string1 were "remembered", I wouldn't
Jeff> have to type it in again. This is a nice feature that I have
Jeff> found in Freemacs (a GNU emacs work-alike for the PC).
Jeff> Thanks in advance,
Jeff> -Jeff
I believe you are looking for the function repeat-complex-command (by
default bound to 'C-x ESC').
Enjoy!
--
Mark D. Baushke
Internet: mdb@ESD.3Com.COM
UUCP: {3comvax,auspex,sun}!bridge2!mdbmoss@ibis.cs.umass.edu (Eliot Moss) (03/19/90)
I note that an earlier reply, suggesting that one use a command replay feature, does *not* do what was requested. Specifically, the request was something like: if I just searched for some string s1 and would now like to replace all s1's with s2, is there any way I can do this without having to re-type s1 to the "replace" command? I think the request is for a feature not present in GNU Emacs and which would in fact be quite convenient. I can think of two sets of functionality of interest: 1) Keep track of the last value of typed interactive arguments. Even better, keep track of the last value of the first, second, third, etc., argument independently, and when in the nth field give an easy way to insert the last value of the nth argument in the previous command that had n or more arguments. 2) Possibly even more appealing would be to keep a "history" of typed arguments, with a user-controllable number of entries, and simple commands to go through that history (similar to the emacs style command line recall facility of ksh and (I believe) bash). I'm not up for implementing it myself, and one problem is that this requires global changes, or ones fairly deep in the system, but it would be useful ... -- J. Eliot B. Moss, Assistant Professor Department of Computer and Information Science Lederle Graduate Research Center University of Massachusetts Amherst, MA 01003 (413) 545-4206; Moss@cs.umass.edu