emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [HTML] subtree export reverted back to absolute H level behavior
@ 2013-02-27 18:49 Samuel Wales
  2013-02-27 19:15 ` Samuel Wales
  2013-02-27 19:52 ` Nicolas Goaziou
  0 siblings, 2 replies; 8+ messages in thread
From: Samuel Wales @ 2013-02-27 18:49 UTC (permalink / raw)
  To: emacs-orgmode

The old exporter had a bug where exporting a subtree would start H
levels at the level in the file.

Thus, the top level being exported could be H8 if it were indented to
that level.  Or H38 if it were indented to that level.

IMO better behavior is relative.

===

The new exporter seemed to fix this, but it seems to have gone back to
the old behavior in a recent commit on git master.

It is excellent to make the new emulate the old as much as possible;
this reduces bugs and impact on people.  But does anybody rely on
absolute levels for subtree export?  My guess would be no, but I could
be wrong.

===

Recent commit caused this change in output:

-<h3 id="sec-1">An intriguing and fun question</h3>
+<h7 id="sec-0-0-0-0-1">An intriguing and fun question</h7>

Hope I've not misunderstood something here.  I can't run the
dispatcher directly because I get other issues.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [HTML] subtree export reverted back to absolute H level behavior
  2013-02-27 18:49 [HTML] subtree export reverted back to absolute H level behavior Samuel Wales
@ 2013-02-27 19:15 ` Samuel Wales
  2013-02-27 19:52 ` Nicolas Goaziou
  1 sibling, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2013-02-27 19:15 UTC (permalink / raw)
  To: emacs-orgmode

Also true with region export.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [HTML] subtree export reverted back to absolute H level behavior
  2013-02-27 18:49 [HTML] subtree export reverted back to absolute H level behavior Samuel Wales
  2013-02-27 19:15 ` Samuel Wales
@ 2013-02-27 19:52 ` Nicolas Goaziou
  2013-02-27 20:29   ` Samuel Wales
  1 sibling, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2013-02-27 19:52 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hello,

Samuel Wales <samologist@gmail.com> writes:

> The old exporter had a bug where exporting a subtree would start H
> levels at the level in the file.
>
> Thus, the top level being exported could be H8 if it were indented to
> that level.  Or H38 if it were indented to that level.
>
> IMO better behavior is relative.
>
> ===
>
> The new exporter seemed to fix this, but it seems to have gone back to
> the old behavior in a recent commit on git master.
>
> It is excellent to make the new emulate the old as much as possible;
> this reduces bugs and impact on people.  But does anybody rely on
> absolute levels for subtree export?  My guess would be no, but I could
> be wrong.
>
> ===
>
> Recent commit caused this change in output:
>
> -<h3 id="sec-1">An intriguing and fun question</h3>
> +<h7 id="sec-0-0-0-0-1">An intriguing and fun question</h7>
>
> Hope I've not misunderstood something here.  I can't run the
> dispatcher directly because I get other issues.

It would help to see your test file. For example, in the following Org buffer,

  * Level 1
  ** Level 2
  *** Level 3
  **** Level 4
  ***** Level 5
  ****** Level 6

exporting subtree with point on "Level 4" will result as <h2>Level
5</h2> and <h3>Level 6</h3>, which is correct.

I think your file is more like the following:

  * Something
  ** An intriguing and fun question
  ****** An intriguing and fun question

I.e. you skipped levels in your file. Then, numbering indeed skips
parts. So to put it differently, level is relative to the lowest level
among exported headline (it will always be 1), thereafter, it is
absolute.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [HTML] subtree export reverted back to absolute H level behavior
  2013-02-27 19:52 ` Nicolas Goaziou
@ 2013-02-27 20:29   ` Samuel Wales
  2013-02-27 20:59     ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Wales @ 2013-02-27 20:29 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 2/27/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> It would help to see your test file. For example, in the following Org
> buffer,
>
>   * Level 1
>   ** Level 2
>   *** Level 3
>   **** Level 4
>   ***** Level 5
>   ****** Level 6

Did you try it with org-odd-levels-only set to t?  That's a standard
part of Org.

> I think your file is more like the following:
>
>   * Something
>   ** An intriguing and fun question
>   ****** An intriguing and fun question

Not that I am aware of.

===

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [HTML] subtree export reverted back to absolute H level behavior
  2013-02-27 20:29   ` Samuel Wales
@ 2013-02-27 20:59     ` Nicolas Goaziou
  2013-02-27 21:23       ` Samuel Wales
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2013-02-27 20:59 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> On 2/27/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
>> It would help to see your test file. For example, in the following Org
>> buffer,
>>
>>   * Level 1
>>   ** Level 2
>>   *** Level 3
>>   **** Level 4
>>   ***** Level 5
>>   ****** Level 6
>
> Did you try it with org-odd-levels-only set to t?  That's a standard
> part of Org.

The equivalent file with `org-odd-levels-only' set to t also gives
correct results.

>> I think your file is more like the following:
>>
>>   * Something
>>   ** An intriguing and fun question
>>   ****** An intriguing and fun question
>
> Not that I am aware of.

Then my next guess is: Colonel Mustard with the chandler in the kitchen.
Did I win?

Or you can provide a file demonstrating the problem...


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [HTML] subtree export reverted back to absolute H level behavior
  2013-02-27 20:59     ` Nicolas Goaziou
@ 2013-02-27 21:23       ` Samuel Wales
  2013-02-27 22:25         ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Wales @ 2013-02-27 21:23 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 2/27/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Or you can provide a file demonstrating the problem...

Might be related to the inline footnote fix.  :(

===
* blog                                                               :refile:
*** NAKA /blog posts/                                                :refile:
***** NEXT [#A] a
******* [#A] Smedley
#+macro: color-div #+HTML: <div style="color: black; background-color:
$1; padding-top: 1px; padding-bottom: 1px; margin-top: 3ex;
margin-bottom: 3ex">
#+macro: orange-div {{{color-div(#f4a460)}}}
********* An intriguing and fun question
Sick people often ask,

{{{orange-div}}}

#+begin_quote

Why are there so many deaths?

#+end_quote

#+html: </div>

This is a good question and we denialists have whiled away
many enjoyable hours discussing it over fine wine.

#+html: <!-- more -->

It can't be because they "have an AIDS-like disease" and
"need biomedical research", as biomedical scientists
foolishly claim.  It must be something else.
********* removing this footnote fixes it
test[fn::wertwert]
*** asdf
===

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [HTML] subtree export reverted back to absolute H level behavior
  2013-02-27 21:23       ` Samuel Wales
@ 2013-02-27 22:25         ` Nicolas Goaziou
  2013-02-28  2:53           ` Samuel Wales
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2013-02-27 22:25 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> Might be related to the inline footnote fix.  :(
>
> ===
> * blog                                                               :refile:
> *** NAKA /blog posts/                                                :refile:
> ***** NEXT [#A] a
> ******* [#A] Smedley
> #+macro: color-div #+HTML: <div style="color: black; background-color:
> $1; padding-top: 1px; padding-bottom: 1px; margin-top: 3ex;
> margin-bottom: 3ex">
> #+macro: orange-div {{{color-div(#f4a460)}}}
> ********* An intriguing and fun question
> Sick people often ask,
>
> {{{orange-div}}}
>
> #+begin_quote
>
> Why are there so many deaths?
>
> #+end_quote
> #+html: </div>
>
> This is a good question and we denialists have whiled away
> many enjoyable hours discussing it over fine wine.
>
> #+html: <!-- more -->
>
> It can't be because they "have an AIDS-like disease" and
> "need biomedical research", as biomedical scientists
> foolishly claim.  It must be something else.
> ********* removing this footnote fixes it
> test[fn::wertwert]
> *** asdf
> ===

Ok. I have pushed a patch on master. Could you try it and tell me if it
solves your problem?

Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [HTML] subtree export reverted back to absolute H level behavior
  2013-02-27 22:25         ` Nicolas Goaziou
@ 2013-02-28  2:53           ` Samuel Wales
  0 siblings, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2013-02-28  2:53 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

I will pull and test it tomorrow.  Thank you.  Posted manually for now.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-28  2:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27 18:49 [HTML] subtree export reverted back to absolute H level behavior Samuel Wales
2013-02-27 19:15 ` Samuel Wales
2013-02-27 19:52 ` Nicolas Goaziou
2013-02-27 20:29   ` Samuel Wales
2013-02-27 20:59     ` Nicolas Goaziou
2013-02-27 21:23       ` Samuel Wales
2013-02-27 22:25         ` Nicolas Goaziou
2013-02-28  2:53           ` Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).