* Export options being ignored
@ 2011-05-05 1:15 Eden Cardim
2011-05-05 4:33 ` Nick Dokos
0 siblings, 1 reply; 7+ messages in thread
From: Eden Cardim @ 2011-05-05 1:15 UTC (permalink / raw
To: emacs-orgmode
,----[ test.org ]
| #+OPTIONS: <:nil
| ** TODO Estimate effort for all of today's tasks
| SCHEDULED: <2011-05-05 Thu 06:40 ++1d>
`----
Exporting the above file to pdf results in a file containing the
SCHEDULED timestamp in it.
I'm running org from git master, commit
cd0446243861487096983f09e545105551af7f10
Apparently, all the symbol settings (^:t |:t etc...) exhibit the same
behaviour. Options like toc:t, num:t, etc. do work. I'm not familiar
with the code that does the parsing of the options so I have no idea
where to look in order to debug this. Setting org-export-with-timestamps
etc. does work as documented, so I'd say something is going wrong with
the parsing.
--
Eden Cardim
Software Engineer
edencardim.com
+55 73 9986-3963
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Export options being ignored
2011-05-05 1:15 Export options being ignored Eden Cardim
@ 2011-05-05 4:33 ` Nick Dokos
2011-05-05 5:08 ` Nick Dokos
0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2011-05-05 4:33 UTC (permalink / raw
To: Eden Cardim; +Cc: Lawrence Mitchell, nicholas.dokos, emacs-orgmode
Eden Cardim <edencardim@gmail.com> wrote:
>
> ,----[ test.org ]
> | #+OPTIONS: <:nil
> | ** TODO Estimate effort for all of today's tasks
> | SCHEDULED: <2011-05-05 Thu 06:40 ++1d>
> `----
>
> Exporting the above file to pdf results in a file containing the
> SCHEDULED timestamp in it.
>
> I'm running org from git master, commit
> cd0446243861487096983f09e545105551af7f10
>
> Apparently, all the symbol settings (^:t |:t etc...) exhibit the same
> behaviour. Options like toc:t, num:t, etc. do work. I'm not familiar
> with the code that does the parsing of the options so I have no idea
> where to look in order to debug this. Setting org-export-with-timestamps
> etc. does work as documented, so I'd say something is going wrong with
> the parsing.
>
Reproduced and git bisected:
,----
| aa6dba8a74016587755c250bb8cc4743a4082ea1 is the first bad commit
| commit aa6dba8a74016587755c250bb8cc4743a4082ea1
| Author: Lawrence Mitchell <wence@gmx.li>
| 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.
|
| :040000 040000 44d426100f5c092112e149a891eb2e043a8ca404 c76627facb6988aa08d4d1fa9f1ab2d9b4aa2f45 M lisp
`----
Lawrence, can you take a look?
Thanks,
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Export options being ignored
2011-05-05 4:33 ` Nick Dokos
@ 2011-05-05 5:08 ` Nick Dokos
2011-05-05 7:09 ` Carsten Dominik
0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2011-05-05 5:08 UTC (permalink / raw
Cc: Lawrence Mitchell, nicholas.dokos, emacs-orgmode, Eden Cardim
Nick Dokos <nicholas.dokos@hp.com> wrote:
> ,----
> | aa6dba8a74016587755c250bb8cc4743a4082ea1 is the first bad commit
> `----
>
Taking a look at the commit:
,----
| commit aa6dba8a74016587755c250bb8cc4743a4082ea1
| Author: Lawrence Mitchell <wence@gmx.li>
| 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.
Thanks,
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Export options being ignored
2011-05-05 5:08 ` Nick Dokos
@ 2011-05-05 7:09 ` Carsten Dominik
2011-05-05 8:08 ` Lawrence Mitchell
2011-05-05 10:40 ` Eden Cardim
0 siblings, 2 replies; 7+ messages in thread
From: Carsten Dominik @ 2011-05-05 7:09 UTC (permalink / raw
To: nicholas.dokos; +Cc: Lawrence Mitchell, emacs-orgmode, Eden Cardim
On 5.5.2011, at 07:08, Nick Dokos wrote:
> Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>> ,----
>> | aa6dba8a74016587755c250bb8cc4743a4082ea1 is the first bad commit
>> `----
>>
>
> Taking a look at the commit:
>
> ,----
> | commit aa6dba8a74016587755c250bb8cc4743a4082ea1
> | Author: Lawrence Mitchell <wence@gmx.li>
> | 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Export options being ignored
2011-05-05 7:09 ` Carsten Dominik
@ 2011-05-05 8:08 ` Lawrence Mitchell
2011-05-05 10:40 ` Eden Cardim
1 sibling, 0 replies; 7+ messages in thread
From: Lawrence Mitchell @ 2011-05-05 8:08 UTC (permalink / raw
To: emacs-orgmode
Carsten Dominik wrote:
> On 5.5.2011, at 07:08, Nick Dokos wrote:
[...]
>> 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.
> This is fixed now, by looking for white space instead of beginning-of-word.
> Thanks for the analysis.
Indeed, thanks.
Lawrence
--
Lawrence Mitchell <wence@gmx.li>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Export options being ignored
2011-05-05 7:09 ` Carsten Dominik
2011-05-05 8:08 ` Lawrence Mitchell
@ 2011-05-05 10:40 ` Eden Cardim
2011-05-05 10:48 ` Carsten Dominik
1 sibling, 1 reply; 7+ messages in thread
From: Eden Cardim @ 2011-05-05 10:40 UTC (permalink / raw
To: emacs-orgmode
>>>>> "Carsten" == Carsten Dominik <carsten.dominik@gmail.com> writes:
Carsten> This is fixed now, by looking for white space instead of
Carsten> beginning-of-word. Thanks for the analysis.
Still needs the following patch for it to work:
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 5bf1d1b..cda1f98 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -864,7 +864,7 @@ security risks."
options))
(setq p (plist-put p (car o)
(car (read-from-string
- (match-string 1 options))))))))))
+ (match-string 2 options))))))))))
p)
(defun org-export-add-subtree-options (p pos)
--8<---------------cut here---------------end--------------->8---
--
Eden Cardim
Software Engineer
edencardim.com
+55 73 9986-3963
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Export options being ignored
2011-05-05 10:40 ` Eden Cardim
@ 2011-05-05 10:48 ` Carsten Dominik
0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2011-05-05 10:48 UTC (permalink / raw
To: Eden Cardim; +Cc: emacs-orgmode
On 5.5.2011, at 12:40, Eden Cardim wrote:
>>>>>> "Carsten" == Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> Carsten> This is fixed now, by looking for white space instead of
> Carsten> beginning-of-word. Thanks for the analysis.
>
> Still needs the following patch for it to work:
Yes, thanks.
- Carsten
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index 5bf1d1b..cda1f98 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -864,7 +864,7 @@ security risks."
> options))
> (setq p (plist-put p (car o)
> (car (read-from-string
> - (match-string 1 options))))))))))
> + (match-string 2 options))))))))))
> p)
>
> (defun org-export-add-subtree-options (p pos)
> --8<---------------cut here---------------end--------------->8---
>
> --
> Eden Cardim
> Software Engineer
> edencardim.com
> +55 73 9986-3963
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-05-05 10:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05 1:15 Export options being ignored Eden Cardim
2011-05-05 4:33 ` Nick Dokos
2011-05-05 5:08 ` Nick Dokos
2011-05-05 7:09 ` Carsten Dominik
2011-05-05 8:08 ` Lawrence Mitchell
2011-05-05 10:40 ` Eden Cardim
2011-05-05 10:48 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.