lrs@indetech.COM (Lynn Slater) (09/22/90)
> 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. I have a file, locations.el that keeps stacks of markers and allows navigation via them. At the least, it allows "backtracking" from tags where you to go where you were before the last tag entry. The functions are written for general programatic and keyboard use and have been used in things such as ada mode and sql mode. Write for a copy. =============================================================== Lynn Slater -- lrs@indetech.com or {sun, ames, pacbell}!indetech!lrs 42075 Lawrence Place, Fremont Ca 94538 Office (415) 438-2048; Home (415) 793-1864; Fax (415) 438-2034 ===============================================================
poy@fiuggi.IRVINE.DG.COM (David Poyourow) (09/27/90)
> 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."
davis@pacific.mps.ohio-state.edu ("John E. Davis") (09/28/90)
In article <POY.90Sep26222029@fiuggi.IRVINE.DG.COM> poy@fiuggi.IRVINE.DG.COM (David Poyourow) writes: > 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 > . > . [rest deleted] There is one problem with this that I'd like to see fixed. Suppose that I have two windows open associated with two distinct buffers. If have a point of the buffer I am not currently using (in the other window) stored in a register, then upon jumping to this register position, the window I am currently using switches to that buffer even though the other window is associated with it. The result is that I have two windows viewing the same buffer. What I'd like to have is for the other window to scroll to the stored buffer position then have the point switch to it, leaving my window/buffer configuration fixed. Of course if I have a third buffer not currently in either of the two windows, then the retgister-to-point function bahaves properly by switching the current window to the third buffer. -- John bitnet: davis@ohstpy internet: davis@pacific.mps.ohio-state.edu