From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Magnus Henoch Newsgroups: gmane.emacs.bugs Subject: bug#11777: 24.1.50; Format strings for filenames in compilation-error-regexp-alist don't work Date: Mon, 25 Jun 2012 12:01:46 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1340623290 7771 80.91.229.3 (25 Jun 2012 11:21:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Jun 2012 11:21:30 +0000 (UTC) To: 11777@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 25 13:21:29 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sj7ME-0006kI-7A for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Jun 2012 13:21:26 +0200 Original-Received: from localhost ([::1]:39647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj7ME-0003It-1k for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Jun 2012 07:21:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj7M5-0003IZ-05 for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:21:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sj7Lw-00033s-39 for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:21:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj7Lv-00033g-UN for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:21:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sj7Pi-0007Pr-Av for bug-gnu-emacs@gnu.org; Mon, 25 Jun 2012 07:25:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134062347328435 (code B ref -1); Mon, 25 Jun 2012 11:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jun 2012 11:24:33 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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== Original-Received: by 10.180.79.166 with SMTP id k6mr24150735wix.8.1340622106162; Mon, 25 Jun 2012 04:01:46 -0700 (PDT) Original-Received: by 10.180.96.195 with HTTP; Mon, 25 Jun 2012 04:01:46 -0700 (PDT) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61272 Archived-At: 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)