From unknown Sat Aug 16 16:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11777: 24.1.50; Format strings for filenames in compilation-error-regexp-alist don't work Resent-From: Magnus Henoch Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jun 2012 11:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11777 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11777@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.134062347328435 (code B ref -1); Mon, 25 Jun 2012 11:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jun 2012 11:24:33 +0000 Received: from localhost ([127.0.0.1]:56746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sj7P6-0007OM-Uh for submit@debbugs.gnu.org; Mon, 25 Jun 2012 07:24:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60531) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sj7P4-0007Ns-1v for submit@debbugs.gnu.org; Mon, 25 Jun 2012 07:24:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sj73U-0006I5-2z for submit@debbugs.gnu.org; Mon, 25 Jun 2012 07:02:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:44753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj73T-0006Hz-U6 for submit@debbugs.gnu.org; Mon, 25 Jun 2012 07:02:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj73O-0008Ju-Hd for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:02:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sj73F-0006F9-93 for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:01:57 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:38534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj73E-0006Ee-Tn for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:01:49 -0400 Received: by wefh52 with SMTP id h52so3355565wef.0 for ; Mon, 25 Jun 2012 04:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=EpyZDXJP98Hzkopw7QyMjcJm3xPKGWMnq+1frnE8854=; b=zdE+bCgZTaEDE2lv7Bhh4g1cK1fSuaCV6iwzTcIzrw6ymcJap1VUGJozjVgrL3OWl6 e9ei0UOFzbIdHrmWA65su86x3mI1eiCHClAhL7TMofZ+e/8pdTpqlmXXnJa/McWIk0T0 8G5HFwcIliimBe76zS+lmiicRifCIl+atL3BoPBwr+d0Apo/kspHE4w1yA1D9xkTnmWh ek7Dcx7vHb+cowxoc6VF2F3SZYWv0uaMv2XGPNaqmjZ9Uuc58sqJxD+eIGinzERWzmJY 6Al8vi9YDFnFKXR9svO3EO6F7U8cgsY2M98vVW+sA2QFJe8KTu7aoAeNM/7tAYj4S3UJ LVkQ== MIME-Version: 1.0 Received: by 10.180.79.166 with SMTP id k6mr24150735wix.8.1340622106162; Mon, 25 Jun 2012 04:01:46 -0700 (PDT) Received: by 10.180.96.195 with HTTP; Mon, 25 Jun 2012 04:01:46 -0700 (PDT) Date: Mon, 25 Jun 2012 12:01:46 +0100 Message-ID: From: Magnus Henoch Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Add a new regexp for compilation-mode: (add-to-list 'compilation-error-regexp-alist-alist (cons 'erlang-eunit (list "^ *\\([^.:( \t\n]+\\):\\([0-9]+\\):.*\\.\\.\\." ;; file (list 1 "%s.erl" "src/%s.erl" "test/%s.erl") ;; line 2 ;; column nil ;; type 0 ))) (add-to-list 'compilation-error-regexp-alist 'erlang-eunit) Create a new file, /tmp/foo.txt, and enter the following line: foo:954: all_test_...ok Switch foo.txt into compilation-mode with M-x compilation-mode. Create the file /tmp/src/foo.erl. In foo.txt, hit RET on the now highlighted line. Expected result: switch to the foo.erl buffer. Actual result: prompt for file to open, default being "foo". This patch seems to fix the problem: diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 61dc371..d9dd1c0 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2344,10 +2344,12 @@ This is the value of `next-error-function' in Compilation buffers." ;; (setq timestamp compilation-buffer-modtime))) ) (with-current-buffer - (compilation-find-file + (apply + 'compilation-find-file marker (caar (compilation--loc->file-struct loc)) - (cadr (car (compilation--loc->file-struct loc)))) + (cadr (car (compilation--loc->file-struct loc))) + (compilation--file-struct->formats (compilation--loc->file-struct loc))) (let ((screen-columns ;; Obey the compilation-error-screen-columns of the target ;; buffer if its major mode set it buffer-locally. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Applications/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.1.50.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2012-05-17 on poki-sona.local Windowing system distributor `Apple', version 10.3.1038 Configured using: `configure '--with-ns' '--without-rsvg'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t jabber-activity-mode: t shell-dirtrack-mode: t ido-everywhere: t show-paren-mode: t display-time-mode: t server-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: c o m p i l a t C-x k C-x b u t i p M-x c o m p i l e C-x o C-g C-g q C-x k C-x b e s h e g i t SPC s t a s h SPC p o p C-x b M-x e v a l - b u f C-x b C-g q C-x o M-x C-x o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-g q C-x b c a p d o t e m C-c ' C-e C-x C-e C-x C-e C-n C-e C-x C-e C-c ' C-x o C-x k * c o m M-x c o m p l i l e SPC C-x o C-g q C-x b c o m p i l e C-x v = C-c C-c y e s C-M-x C-x b C-x k C-x b u t i p M-x c o m p i l e C-x o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x o C-n C-n C-n C-x b C-s M-x r e c p - e m - b u g Recent messages: Entering debugger... Back to top level. Finding changes in /Users/magnus/src/emacs/lisp/progmodes/compile.el...done Previous buffer text saved to kill ring Hunk already applied compilation-next-error-function (No files need saving) Mark set Compilation finished Mark set Load-path shadows: ~/src/emacs-jabber/compat/hex-util hides /Applications/Emacs.app/Contents/Resources/lisp/hex-util Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums whitespace diff bookmark cl-specs edebug jka-compr nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok vc-annotate conf-mode tramp-cache tramp tramp-compat tramp-loaddefs man log-edit smerge-mode browse-url erlang-flymake flymake find-dired grep cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs debug tabify image-file face-remap imenu erlang etags compile em-unix em-term term disp-table ehelp electric em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner em-alias esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util add-log log-view pcvs-util multi-isearch make-mode diff-mode vc-bzr vc-sccs vc-svn vc-cvs vc-rcs vc-dir vc ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff vc-dispatcher dired sasl-digest hmac-md5 hex-util goto-addr thingatpt jabber-keepalive jabber-ping jabber-bookmarks jabber-private network-stream auth-source eieio password-cache jabber jabber-libnotify dbus jabber-awesome jabber-osd jabber-wmii jabber-xmessage jabber-festival jabber-sawfish jabber-ratpoison jabber-tmux jabber-screen jabber-socks5 jabber-ft-server jabber-si-server jabber-ft-client jabber-ft-common jabber-si-client jabber-si-common jabber-feature-neg jabber-truncate jabber-time jabber-autoaway jabber-vcard-avatars jabber-chatstates jabber-events jabber-vcard jabber-avatar mailcap jabber-activity jabber-watch jabber-modeline jabber-ahc-presence jabber-ahc jabber-version jabber-ourversion jabber-muc-nick-completion hippie-exp jabber-browse jabber-search jabber-register jabber-roster jabber-presence jabber-muc jabber-muc-nick-coloring assoc hexrgb jabber-newdisco jabber-widget jabber-disco jabber-chat jabber-history jabber-chatbuffer jabber-alert jabber-iq jabber-core jabber-sasl sasl sasl-anonymous sasl-login sasl-plain fsm jabber-logon jabber-conn srv dns starttls tls gnutls jabber-xml xml jabber-menu ielm pp help-mode view org-beamer org-clock vc-git org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks find-func org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb jabber-console sgml-mode ewoc jabber-util jabber-keymap ob-sh shell ido gnus gnus-ems nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit cus-start cus-load jabber-autoloads erlang-start tempo derived paren uniquify time org-capture org-mks org byte-opt warnings bytecomp byte-compile cconv macroexp advice help-fns advice-preload ob-emacs-lisp ob-ref ob-lob ob-table org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline easy-mmode format-spec diary-lib diary-loaddefs cal-menu easymenu calendar cal-loaddefs cl server edmacro kmacro ob-tangle org-src ob-comint comint ansi-color ring ob-keys org-compat ob org-macs ob-eval time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 16:16:37 2013 Received: (at control) by debbugs.gnu.org; 8 Mar 2013 21:16:37 +0000 Received: from localhost ([127.0.0.1]:40075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UE4ea-0002Lj-Ld for submit@debbugs.gnu.org; Fri, 08 Mar 2013 16:16:37 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:51950) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UE4eY-0002LV-C0 for control@debbugs.gnu.org; Fri, 08 Mar 2013 16:16:34 -0500 Received: by mail-wg0-f41.google.com with SMTP id ds1so137235wgb.4 for ; Fri, 08 Mar 2013 13:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=FZs2IhIbo0T2CCqadYdNA55POjKGIy11oT1r5nVIYSM=; b=GCOzuRfYkHzjGXLgaAZKK3NOG/WfDhXqigzhTTmrGa0ep8eakFQf6Oqegt7nlclmpe WPpluUrJ1+hChTJmtSsN43vavscEYpNGSZM2pzhI1PlqUeKiZ11phPE17aMnks8LNfy+ tFuwnT6PI9ND9zO7YtNewEqSzhRWn1guLqAJqMeGE796z3UM2HEPjYFfno35mPbn3v7k vuWaebrts+BxqvoiLNEHcqJsvnfzG1UpFPxxWdx3y80PDatwOkSBPlC31Yih4ZYfOLxd 81kUDANCPNRhg2Oj6vevuxtNWHIxqTlLR3cY+epcRUXggtMC5xMem/vUNZ54iwy2gDJC AczQ== X-Received: by 10.194.83.105 with SMTP id p9mr6727114wjy.56.1362777349598; Fri, 08 Mar 2013 13:15:49 -0800 (PST) Received: from sns-1506.sns.bskyb.corp (94-194-151-107.zone8.bethere.co.uk. [94.194.151.107]) by mx.google.com with ESMTPS id ej8sm835228wib.9.2013.03.08.13.15.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 08 Mar 2013 13:15:48 -0800 (PST) From: Magnus Henoch To: control@debbugs.gnu.org Subject: Forgot to tag "patch" Date: Fri, 08 Mar 2013 21:15:44 +0000 Message-ID: User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) tags 11777 patch thanks From unknown Sat Aug 16 16:06:19 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Magnus Henoch Subject: bug#11777: closed (Re: bug#11777: 24.1.50; Format strings for filenames in compilation-error-regexp-alist don't work) Message-ID: References: X-Gnu-PR-Message: they-closed 11777 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 11777@debbugs.gnu.org Date: Wed, 24 Apr 2013 13:57:09 +0000 Content-Type: multipart/mixed; boundary="----------=_1366811829-14424-1" This is a multi-part message in MIME format... ------------=_1366811829-14424-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #11777: 24.1.50; Format strings for filenames in compilation-error-regexp-a= list don't work which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 11777@debbugs.gnu.org. --=20 11777: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11777 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1366811829-14424-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11777-done) by debbugs.gnu.org; 24 Apr 2013 13:56:37 +0000 Received: from localhost ([127.0.0.1]:41009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UV0BY-0003i1-D4 for submit@debbugs.gnu.org; Wed, 24 Apr 2013 09:56:36 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:46640) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UV0BU-0003hG-Fn for 11777-done@debbugs.gnu.org; Wed, 24 Apr 2013 09:56:32 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpYYW/2dsb2JhbABEuzWDWRdzgh8BBScvIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFFpYYW/2dsb2JhbABEuzWDWRdzgh8BBScvIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="8173830" Received: from 69-165-134-22.dsl.teksavvy.com (HELO pastel.home) ([69.165.134.22]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Apr 2013 09:51:25 -0400 Received: by pastel.home (Postfix, from userid 20848) id A995F67A35; Wed, 24 Apr 2013 09:51:28 -0400 (EDT) From: Stefan Monnier To: Magnus Henoch Subject: Re: bug#11777: 24.1.50; Format strings for filenames in compilation-error-regexp-alist don't work Message-ID: References: Date: Wed, 24 Apr 2013 09:51:28 -0400 In-Reply-To: (Magnus Henoch's message of "Mon, 25 Jun 2012 12:01:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 11777-done Cc: 11777-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > (with-current-buffer > - (compilation-find-file > + (apply > + 'compilation-find-file > marker > (caar (compilation--loc->file-struct loc)) > - (cadr (car (compilation--loc->file-struct loc)))) > + (cadr (car (compilation--loc->file-struct loc))) > + (compilation--file-struct->formats (compilation--loc->file-struct loc))) Looks eminently reasonable, applied, thank you! And sorry for the ridiculous delay, Stefan ------------=_1366811829-14424-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Jun 2012 11:24:33 +0000 Received: from localhost ([127.0.0.1]:56746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sj7P6-0007OM-Uh for submit@debbugs.gnu.org; Mon, 25 Jun 2012 07:24:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60531) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sj7P4-0007Ns-1v for submit@debbugs.gnu.org; Mon, 25 Jun 2012 07:24:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sj73U-0006I5-2z for submit@debbugs.gnu.org; Mon, 25 Jun 2012 07:02:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:44753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj73T-0006Hz-U6 for submit@debbugs.gnu.org; Mon, 25 Jun 2012 07:02:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj73O-0008Ju-Hd for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:02:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sj73F-0006F9-93 for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:01:57 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:38534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj73E-0006Ee-Tn for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:01:49 -0400 Received: by wefh52 with SMTP id h52so3355565wef.0 for ; Mon, 25 Jun 2012 04:01:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=EpyZDXJP98Hzkopw7QyMjcJm3xPKGWMnq+1frnE8854=; b=zdE+bCgZTaEDE2lv7Bhh4g1cK1fSuaCV6iwzTcIzrw6ymcJap1VUGJozjVgrL3OWl6 e9ei0UOFzbIdHrmWA65su86x3mI1eiCHClAhL7TMofZ+e/8pdTpqlmXXnJa/McWIk0T0 8G5HFwcIliimBe76zS+lmiicRifCIl+atL3BoPBwr+d0Apo/kspHE4w1yA1D9xkTnmWh ek7Dcx7vHb+cowxoc6VF2F3SZYWv0uaMv2XGPNaqmjZ9Uuc58sqJxD+eIGinzERWzmJY 6Al8vi9YDFnFKXR9svO3EO6F7U8cgsY2M98vVW+sA2QFJe8KTu7aoAeNM/7tAYj4S3UJ LVkQ== MIME-Version: 1.0 Received: by 10.180.79.166 with SMTP id k6mr24150735wix.8.1340622106162; Mon, 25 Jun 2012 04:01:46 -0700 (PDT) Received: by 10.180.96.195 with HTTP; Mon, 25 Jun 2012 04:01:46 -0700 (PDT) Date: Mon, 25 Jun 2012 12:01:46 +0100 Message-ID: Subject: 24.1.50; Format strings for filenames in compilation-error-regexp-alist don't work From: Magnus Henoch To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Add a new regexp for compilation-mode: (add-to-list 'compilation-error-regexp-alist-alist (cons 'erlang-eunit (list "^ *\\([^.:( \t\n]+\\):\\([0-9]+\\):.*\\.\\.\\." ;; file (list 1 "%s.erl" "src/%s.erl" "test/%s.erl") ;; line 2 ;; column nil ;; type 0 ))) (add-to-list 'compilation-error-regexp-alist 'erlang-eunit) Create a new file, /tmp/foo.txt, and enter the following line: foo:954: all_test_...ok Switch foo.txt into compilation-mode with M-x compilation-mode. Create the file /tmp/src/foo.erl. In foo.txt, hit RET on the now highlighted line. Expected result: switch to the foo.erl buffer. Actual result: prompt for file to open, default being "foo". This patch seems to fix the problem: diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 61dc371..d9dd1c0 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2344,10 +2344,12 @@ This is the value of `next-error-function' in Compilation buffers." ;; (setq timestamp compilation-buffer-modtime))) ) (with-current-buffer - (compilation-find-file + (apply + 'compilation-find-file marker (caar (compilation--loc->file-struct loc)) - (cadr (car (compilation--loc->file-struct loc)))) + (cadr (car (compilation--loc->file-struct loc))) + (compilation--file-struct->formats (compilation--loc->file-struct loc))) (let ((screen-columns ;; Obey the compilation-error-screen-columns of the target ;; buffer if its major mode set it buffer-locally. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Applications/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.1.50.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2012-05-17 on poki-sona.local Windowing system distributor `Apple', version 10.3.1038 Configured using: `configure '--with-ns' '--without-rsvg'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t jabber-activity-mode: t shell-dirtrack-mode: t ido-everywhere: t show-paren-mode: t display-time-mode: t server-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: c o m p i l a t C-x k C-x b u t i p M-x c o m p i l e C-x o C-g C-g q C-x k C-x b e s h e g i t SPC s t a s h SPC p o p C-x b M-x e v a l - b u f C-x b C-g q C-x o M-x C-x o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-g q C-x b c a p d o t e m C-c ' C-e C-x C-e C-x C-e C-n C-e C-x C-e C-c ' C-x o C-x k * c o m M-x c o m p l i l e SPC C-x o C-g q C-x b c o m p i l e C-x v = C-c C-c y e s C-M-x C-x b C-x k C-x b u t i p M-x c o m p i l e C-x o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x o C-n C-n C-n C-x b C-s M-x r e c p - e m - b u g Recent messages: Entering debugger... Back to top level. Finding changes in /Users/magnus/src/emacs/lisp/progmodes/compile.el...done Previous buffer text saved to kill ring Hunk already applied compilation-next-error-function (No files need saving) Mark set Compilation finished Mark set Load-path shadows: ~/src/emacs-jabber/compat/hex-util hides /Applications/Emacs.app/Contents/Resources/lisp/hex-util Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums whitespace diff bookmark cl-specs edebug jka-compr nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok vc-annotate conf-mode tramp-cache tramp tramp-compat tramp-loaddefs man log-edit smerge-mode browse-url erlang-flymake flymake find-dired grep cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs debug tabify image-file face-remap imenu erlang etags compile em-unix em-term term disp-table ehelp electric em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner em-alias esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util add-log log-view pcvs-util multi-isearch make-mode diff-mode vc-bzr vc-sccs vc-svn vc-cvs vc-rcs vc-dir vc ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff vc-dispatcher dired sasl-digest hmac-md5 hex-util goto-addr thingatpt jabber-keepalive jabber-ping jabber-bookmarks jabber-private network-stream auth-source eieio password-cache jabber jabber-libnotify dbus jabber-awesome jabber-osd jabber-wmii jabber-xmessage jabber-festival jabber-sawfish jabber-ratpoison jabber-tmux jabber-screen jabber-socks5 jabber-ft-server jabber-si-server jabber-ft-client jabber-ft-common jabber-si-client jabber-si-common jabber-feature-neg jabber-truncate jabber-time jabber-autoaway jabber-vcard-avatars jabber-chatstates jabber-events jabber-vcard jabber-avatar mailcap jabber-activity jabber-watch jabber-modeline jabber-ahc-presence jabber-ahc jabber-version jabber-ourversion jabber-muc-nick-completion hippie-exp jabber-browse jabber-search jabber-register jabber-roster jabber-presence jabber-muc jabber-muc-nick-coloring assoc hexrgb jabber-newdisco jabber-widget jabber-disco jabber-chat jabber-history jabber-chatbuffer jabber-alert jabber-iq jabber-core jabber-sasl sasl sasl-anonymous sasl-login sasl-plain fsm jabber-logon jabber-conn srv dns starttls tls gnutls jabber-xml xml jabber-menu ielm pp help-mode view org-beamer org-clock vc-git org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks find-func org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb jabber-console sgml-mode ewoc jabber-util jabber-keymap ob-sh shell ido gnus gnus-ems nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit cus-start cus-load jabber-autoloads erlang-start tempo derived paren uniquify time org-capture org-mks org byte-opt warnings bytecomp byte-compile cconv macroexp advice help-fns advice-preload ob-emacs-lisp ob-ref ob-lob ob-table org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline easy-mmode format-spec diary-lib diary-loaddefs cal-menu easymenu calendar cal-loaddefs cl server edmacro kmacro ob-tangle org-src ob-comint comint ansi-color ring ob-keys org-compat ob org-macs ob-eval time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind ns multi-tty emacs) ------------=_1366811829-14424-1--