Re: [O] comment section with latex_header
Robert Klein writes: > If you revert the second patch, please put a note in the release notes > for the next org release, so the other babel users know a migration > path. I reverted the second patch, and slightly changed documentation. I'm not sure about ORG NEWS as using data from a COMMENT subtree was undefined (AFAIR it didn't work in Org 7.x). Regards,
Re: [O] comment section with latex_header
Hi, On 03/27/2015 12:02 PM, Nicolas Goaziou wrote: > Andreas Leha writes: >> I completely agree. My question was, what a use case would be that >> requires a COMMENT that behaves different from #'ing the individual >> lines (and is not covered by :noexport: already). > > I don't think there is any. This is basically what my first patch did > (i.e., removing any COMMENT subtree at the very beginning of export > process), but it nevertheless surprised some users. > Just a note: I didn't know of :noexport: before Andreas brought it up in this thread. If you revert the second patch, please put a note in the release notes for the next org release, so the other babel users know a migration path. Best regards Robert
Re: [O] comment section with latex_header
Hi Nicolas, Nicolas Goaziou writes: > Andreas Leha writes: > >> I see. I did not consider any possible slow-downs. I'd expect COMMENT >> to behave exactly like # in every regard -- not only export. That is a >> clearly defined behaviour, that should not produce confusion. > > As explained, this is not realistic. > OK, then I'll update my mental model about COMMENTs. >> If COMMENT is only valid for export, then I would actually recommend >> to rename it to make that clear. > > The manual is, IMO, pretty explicit: > > Finally, a ‘COMMENT’ keyword at the beginning of an entry, but after > any other keyword or priority cookie, comments out the entire subtree. > In this case, the subtree is not exported and no code block within it is > executed either. The command below helps changing the comment status of > a headline. > >> I completely agree. My question was, what a use case would be that >> requires a COMMENT that behaves different from #'ing the individual >> lines (and is not covered by :noexport: already). > > I don't think there is any. This is basically what my first patch did > (i.e., removing any COMMENT subtree at the very beginning of export > process), but it nevertheless surprised some users. > Well, in that case my updated mental model should not change anything. Thanks, Andreas
Re: [O] comment section with latex_header
Andreas Leha writes: > I see. I did not consider any possible slow-downs. I'd expect COMMENT > to behave exactly like # in every regard -- not only export. That is a > clearly defined behaviour, that should not produce confusion. As explained, this is not realistic. > If COMMENT is only valid for export, then I would actually recommend > to rename it to make that clear. The manual is, IMO, pretty explicit: Finally, a ‘COMMENT’ keyword at the beginning of an entry, but after any other keyword or priority cookie, comments out the entire subtree. In this case, the subtree is not exported and no code block within it is executed either. The command below helps changing the comment status of a headline. > I completely agree. My question was, what a use case would be that > requires a COMMENT that behaves different from #'ing the individual > lines (and is not covered by :noexport: already). I don't think there is any. This is basically what my first patch did (i.e., removing any COMMENT subtree at the very beginning of export process), but it nevertheless surprised some users. Regards,
Re: [O] comment section with latex_header
Hi Nicolas, Nicolas Goaziou writes: > Andreas Leha writes: > >> FWIW, I agree that COMMENT should be equivalent to individual line # . > > I hope you mean it should be equivalent during export only. Otherwise, > it would introduce some serious slowdown as COMMENT can be inherited. > I see. I did not consider any possible slow-downs. I'd expect COMMENT to behave exactly like # in every regard -- not only export. That is a clearly defined behaviour, that should not produce confusion. But I am not sure (hence my question below) whether there are use cases that need different behaviour. If COMMENT is only valid for export, then I would actually recommend to rename it to make that clear. >> Sections that should be accessible without being exported get >> the :noexport: tag. >> >> Is there any usecase for COMMENTed sections that is not covered >> by :noexport:? > > Babel code from a :noexport: headline is executed. It isn't when in > a COMMENT headline. I think both are useful. I completely agree. My question was, what a use case would be that requires a COMMENT that behaves different from #'ing the individual lines (and is not covered by :noexport: already). Regards, Andreas
Re: [O] comment section with latex_header
Andreas Leha writes: > FWIW, I agree that COMMENT should be equivalent to individual line # . I hope you mean it should be equivalent during export only. Otherwise, it would introduce some serious slowdown as COMMENT can be inherited. > Sections that should be accessible without being exported get > the :noexport: tag. > > Is there any usecase for COMMENTed sections that is not covered > by :noexport:? Babel code from a :noexport: headline is executed. It isn't when in a COMMENT headline. I think both are useful. Regards,
Re: [O] comment section with latex_header
Sebastien Vauban writes: > Can't we say that a COMMENT'ed subtree is like having all of its > contents commented, line by line? IOW, nothing "accessible"? There is, at least, one problem. Comments are always comments (really). However COMMENT keyword is only active during export. That means the behaviour will differ unexpectedly when exporting a document, as reported by Robert Klein. Anyway, anything is possible as long as it is clearly documented. Regards,
Re: [O] comment section with latex_header
Hi all, Sebastien Vauban writes: > Robert Klein wrote: >> On 03/24/2015 10:04 AM, Sebastien Vauban wrote: >> >>> Can't we say that a COMMENT'ed subtree is like having all of its >>> contents commented, line by line? IOW, nothing "accessible"? >> >> This would probably break a lot of babel stuff. > > Could you elaborate why? > >> If there was an option to disable exports for #+NAME:-ed stuff (i.e. >> data sources for babel), e.g. somtehing like >> >> #+NAME: xyzzy :exports none >> | munich | 13 | >> | cologne | 12 | >> >> you could deprecate and eventually disable data sources in COMMENT-ed >> section. > > If you *not to export* some stuff in a subtree, adding the "noexport" > tag would be enough, right? > > Best regards, > Seb FWIW, I agree that COMMENT should be equivalent to individual line # . Sections that should be accessible without being exported get the :noexport: tag. Is there any usecase for COMMENTed sections that is not covered by :noexport:? Regards, Andreas
Re: [O] comment section with latex_header
Robert Klein wrote: > On 03/24/2015 10:04 AM, Sebastien Vauban wrote: > >> Can't we say that a COMMENT'ed subtree is like having all of its >> contents commented, line by line? IOW, nothing "accessible"? > > This would probably break a lot of babel stuff. Could you elaborate why? > If there was an option to disable exports for #+NAME:-ed stuff (i.e. > data sources for babel), e.g. somtehing like > > #+NAME: xyzzy :exports none > | munich | 13 | > | cologne | 12 | > > you could deprecate and eventually disable data sources in COMMENT-ed > section. If you *not to export* some stuff in a subtree, adding the "noexport" tag would be enough, right? Best regards, Seb -- Sebastien Vauban
Re: [O] comment section with latex_header
Hi, On 03/24/2015 10:04 AM, Sebastien Vauban wrote: > Can't we say that a COMMENT'ed subtree is like having all of its > contents commented, line by line? IOW, nothing "accessible"? This would probably break a lot of babel stuff. If there was an option to disable exports for #+NAME:-ed stuff (i.e. data sources for babel), e.g. somtehing like #+NAME: xyzzy :exports none | munich | 13 | | cologne | 12 | you could deprecate and eventually disable data sources in COMMENT-ed section. Best regards Robert
Re: [O] comment section with latex_header
Nicolas Goaziou wrote: > Robert Klein writes: > >> this patch also breaks this kind of construct where not the table is >> exported, but the one created from the booktabs() call: >> >> >> ---> begin example <--- >> * Grundlagen >> *** COMMENT unexported subtree with table source >> #+tblname: masse > > This is deprecated. Use #+name: instead. > >> | 1 gestr. Teelffel | 1 gestr. Elffel | 1 Tasse | >> | ca. 5 ccm | ca 15 ccm | ca 120 ccm | >> |-+---+-| >> | Zimt 2 g| Haferflocken 8 g | Mehl 80 g | >> | Paprika 2 g | Speisestärke 9 g | Grieß 96 g | >> | Speisestärke 2--3 g | Mehl, Semmelmehl 10 g | Zucker 90 g | >> | Zucker 4 g | Salz, Zucker, Öl 15 g | | >> | Salz 5 g| Reis, Butter 15 g | | >> >> ** Maße und Gewichte >> >> #+call: booktabs(table=masse, align="lll") :results latex :exports results >> ---> end example <--- > > Good catch. The line between data that can be accessed and data that > cannot in a commented subtree is blurry. Can't we say that a COMMENT'ed subtree is like having all of its contents commented, line by line? IOW, nothing "accessible"? Best regards, Seb -- Sebastien Vauban
Re: [O] comment section with latex_header
Hello, Robert Klein writes: > this patch also breaks this kind of construct where not the table is > exported, but the one created from the booktabs() call: > > > ---> begin example <--- > * Grundlagen > *** COMMENT unexported subtree with table source > #+tblname: masse This is deprecated. Use #+name: instead. > | 1 gestr. Teelffel | 1 gestr. Elffel | 1 Tasse | > | ca. 5 ccm | ca 15 ccm | ca 120 ccm | > |-+---+-| > | Zimt 2 g| Haferflocken 8 g | Mehl 80 g | > | Paprika 2 g | Speisestärke 9 g | Grieß 96 g | > | Speisestärke 2--3 g | Mehl, Semmelmehl 10 g | Zucker 90 g | > | Zucker 4 g | Salz, Zucker, Öl 15 g | | > | Salz 5 g| Reis, Butter 15 g | | > > ** Maße und Gewichte > > #+call: booktabs(table=masse, align="lll") :results latex :exports results > ---> end example <--- Good catch. The line between data that can be accessed and data that cannot in a commented subtree is blurry. Anyway, this should be fixed in 359572d37eb3131d934fbfaeffdee0c2a1abc7cc. Thank you. Regards, -- Nicolas Goaziou
Re: [O] comment section with latex_header
On 03/24/2015 12:36 AM, Nicolas Goaziou wrote: > Hello, > > Andreas Leha writes: > >> If there are `#+latex_header:' entries in a section and that section is >> `COMMENT'ed out, I'd expect the #+latex_header entries to be >> uneffective. As they are when I comment them out one by one as in >> `# #+latex_header:'. >> >> Is this a bug? (I'd say, yes) > > This is fixed in c9a52787c14c3a7429bcd3c8975350525e0baa04. Thank you. > > Regards, > Hello, this patch also breaks this kind of construct where not the table is exported, but the one created from the booktabs() call: ---> begin example <--- * Grundlagen *** COMMENT unexported subtree with table source #+tblname: masse | 1 gestr. Teelöffel | 1 gestr. Eßlöffel | 1 Tasse | | ca. 5 ccm | ca 15 ccm | ca 120 ccm | |-+---+-| | Zimt 2 g| Haferflocken 8 g | Mehl 80 g | | Paprika 2 g | Speisestärke 9 g | Grieß 96 g | | Speisestärke 2--3 g | Mehl, Semmelmehl 10 g | Zucker 90 g | | Zucker 4 g | Salz, Zucker, Öl 15 g | | | Salz 5 g| Reis, Butter 15 g | | ** Maße und Gewichte #+call: booktabs(table=masse, align="lll") :results latex :exports results ---> end example <--- booktabs() code is from library-of-babel.org (currently residing in the doc directory). Also cf. http://orgmode.org/tmp/worg/org-contrib/babel/languages/ob-doc-LaTeX.html. However, in this org version (8.3 beta+) you get the same / similar results using ---> begin example <--- ** Maße und Gewichte #+tblname: masse #+attr_latex: :align lll :booktabs t | 1 gestr. Teelöffel | 1 gestr. Eßlöffel | 1 Tasse | | ca. 5 ccm | ca 15 ccm | ca 120 ccm | |-+---+-| | Zimt 2 g| Haferflocken 8 g | Mehl 80 g | | Paprika 2 g | Speisestärke 9 g | Grieß 96 g | | Speisestärke 2--3 g | Mehl, Semmelmehl 10 g | Zucker 90 g | | Zucker 4 g | Salz, Zucker, Öl 15 g | | | Salz 5 g| Reis, Butter 15 g | | ---> end example <--- This change probably ought to be mentioned in the Changes for a 8.3 release. Best regards, Robert
Re: [O] comment section with latex_header
Nicolas Goaziou writes: > Hello, > > Andreas Leha writes: > >> If there are `#+latex_header:' entries in a section and that section is >> `COMMENT'ed out, I'd expect the #+latex_header entries to be >> uneffective. As they are when I comment them out one by one as in >> `# #+latex_header:'. >> >> Is this a bug? (I'd say, yes) > > This is fixed in c9a52787c14c3a7429bcd3c8975350525e0baa04. Thank you. > Thanks. Confirmed. Andreas
Re: [O] comment section with latex_header
Hello, Andreas Leha writes: > If there are `#+latex_header:' entries in a section and that section is > `COMMENT'ed out, I'd expect the #+latex_header entries to be > uneffective. As they are when I comment them out one by one as in > `# #+latex_header:'. > > Is this a bug? (I'd say, yes) This is fixed in c9a52787c14c3a7429bcd3c8975350525e0baa04. Thank you. Regards, -- Nicolas Goaziou
Re: [O] comment section with latex_header
Hi Rasmus, Rasmus writes: > Andreas Leha writes: > >> Hi Rasmus, >> >> Rasmus writes: >>> Andreas Leha writes: >>> Hi all, If there are `#+latex_header:' entries in a section and that section is `COMMENT'ed out, I'd expect the #+latex_header entries to be uneffective. As they are when I comment them out one by one as in `# #+latex_header:'. Is this a bug? (I'd say, yes) >>> >>> Why? I guess you can still archive >> >> Could you expand on that? > > Sorry, I must have clicked C-c C-c by accident. > > #+LATEX_HEADERs in :noexport: sections are included. I guess that code in > COMMENT sections aren't included. So I guess keywords could also be > excluded. I don't know. > > —Rasmus Thanks, Andreas
Re: [O] comment section with latex_header
Andreas Leha writes: > Hi Rasmus, > > Rasmus writes: >> Andreas Leha writes: >> >>> Hi all, >>> >>> If there are `#+latex_header:' entries in a section and that section is >>> `COMMENT'ed out, I'd expect the #+latex_header entries to be >>> uneffective. As they are when I comment them out one by one as in >>> `# #+latex_header:'. >>> >>> Is this a bug? (I'd say, yes) >> >> Why? I guess you can still archive > > Could you expand on that? Sorry, I must have clicked C-c C-c by accident. #+LATEX_HEADERs in :noexport: sections are included. I guess that code in COMMENT sections aren't included. So I guess keywords could also be excluded. I don't know. —Rasmus -- ⠠⠵
Re: [O] comment section with latex_header
Rasmus wrote: > Andreas Leha writes: >> >> If there are `#+latex_header:' entries in a section and that section is >> `COMMENT'ed out, I'd expect the #+latex_header entries to be >> uneffective. As they are when I comment them out one by one as in >> `# #+latex_header:'. >> >> Is this a bug? (I'd say, yes) > > Why? I guess you can still archive I'd also say that this is a bug, as -- in my understanding -- COMMENT'ing a subtree is exactly equivalent to commenting every line of it, that is: --8<---cut here---start->8--- * COMMENT Section Some text Some code Some text --8<---cut here---end--->8--- should be equivalent to: --8<---cut here---start->8--- # * Section # Some text # Some code # Some text --8<---cut here---end--->8--- Best regards, Seb -- Sebastien Vauban
Re: [O] comment section with latex_header
Hi Rasmus, Rasmus writes: > Andreas Leha writes: > >> Hi all, >> >> If there are `#+latex_header:' entries in a section and that section is >> `COMMENT'ed out, I'd expect the #+latex_header entries to be >> uneffective. As they are when I comment them out one by one as in >> `# #+latex_header:'. >> >> Is this a bug? (I'd say, yes) > > Why? I guess you can still archive Could you expand on that? Best, Andreas
Re: [O] comment section with latex_header
Andreas Leha writes: > Hi all, > > If there are `#+latex_header:' entries in a section and that section is > `COMMENT'ed out, I'd expect the #+latex_header entries to be > uneffective. As they are when I comment them out one by one as in > `# #+latex_header:'. > > Is this a bug? (I'd say, yes) Why? I guess you can still archive -- To err is human. To screw up 10⁶ times per second, you need a computer