From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Export options being ignored Date: Thu, 5 May 2011 09:09:02 +0200 Message-ID: References: <24377.1304570014@alphaville.dokosmarshall.org> <24788.1304572094@alphaville.dokosmarshall.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHsgR-0006yn-IL for emacs-orgmode@gnu.org; Thu, 05 May 2011 03:09:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHsgN-0008Rc-Fg for emacs-orgmode@gnu.org; Thu, 05 May 2011 03:09:11 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:53971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHsgN-0008RY-88 for emacs-orgmode@gnu.org; Thu, 05 May 2011 03:09:07 -0400 Received: by ewy9 with SMTP id 9so637591ewy.0 for ; Thu, 05 May 2011 00:09:06 -0700 (PDT) In-Reply-To: <24788.1304572094@alphaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: Lawrence Mitchell , emacs-orgmode@gnu.org, Eden Cardim On 5.5.2011, at 07:08, Nick Dokos wrote: > Nick Dokos wrote: >=20 >> ,---- >> | aa6dba8a74016587755c250bb8cc4743a4082ea1 is the first bad commit >> `---- >>=20 >=20 > Taking a look at the commit: >=20 > ,---- > | commit aa6dba8a74016587755c250bb8cc4743a4082ea1 > | Author: Lawrence Mitchell > | Date: Thu Jan 20 18:23:22 2011 +0000 > |=20 > | Only match complete words in org-export-add-options-to-plist > | =20 > | * org-exp.el (org-export-add-options-to-plist): Require match to = start > | at a word-boundary. > | =20 > | Previously, if an option was the suffix of another option (such = as TeX > | and LaTeX) the setting for the former would propagator to the = latter. > | This seems like an unintended consequence of a lax regexp in > | org-export-add-options-to-plist. This patch allows options to = share a > | suffix with another option by requiring that the match against = an > | option starts at a word-boundary. > |=20 > | diff --git a/lisp/org-exp.el b/lisp/org-exp.el > | index a265c3b..4a10303 100644 > | --- a/lisp/org-exp.el > | +++ b/lisp/org-exp.el > | @@ -830,7 +830,7 @@ security risks." > | (let ((op org-export-plist-vars)) > | (while (setq o (pop op)) > | (if (and (nth 1 o) > | - (string-match (concat (regexp-quote (nth 1 o)) > | + (string-match (concat "\\<" (regexp-quote (nth 1 o)) > | ":\\([^ \t\n\r;,.]*\\)") > | options)) > | (setq p (plist-put p (car o) > `---- >=20 > explains the problem: \< matches the empty string at the beginning of = a > word (i.e. if the syntax class of the next character is "word") but it > does not at the beginning of a char that is of some other syntax class > (I think it will not match anything in this case). So Eden diagnosed = it > correctly: it *is* a parsing problem and it *does* involve the = non-word > options. >=20 > At this point, the cure looks worse than the disease, so this commit = should > probably be reverted. This is fixed now, by looking for white space instead of = beginning-of-word. Thanks for the analysis. - Carsten