From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: ... Date: Thu, 31 Jan 2013 11:37:39 +0100 Message-ID: <6C559BF7-BACF-48AF-AB06-383D6AC14BDE@gmail.com> References: <877gmt3dzq@ch.ristopher.com> <871ud13dkp@ch.ristopher.com> Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0rWc-0000x8-H1 for emacs-orgmode@gnu.org; Thu, 31 Jan 2013 05:37:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0rWZ-0007CS-FU for emacs-orgmode@gnu.org; Thu, 31 Jan 2013 05:37:46 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:50363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0rWZ-0007CH-8T for emacs-orgmode@gnu.org; Thu, 31 Jan 2013 05:37:43 -0500 Received: by mail-ea0-f173.google.com with SMTP id i1so1191133eaa.32 for ; Thu, 31 Jan 2013 02:37:42 -0800 (PST) In-Reply-To: <871ud13dkp@ch.ristopher.com> 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: Christopher Schmidt Cc: "emacs-orgmode@gnu.org Mailing List" Hi Christopher, I mant to copy the list, I am doing this again now. Wow, I was not aware that Emacs caches by content, this is an important = piece of information. I guess this removed the main concern I had. = Thanks for looking it up in the code and showing it to me. I am not = sure if I understand that code completely, but i trust your judgment. -Carsten On 31 jan. 2013, at 10:29, Christopher Schmidt = wrote: > Christopher Schmidt writes: >> I was not aware of Emacs caching the regexp on a per-object rather >> than per-content basis. If that is true, the regexp should be made a >> buffer local variable, of course! >=20 > I do not think that's true. >=20 > In compile_pattern: >=20 > for (cpp =3D &searchbuf_head; ; cpp =3D &cp->next) > { > cp =3D *cpp; > ... > if (SCHARS (cp->regexp) =3D=3D SCHARS (pattern) > && STRING_MULTIBYTE (cp->regexp) =3D=3D STRING_MULTIBYTE = (pattern) > && !NILP (Fstring_equal (cp->regexp, pattern)) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > && EQ (cp->buf.translate, (! NILP (translate) ? translate = : make_number (0))) > && cp->posix =3D=3D posix > && (EQ (cp->syntax_table, Qt) > || EQ (cp->syntax_table, BVAR (current_buffer, = syntax_table))) > && !NILP (Fequal (cp->whitespace_regexp, = Vsearch_spaces_regexp)) > && cp->buf.charset_unibyte =3D=3D charset_unibyte) > break; >=20 > /* If we're at the end of the cache, compile into the nil = cell > we found, or the last (least recently used) cell with a > string value. */ > if (cp->next =3D=3D 0) > { > compile_it: > compile_pattern_1 (cp, pattern, translate, posix); > break; > } > } > ... >=20 > Christopher --=20 They can't eat you. -- Merlin Mann in his "Scared Shitless" talk