From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Stackoverflow in regexp matcher Date: Wed, 03 Feb 2016 12:19:43 +0100 Message-ID: <87si1a9h2o.fsf@nicolasgoaziou.fr> References: <87oabzb4h8.fsf@hornfels.zedat.fu-berlin.de> <878u33dsh0.fsf@alphaville.usersys.redhat.com> <87y4b2qm7h.fsf@hornfels.zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQvRT-0001lf-TP for emacs-orgmode@gnu.org; Wed, 03 Feb 2016 06:17:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQvRO-0002HC-TL for emacs-orgmode@gnu.org; Wed, 03 Feb 2016 06:17:47 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:53120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQvRO-0002F9-Nq for emacs-orgmode@gnu.org; Wed, 03 Feb 2016 06:17:42 -0500 In-Reply-To: <87y4b2qm7h.fsf@hornfels.zedat.fu-berlin.de> (Loris Bennett's message of "Wed, 03 Feb 2016 08:36:50 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Loris Bennett Cc: emacs-orgmode@gnu.org Hello, "Loris Bennett" writes: > re-search-forward("^[^%]*\\\\usepackage.*{biblatex}" nil t) This is a pathological regexp. [^%] is anything but a percent sign, so it can contain newline characters. Basically [^%]* can match an entire buffer if it doesn't contain any %. I think the regexp used in `reftex-using-biblatex-p' should be "^[^%\n]*\\\\usepackage.*{biblatex}" Regards, -- Nicolas Goaziou