From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.emacs.help Subject: Re: compilation: highlight current error Date: Mon, 27 Jun 2016 18:35:26 +0200 Message-ID: <87furyy4hd.fsf@roche-blanche.net> References: <87eg7j2lch.fsf@free.fr> <83oa6my6xy.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1467045404 5551 80.91.229.3 (27 Jun 2016 16:36:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 16:36:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 27 18:36:35 2016 Return-path: Envelope-to: geh-help-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 1bHZWS-0007Vq-5d for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jun 2016 18:36:32 +0200 Original-Received: from localhost ([::1]:59875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHZWR-0002Dq-Ab for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jun 2016 12:36:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHZVh-00023w-7M for help-gnu-emacs@gnu.org; Mon, 27 Jun 2016 12:35:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHZVZ-00064u-4C for help-gnu-emacs@gnu.org; Mon, 27 Jun 2016 12:35:44 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHZVY-00064c-Li for help-gnu-emacs@gnu.org; Mon, 27 Jun 2016 12:35:36 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bHZVW-0006zj-8s for help-gnu-emacs@gnu.org; Mon, 27 Jun 2016 18:35:34 +0200 Original-Received: from arennes-651-1-16-86.w86-215.abo.wanadoo.fr ([86.215.215.86]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Jun 2016 18:35:34 +0200 Original-Received: from pmlists by arennes-651-1-16-86.w86-215.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Jun 2016 18:35:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arennes-651-1-16-86.w86-215.abo.wanadoo.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:wueFjhYGOiebIROmnrmBoaTTcD0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110617 Archived-At: On Mon, Jun 27 2016, Eli Zaretskii wrote: >> I would like the current error in the compilation buffer to be >> highlighted. How could this be done please? > > Turn on the hl-line-mode in the compilation buffer? Thanks for this hint! There is perhaps a bug: when jumping to the next error, the highlighted line does not change. But I've found a work-around: --8<---------------cut here---------------start------------->8--- (add-hook 'next-error-hook (lambda () (with-current-buffer next-error-last-buffer (hl-line-mode 0) (hl-line-mode 1)))) --8<---------------cut here---------------end--------------->8--- -- Peter