Richard Stallman writes: > Sometime in the past year or so compilation-mode started acting very > strangely for me with a CVS-built emacs. First, if I use next-error > while compilation is still going on, I will often, after a moment or > two, see the point jump unpredictably in the file it takes me to. > > Have you figured out any more about this? Well, I haven't figured out much new, but it still happens. I haven't rebuilt Emacs since I first reported the problem, of course. Here's some more detail. I have a compilation that produces the enclosed errors. It's recompiling the same file and issuing errors twice for it in this case because it's a bootstrap process, but I'm positive that I've seen the behavior when errors only appear once. If I hit `f4' (bound to compilation-next-error for me) once, it goes to the first error in the indicated source window. Then when the 2nd batch of errors show up in the compilation window, the point in the open source window moves to the very last error in that window, without any help from me. The point in the *compilation* buffer remains where it was. If I repeat the above process, but issue a build command that repeats 6 times, and then I hit `f4' *again* during compilation, the point moves to the 2nd error in the source window and then after only a very brief pause, jumps to the final error. I haven't yet adjusted my compilation-error-regexp-alists to the new scheme, so it's possible that has somethign to do with it. > I note that now there appears to be a two-layer scheme with > compilation-error-regexp-alist-alist that renders my old settings > invalid. I can adjust what I'm doing, but discovering what to do was > a struggle. Is there a way to provide a better transition experience > for people who upgrade? > > Can you tell us any more about where the difficulty was? Well, my usual experience of being able to browse compilation errors just stopped working, and I had to dig through the docs for compilation-next-error to find out that the whole world was different. It would have been nicer if the system had detected that I was using the old variables and given me a warning about the change and pointed me at the new docs, or better yet had done the translation automatically for me. It would also have been nicer if the new docs included a transition guide. Here's what my current (old) .emacs says about this stuff: ;; ;; Customize regular expressions which match compilation error messages ;; ;; Make sure we have a definition of compilation-error-regexp-alist before ;; modifying it (require 'compile) (setq compilation-error-regexp-alist (append '( ("\\s-*#\\s-*line\\s-+\\([0-9]+\\)\\s-+\"\\([a-zA-Z]?:?[^\":\n]+\\)\"" 2 1) ;; This expression can be used to match error messages from Jam ("\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:[ ]+[Ll]ine[ ]+\\([0-9]+\\)" 1 2) ;; matches some gcc error output ("\\(\\( \\)\\|\\(In file included \\)\\)from \"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:\\([0-9]+\\)" 4 5) ;; matches some vc7 error output (" +\\(\\([a-zA-Z]:\\)?[^:( \n]+\\)(\\([0-9]+\\)):.*'.*" 1 3) ;; This expression matches metrowerks command-line tool output. We just ;; pick up the line number, since the file name is handled below ("\\(### mw[^\n]+\n\\)?# +\\([0-9]+\\):" nil 2) (" \\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \ : see " 1 3) (".*at\\s-+[Ll]ine\\s-+\\([0-9]+\\)\\s-+of\\s-+\"\\([a-zA-Z]?:?[^\":\n]+\\)\"" 2 1) ; Python backtraces include these ("^[ \t]*File \"\\([a-zA-Z]?:?[^\":\n]+\\)\",[ \t]+[Ll]ine[ \t]+\\([0-9]+\\).*" 1 2) ;; These are "helpfully" supplied when Boost.Build testing prints a backtrace ("^[ \t]*\\(at\\|from\\)[ \t]+line[ \t]+\\([0-9]+\\)[ \t]+of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n(]+\\).*" 3 2) ) compilation-error-regexp-alist)) (if (boundp 'compilation-file-regexp-alist) (setq compilation-file-regexp-alist (append '( ;; This expression matches metrowerks command-line tool output, which ;; only displays the filename once for multiple errors ("### mw[^\n]+\n# *In: \"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?$" 1) ("### mw[^\n]+\n# *File: \"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?$" 1) ("^(\\(.*\.tex\\)\\|\\(.*tex\.cfg\\)\nLaTeX2e" 1) ) compilation-file-regexp-alist)))