emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export options being ignored


From: Carsten Dominik
Subject: Re: [O] Export options being ignored
Date: Thu, 5 May 2011 09:09:02 +0200

On 5.5.2011, at 07:08, Nick Dokos wrote:

> Nick Dokos <address@hidden> wrote:
> 
>> ,----
>> | aa6dba8a74016587755c250bb8cc4743a4082ea1 is the first bad commit
>> `----
>> 
> 
> Taking a look at the commit:
> 
> ,----
> | commit aa6dba8a74016587755c250bb8cc4743a4082ea1
> | Author: Lawrence Mitchell <address@hidden>
> | Date:   Thu Jan 20 18:23:22 2011 +0000
> | 
> |     Only match complete words in org-export-add-options-to-plist
> |     
> |     * 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.
> | 
> | 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)
> `----
> 
> 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.
> 
> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]