From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 04 10:15:35 2012 Received: (at submit) by debbugs.gnu.org; 4 Aug 2012 14:15:35 +0000 Received: from localhost ([127.0.0.1]:33435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sxf8g-0002nR-SL for submit@debbugs.gnu.org; Sat, 04 Aug 2012 10:15:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58289) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sxf8d-0002nI-C9 for submit@debbugs.gnu.org; Sat, 04 Aug 2012 10:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sxf1A-00015q-4F for submit@debbugs.gnu.org; Sat, 04 Aug 2012 10:07:49 -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]:56490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxf1A-00015m-18 for submit@debbugs.gnu.org; Sat, 04 Aug 2012 10:07:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxf18-0003t9-Fd for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 10:07:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sxf16-00015a-Ng for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 10:07:46 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:49385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxf16-00015T-Di for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 10:07:44 -0400 Received: by wibhq4 with SMTP id hq4so283209wib.12 for ; Sat, 04 Aug 2012 07:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=Buzw+tkZekzMXTz8uKgcO6go2hSmygvHjb/q2RUl/Bg=; b=jsboyNmXWuTf8npkZlyVqrEvaL8A8/Gwasuy2OxsPh0hSde1MgyONGpZsbwVmlG60H min5adq4Ba5UvwtDHLRuS4subqirgO5JFaerPU/vVYakichO3e7jrwfcQWfVRQhA5hQ3 wS43fV8THyld+Z+7fnh+kH4/Kij6HmOqHSw5IQu+upv+5G+SNHAFGWu/rcOTbdjGDrex Z7KQGikEW2OvBjudFPSJCdr3uOd4jevPh0Icoa5KNeFE+8RoBEAkqez77OkfrnFA4oJP PZrCoOb28SvDFgq0okN5FP/VVr6VRYTfVPHFnCeXZFJph8y5kzlnp5bjt8h8LCPpV3oo HZTg== Received: by 10.216.241.198 with SMTP id g48mr2819133wer.153.1344089262995; Sat, 04 Aug 2012 07:07:42 -0700 (PDT) Received: from paddy (189-101-133-95.pool.ukrtel.net. [95.133.101.189]) by mx.google.com with ESMTPS id z11sm5339873wiv.10.2012.08.04.07.07.41 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Aug 2012 07:07:42 -0700 (PDT) From: Oleksandr Manzyuk To: bug-gnu-emacs@gnu.org Subject: 24.1; Allow faces specified by property lists in `compilation-error-regexp-alist'. Date: Sat, 04 Aug 2012 17:07:39 +0300 Message-ID: <87lihuagyc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain 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 (------) Unlike Emacs 23 in which fontification of compilation errors is handled by `font-lock.el', in Emacs 24, it is performed by `compile.el' itself, in a rather ad hoc fashion. In particular, it doesn't handle the faces specified by property list of the form (face FACE PROP1 VAL1 PROP2 VAL2 ...). The documentation of `compilation-error-regexp-alist' says that it is an alist that specifies how errors in compiler output are matched, where each element has the form (REGEXP FILE [LINE COLUMN TYPE HYPERLINK HIGHLIGHT...]). Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where FACE is an expression returning the face to use for the submatch. If fact, only symbols are supported by the current version of `compile.el' and lists error out with the error message "Don't know how to handle face ...". As a consequence, compilation error messages are not properly fontified in `inferior-haskell-mode', which also breaks navigation between errors with C-x ` (see https://github.com/haskell/haskell-mode/issues/67 for more details). Unfortunately, I don't know of any other examples where this problem manifests itself. It seems to be straightforward to add support for faces specified by property list. I use the following patch: diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index c008e1c..be73850 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1338,6 +1338,11 @@ to `compilation-error-regexp-alist' if RULES is nil." (put-text-property (match-beginning mn) (match-end mn) 'font-lock-face face)) + ((and (listp face) + (eq (car face) 'face)) + (add-text-properties + (match-beginning mn) (match-end mn) + (cddr face))) (t (error "Don't know how to handle face %S" face))))))) In GNU Emacs 24.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2012-06-10 on paddy Windowing system distributor `The X.Org Foundation', version 11.0.10706000 Configured using: `configure '--prefix=/home/manzyuk'' 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: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: eldoc-mode: t diff-auto-refine-mode: t paredit-mode: t ido-everywhere: t shell-dirtrack-mode: t savehist-mode: t icomplete-mode: t global-auto-revert-mode: t show-paren-mode: t delete-selection-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x C-g C-h v c o m p i l a t i o n SPC e r r r o r SPC r e C-x o C-v C-v C-x o M-x r e o p o r t SPC e m Recent messages: Loading /home/manzyuk/src/emacs-preamble/init.el (source)... Loading /home/manzyuk/.emacs.d/elpa/haskell-mode-2.8.0/haskell-site-file.el (source)...done Loading /home/manzyuk/quicklisp/slime-helper.el (source)...done Loading /home/manzyuk/src/emacs-preamble/init.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Quit Type C-x 1 to delete the help window, C-M-v to scroll help. scroll-down-command: Beginning of buffer Load-path shadows: None found. Features: (shadow sort flyspell ispell mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader pp help-mode view eldoc preamble-scheme preamble-ruby inf-ruby ruby-mode compile preamble-org org-install cl preamble-magit preamble-diff magit-bisect magit-key-mode magit diff-mode log-edit easy-mmode pcvs-util add-log preamble-lisp info-look slime-autoloads preamble-haskell ghci-completion preamble-google-translate google-translate json url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse url-vars mailcap preamble-emacs-lisp preamble-paredit paredit preamble-auctex reftex reftex-vars preamble-package finder-inf auctex-autoloads tex-site info easymenu ghci-completion-autoloads google-translate-autoloads haskell-mode-autoloads inf-ruby-autoloads magit-autoloads paredit-autoloads package tabulated-list preamble-text preamble-shell preamble-prog preamble-makefile preamble-mail smtpmail sendmail rfc2047 rfc2045 ietf-drums mail-utils preamble-ido ido preamble-ibuffer preamble-hippie-expand preamble-ediff preamble-dired preamble-comint preamble-ansi-color preamble-windows preamble-tramp tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util mm-util mail-prsvr password-cache shell pcomplete comint ansi-color ring format-spec tramp-loaddefs regexp-opt preamble-server server preamble-mouse preamble-mode-line preamble-minibuffer savehist icomplete preamble-keyboard preamble-initialization preamble-frames preamble-files uniquify autorevert preamble-env preamble-editing paren delsel edmacro kmacro preamble-data saveplace preamble-browse-url preamble-bookmarks preamble-utils advice help-fns advice-preload time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe 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 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 16 00:32:47 2012 Received: (at 12136) by debbugs.gnu.org; 16 Sep 2012 04:32:47 +0000 Received: from localhost ([127.0.0.1]:36182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TD6XG-00064T-Ja for submit@debbugs.gnu.org; Sun, 16 Sep 2012 00:32:47 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:48863) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TD6XE-00064M-0r for 12136@debbugs.gnu.org; Sun, 16 Sep 2012 00:32:44 -0400 Received: by obbwc20 with SMTP id wc20so7653237obb.3 for <12136@debbugs.gnu.org>; Sat, 15 Sep 2012 21:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=ltiKiiPkhzzlgT2zg+dUZuZDqwO6XiN9VHLfKskSuAM=; b=xWLkEhxDRy1t0pIJIImkza4GxZa4j8h70pEg9DBYOhi4UWCktDBK3Ty20X7aJbj9tt IRFk/iodSR1P1xrEiWfFLZpQGbPwsmD9FzDIX4jKvLzcKshEHo5bliqUMWgLzr5PhNhj S650Qp3Zgq1jTTZmcSH9LCIUSzmvvoAx2iTLW9EA1+/95iHVhcLwJrUPzseQLFrhoN21 wkmixMUl7ORNSQpr37jN+7wy130y15PBe3QAwGQcibyTRuMVCH+V2Q+uRVn5LwtZPdRZ Kwc/9bS0wn66kXE4Y80J29o7WfN+CwZ/rMZWEOsjKNlKOxxv6v37ZB/1uiEPHz+Nwzjc Ttww== Received: by 10.182.110.40 with SMTP id hx8mr8647250obb.47.1347769896597; Sat, 15 Sep 2012 21:31:36 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id ec1sm6854217obc.2.2012.09.15.21.31.32 (version=SSLv3 cipher=OTHER); Sat, 15 Sep 2012 21:31:35 -0700 (PDT) From: Chong Yidong To: Oleksandr Manzyuk Subject: Re: bug#12136: 24.1; Allow faces specified by property lists in `compilation-error-regexp-alist'. References: <87lihuagyc.fsf@gmail.com> Date: Sun, 16 Sep 2012 12:31:20 +0800 In-Reply-To: <87lihuagyc.fsf@gmail.com> (Oleksandr Manzyuk's message of "Sat, 04 Aug 2012 17:07:39 +0300") Message-ID: <87obl6twpz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12136 Cc: 12136@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: -2.6 (--) Oleksandr Manzyuk writes: > Unlike Emacs 23 in which fontification of compilation errors is handled > by `font-lock.el', in Emacs 24, it is performed by `compile.el' itself, > in a rather ad hoc fashion. In particular, it doesn't handle the faces > specified by property list of the form (face FACE PROP1 VAL1 PROP2 VAL2 > ...). > > (REGEXP FILE [LINE COLUMN TYPE HYPERLINK HIGHLIGHT...]). > > Additional HIGHLIGHTs take the shape (SUBMATCH FACE), where FACE is an > expression returning the face to use for the submatch. If fact, only > symbols are supported by the current version of `compile.el' and lists > error out with the error message "Don't know how to handle face ...". Thanks. I committed a slightly amended version of the suggested fix. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 16 00:32:55 2012 Received: (at control) by debbugs.gnu.org; 16 Sep 2012 04:32:56 +0000 Received: from localhost ([127.0.0.1]:36185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TD6XP-00064r-AT for submit@debbugs.gnu.org; Sun, 16 Sep 2012 00:32:55 -0400 Received: from mail-oa0-f44.google.com ([209.85.219.44]:44848) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TD6XN-00064i-DX for control@debbugs.gnu.org; Sun, 16 Sep 2012 00:32:53 -0400 Received: by oagk14 with SMTP id k14so3790936oag.3 for ; Sat, 15 Sep 2012 21:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=5NWIZJcZSGeT672Z6fi/+ji450aX3K4xuKrXh47aKcc=; b=GSWwyw6C4ImEEsb6DXqp8aIRwrjMSrpncQZ+ackLMDXnhh06N5/KUzmj+QapkRSgn0 2n4Rp9OBiSVOhfjL8Rj8RLBjwzO9y80BOirNRld09m9+zFQ2BzMayaKU+YD4yStrHzwp B2AJX0p+Bljk3lwou6dyvwo9pW4YJb99KtnzCJ7kP/PsdSSk6cXJb4MSFMKfF8PSlqvJ cWRYSgtW7hqgrGbGv/lXSYFBET8HGYVBWo9pACp6E633S1oTjmlISKnbeC627jwZxb08 pZHQxxuvgxw8M/X3ncGn9W+UnBWpfdifBP5NnPqT7ANtMVNO1tJg9KS+Biug9HNOlpMD Y3nA== Received: by 10.182.212.70 with SMTP id ni6mr8721696obc.44.1347769906242; Sat, 15 Sep 2012 21:31:46 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id j10sm5519060oej.10.2012.09.15.21.31.43 (version=SSLv3 cipher=OTHER); Sat, 15 Sep 2012 21:31:45 -0700 (PDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 12136 Date: Sun, 16 Sep 2012 12:31:34 +0800 Message-ID: <87y5kaa8rd.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) 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 (--) close 12136 thanks From unknown Mon Jun 23 18:33:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 14 Oct 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator