From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Abrahams Newsgroups: gmane.emacs.devel Subject: Re: "Recent" changes to compilation-mode? Date: Wed, 01 Jun 2005 12:54:21 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1117654850 22266 80.91.229.2 (1 Jun 2005 19:40:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2005 19:40:50 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 01 21:40:40 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DdZ3Q-0005q5-Gm for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2005 21:39:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DdZ8m-0002tp-1R for ged-emacs-devel@m.gmane.org; Wed, 01 Jun 2005 15:44:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DdZ6C-000299-0m for emacs-devel@gnu.org; Wed, 01 Jun 2005 15:41:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DdZ67-000264-2T for emacs-devel@gnu.org; Wed, 01 Jun 2005 15:41:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DdZ66-0001p8-Aq for emacs-devel@gnu.org; Wed, 01 Jun 2005 15:41:50 -0400 Original-Received: from [207.172.4.63] (helo=smtp04.mrf.mail.rcn.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DdYsb-0008I9-Ke; Wed, 01 Jun 2005 15:27:55 -0400 Original-Received: from 146-115-127-135.c3-0.smr-ubr2.sbo-smr.ma.cable.rcn.com (HELO I9300.boost-consulting.com) (146.115.127.135) by smtp04.mrf.mail.rcn.net with ESMTP; 01 Jun 2005 15:25:41 -0400 X-IronPort-AV: i="3.93,157,1115006400"; d="log'?scan'208"; a="41878647:sNHT57919268" Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sat, 28 May 2005 22:45:19 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (windows-nt) X-IronPort-AV: i="3.93,157,1115006400"; d="log'?scan'208"; a="41811417:sNHT43216668" X-Spambayes-Classification: ham; 0.00 X-Mailer: CommuniGate Pro CLI mailer Cancel-Lock: sha1:CpbaKYqIQArPwojx9z5OHxldJwg= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38013 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38013 --=-=-= RMS: sorry for the duplicate; I had forgotten to send to the list as well. --=-=-= Content-Type: multipart/mixed; boundary="==-=-=" --==-=-= 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))) --==-=-= Content-Disposition: inline; filename=error.log -*- mode: compilation; default-directory: "c:/boost/tools/build/jam_src/" -*- build Setting environment for using Microsoft Visual Studio .NET 2003 tools. (If you have another version of Visual Studio or Visual C++ installed and wish to use its tools from the command line, run vcvars32.bat for that version.) ### ### Using 'vc7' toolset. ### c:\boost\tools\build\jam_src>rd /S /Q bootstrap c:\boost\tools\build\jam_src>md bootstrap c:\boost\tools\build\jam_src>cl /nologo /GZ /Zi /MLd -DNT -DYYDEBUG kernel32.lib advapi32.lib /Febootstrap\jam0 command.c compile.c execnt.c execunix.c execvms.c expand.c filent.c fileos2.c fileunix.c filevms.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c parse.c pathunix.c pathvms.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c command.c compile.c execnt.c execnt.c(160) : warning C4090: 'function' : different 'const' qualifiers execnt.c(171) : warning C4090: '=' : different 'const' qualifiers execnt.c(181) : warning C4090: '=' : different 'const' qualifiers execunix.c execvms.c expand.c filent.c fileos2.c fileunix.c filevms.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c Generating Code... Compiling... newstr.c option.c parse.c pathunix.c pathvms.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c w32_getreg.c native.c Generating Code... Compiling... set.c path.c regex.c property-set.c sequence.c order.c Generating Code... c:\boost\tools\build\jam_src>.\bootstrap\jam0 -f build.jam --toolset=vc7 "--toolset-root=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\\..\..\VC7\ " clean ...found 1 target... ...updating 1 target... [DELETE] clean ...updated 1 target... c:\boost\tools\build\jam_src>.\bootstrap\jam0 -f build.jam --toolset=vc7 "--toolset-root=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\\..\..\VC7\ " ...found 44 targets... ...updating 1 target... [COMPILE] bin.ntx86\bjam.exe command.c compile.c expand.c glob.c hash.c hcache.c headers.c hdrmacro.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c parse.c regexp.c rules.c scan.c Generating Code... Compiling... search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c set.c path.c regex.c property-set.c sequence.c order.c execnt.c execnt.c(160) : warning C4090: 'function' : different 'const' qualifiers execnt.c(171) : warning C4090: '=' : different 'const' qualifiers execnt.c(181) : warning C4090: '=' : different 'const' qualifiers filent.c pathunix.c Generating Code... Compiling... w32_getreg.c Generating Code... ...updated 1 target... Compilation finished at Wed Jun 01 12:47:44 --==-=-= -- Dave Abrahams Boost Consulting www.boost-consulting.com --==-=-=-- --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--