Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-28 Thread Christian Moe
Ouch, I messed those illustrations up, and I suppose my message wasn't easy to understand to begin with. Sorry. > One thing to consider is whether this markup should support author and > timestamp info in a way that the parser should understand and pass on to > relevant backends. The annotation

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-28 Thread Christian Moe
> Speaking of inlined elements, I repeat that [note:label] within the > paragraph should offer a good markup for annotations. I agree, and favor a move from annotation blocks to a solution like that.[note:1] [note:1] That is, like this? One thing to consider is whether this markup should suppor

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-28 Thread Achim Gratz
Am 28.03.2013 15:41, schrieb Nicolas Goaziou: Then you're contradicting yourself, since you also said: I suggest to follow the lead of (La)TeX and determine begin and end of such blocks by blank lines. In your example, the end of the "P-block" isn't at the blank line. My comment was on th

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-28 Thread Nicolas Goaziou
Hello, Achim Gratz writes: >> It wouldn't allow paragraphs within the annotation. > > ??? > > 8< > There is an annotation by the original author here > #+BEGIN_ANNOTATION >I never meant to break this paragraph. > >But here's a second one in the annotation, >

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-28 Thread Christian Moe
Hi again, While we're at it, there's trouble with custom author and date info in annotations. I hadn't really noticed, since my name was inserted anyway and dates didn't matter much to my work. 1. Author and date attributes of the annotation are ignored, unless I'm writing them wrong (I've tried

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-28 Thread Christian Moe
Nicolas Goaziou writes: >> Minor cosmetic annoyance: An extra space is inserted >> before the annotation. >> >> Pending the introduction of a dedicated syntax, could we have this fix >> in master please? > > Sure, but, if it's not too much work, I'd like the extra space removed > first. Do you hav

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-27 Thread Achim Gratz
Am 27.03.2013 16:48, schrieb Nicolas Goaziou: So this would be a single P-Block with an annotation inside: 8< There is an annotation by the original author here #+BEGIN_ANNOTATION I never meant to break this paragraph. #+END_ANNOTATION in the middle of the paragraph

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-27 Thread Nicolas Goaziou
Hello, Christian Moe writes: > Patch applied and tested -- looks good! Thanks. > > Annotations now work again both inside and at the end of paragraphs and > list items, without introducing unwanted paragraph breaks or swallowing > wanted ones. I haven't looked specifically for corner cases, but

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-27 Thread Nicolas Goaziou
Hello, Achim Gratz writes: > Am 25.03.2013 23:15, schrieb Nicolas Goaziou: >>> The proper way to handle this is to introduce a new syntax for >>> inlined annotations and to treat them appropriately in exporters. >>> >>> Since we have both #+begin_src and src_{...} I'd suggest >>> having annotati

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-26 Thread Christian Moe
Hi, Patch applied and tested -- looks good! Thanks. Annotations now work again both inside and at the end of paragraphs and list items, without introducing unwanted paragraph breaks or swallowing wanted ones. I haven't looked specifically for corner cases, but I've successfully exported a fairl

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Achim Gratz
Am 25.03.2013 23:15, schrieb Nicolas Goaziou: The proper way to handle this is to introduce a new syntax for inlined annotations and to treat them appropriately in exporters. Since we have both #+begin_src and src_{...} I'd suggest having annotation_{...} or something similar. I would suggest

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Christian Moe
Hi Bastien, Thanks for giving it a try. Let's see what Nicolas comes up with. > > I would not favor a solution that allows more #+begin_ blocks to > be inlined. We've had this one for a while. It's always been a bit anomalous though. > The proper way to handle this is to introduce a new syntax

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Nicolas Goaziou
Hello, Bastien writes: > okay, I reverted my wrong fixes. I'll let Nicolas have a look. I attach a patch (hardly tested) for that. Does it work as expected? > I would not favor a solution that allows more #+begin_ blocks to > be inlined. Neither would I. Blocks are containers. > The proper

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Bastien
Hi Christian, okay, I reverted my wrong fixes. I'll let Nicolas have a look. I would not favor a solution that allows more #+begin_ blocks to be inlined. The proper way to handle this is to introduce a new syntax for inlined annotations and to treat them appropriately in exporters. Since we ha

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Christian Moe
Nicolas Goaziou writes: > I didn't look at the problem (nor at Bastien's solution): could someone > post the proper code that should be generated? Hi, I'll try. This Org code: A paragraph. #+begin_annotation An annotation. #+end_annotation Another paragraph. ...should resul

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Christian Moe
Hi, No, sorry. I see the same issues as in my previous message: an annotation at the end of a paragraph swallows the (intended) paragraph break before the next paragraph; an annotation before a list item causes a format error. The last commit I see from you is at 18:28:50, though: "Fix previous

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Nicolas Goaziou
Hello, Achim Gratz writes: > Am 25.03.2013 18:05, schrieb Bastien: >> I gave it another try. Please let me know. > > Now add an annotation at the end of a paragraph... it simply doesn't > work unless org-element gets proper support for telling the exporter > which Org "paragraph" elements shoul

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Christian Moe
Hi, Bastien, Thanks. Annotations now work inside paragraphs, where they now leave only an extra space instead of paragraph breaks. However, an annotation at the end of a paragraph swallows up the *intended* paragraph break before the next paragraph. And the fix doesn't seem to be quite safe. An

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Bastien
Hi, please have a go against latest HEAD and let me know if it works. I tried with annotations at the beginning of a section, of a paragraph, in the middle of a paragraph, at the end of a paragraph and at the end of a section. The fix qualifies as the Most Ugly Hack On Earth, but does the job fo

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Christian Moe
Achim Gratz writes: > It can't be fixed this way since annotations end the paragraph and > whatever comes next is a new element. The ODT exporter gets two > paragraphs and has no way of knowing that these should actually be > exported as a single paragraph. Yeah, that's what I was afraid of.

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Achim Gratz
Am 25.03.2013 18:05, schrieb Bastien: I gave it another try. Please let me know. Now add an annotation at the end of a paragraph... it simply doesn't work unless org-element gets proper support for telling the exporter which Org "paragraph" elements should be exported together as a single p

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Bastien
Hi Christian, Christian Moe writes: > Thanks for looking into this. I just pulled and tested, but I cannot > confirm the fix yet. I still get paragraph breaks around annotations > with Org-mode version 8.0-pre (release_8.0-pre-219-g8eb0d6). I gave it another try. Please let me know. -- Bast

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Achim Gratz
Am 25.03.2013 17:12, schrieb Christian Moe: Thanks for looking into this. I just pulled and tested, but I cannot confirm the fix yet. I still get paragraph breaks around annotations with Org-mode version 8.0-pre (release_8.0-pre-219-g8eb0d6). It can't be fixed this way since annotations end the

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Bastien
Hi Christian, Christian Moe writes: > Thanks for looking into this. I just pulled and tested, but I cannot > confirm the fix yet. I still get paragraph breaks around annotations > with Org-mode version 8.0-pre (release_8.0-pre-219-g8eb0d6). Before the fix, I could see no annotation at all in th

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Christian Moe
Hi, Bastien, Thanks for looking into this. I just pulled and tested, but I cannot confirm the fix yet. I still get paragraph breaks around annotations with Org-mode version 8.0-pre (release_8.0-pre-219-g8eb0d6). Yours, Christian Bastien writes: > Hi Christian, > > Christian Moe writes: > >>

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Bastien
Hi Christian, Christian Moe writes: > Paragraphs currently break around ODT annotations when they > shouldn't. Annotations are a useful feature of the ODT exporter: > > There is an annotation by the original author here > #+BEGIN_ANNOTATION > I never meant to break this paragraph. > #+

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Achim Gratz
Am 25.03.2013 11:29, schrieb Christian Moe: Thanks for the tip. I don't think user-side hacks are the way to go here, though. Org-odt provides an annotation feature for ODT export, based on using the special-block syntax, that no longer works as intended. I'm hoping it can simply be fixed, but if

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-25 Thread Christian Moe
Samuel Wales writes: > > A similar issue arises with inline footnotes. [...] > In my case I was able with Nicolas's supplied code to create a hook > that normalized footnotes before export. Maybe extracting in a hook > will work for you. However, I fear that incorporating the parser into > the f

Re: [O] [BUG] [ODT] Annotations break paragraphs

2013-03-24 Thread Samuel Wales
Hi Christian, On 3/21/13, Christian Moe wrote: > The new exporter adds paragraph breaks around the anchor for the > marginal comment. This is the wrong behavior in all cases. These > comments are meant to be anchored inside paragraphs that are not meant > to be broken. (Using a fresh Org-mode ver

[O] [BUG] [ODT] Annotations break paragraphs

2013-03-21 Thread Christian Moe
Hi, Paragraphs currently break around ODT annotations when they shouldn't. Annotations are a useful feature of the ODT exporter: There is an annotation by the original author here #+BEGIN_ANNOTATION I never meant to break this paragraph. #+END_ANNOTATION in the middle of the paragrap