On Fri, 30 Jan 2004, tzz@lifelogs.com wrote: On Thu, 29 Jan 2004, rms@gnu.org wrote: > >> You are probably right. But I think the biggest problem here will >> be finding th right rules for this command to follow, which will >> give results that the users like and find natural. > > I guess I'll produce something as a starting point and see how > people like it. I'll patch next-error if needed, and occur > definitely will need to set the right variable. > >> How about goto-next-locus? > > OK, I'll defalias to goto-next-locus and next-match. Attached is a patch for replace.el (occur) and compile.el (next-error). I also defalias as mentioned above. It tries to be smart about the current buffer, to simulate what next-error does already. It also handles negative and positive arguments as usual. It does not handle the universal prefix argument. If occur has not been loaded at all (checked by soft-intern of "occur-last-buffer") next-error behaves exactly as before, looking at grep and compile output. I'm sure the code needs corrections, so feel free to critique. The diff should have been done at the same, level too... It should be enough to get the idea across. Thanks Ted