Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucla-cs!elroy.jpl.nasa.gov!zardoz.cpd.com!spsd!fiuggi!poy From: poy@fiuggi.IRVINE.DG.COM (David Poyourow) Newsgroups: comp.emacs Subject: Re: Location markers Message-ID: Date: 27 Sep 90 05:20:29 GMT References: Sender: news@irvine.dg.com (UseNet News Administrator) Organization: Data General, Irvine, CA Lines: 41 In-Reply-To: lrs@indetech.COM's message of 21 Sep 90 19:12:00 GMT > Is there a facility in emacs for placing simple location markers in an > emacs buffer to facilitate navigation? I'm aware of the TAGS > business, but I'm not interested in anything permanent. What I want > to keep track of is a few places in a buffer so I can hop around > readily. The gnuemacs I use has three functions that perform this. point-to-register register-to-point and view-register point-to-register uses keystrokes: C-x/ register-to-point uses keystrokes: C-xj each of these is followed by a letter so you can store up to 256 points. Even better, the points can be in different buffers, so that you can easily use this mechanism to quickly swap between buffers. When I work on a project that has several files, I define a function that loads all my buffers and sets points to their beginning, so everything is set to go in 4 seconds. An example follows: (fset 'ftcg "xshell (global-set-key "\M-:" 'ftcg) This puts my shell in one buffer. pointed to by register s It puts the file tcgi.c in another. pointed to by register i It puts the file tcg.c in another. pointed to by register m and lastly file tcg_struct.h. pointed to by register h I then bind the funtion to the Meta-colon key combo, and voila. -- David Poyourow, Data General Corp. UUCP: ..!uunet!spsd!poy 2603 Main St, #360, Irvine, CA 92714 ARPA: poy@sdsa01.IRVINE.DG.COM 714-432-8510 (at home) "Soon the whole world will be free and everyone will be able to choose between Pepsi and Coke."