From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Mitchell Subject: [PATCH 1/2] Only match complete words in org-export-add-options-to-plist Date: Thu, 20 Jan 2011 13:23:22 +0000 Message-ID: <1c07dac7fa0dd036dec6a1147fde83c5cddf8639.1295529378.git.wence@gmx.li> References: Return-path: Received: from [140.186.70.92] (port=51877 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfuUQ-0007cJ-6b for emacs-orgmode@gnu.org; Thu, 20 Jan 2011 08:23:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfuUN-0005T3-O9 for emacs-orgmode@gnu.org; Thu, 20 Jan 2011 08:23:49 -0500 Received: from e450.epcc.ed.ac.uk ([129.215.56.230]:40332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfuUN-0005Sg-G1 for emacs-orgmode@gnu.org; Thu, 20 Jan 2011 08:23:47 -0500 In-Reply-To: In-Reply-To: References: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Lawrence Mitchell * org-exp.el (org-export-add-options-to-plist): Require match to start at a word-boundary. 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. --- lisp/org-exp.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 9954227..d099c82 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -824,7 +824,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) -- 1.7.4.rc1.7.g2cf08