Re: [O] Wrong numbering after removal of headline

2014-06-30 Thread York Zhao
Finally, I got it all work and am happy with the result, here is the code: (defun yz/org-export-ignore-headline (backend) "Ignore headlines with tag `ignoreheading'." (save-excursion (let ((org-allow-promoting-top-level-subtree t)) (org-map-entries (lambda () (when (m

Re: [O] Wrong numbering after removal of headline

2014-06-30 Thread York Zhao
Hi Nicolas, > Don't do that at the filter level, which is too late for heavy structure > editing. Use `org-export-before-parsing-hook' instead. I realized this, and had changed to use `org-export-before-parsing-hook', here is my code: (defun my-headline-removal (backend) "Ignore headlines with

Re: [O] Wrong numbering after removal of headline

2014-06-30 Thread Nicolas Goaziou
Hello, York Zhao writes: > As an example, I have the follow org-mode buffer: > > * Level1 > ** Level2 > *** Level3 > > If I export this to LaTeX (C-x C-e l p), it produces the following: > > > Contents > > 1 Level1 > 1.1 Level2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . > 1.1.

Re: [O] Wrong numbering after removal of headline

2014-06-30 Thread Thomas S. Dye
M-S-left with point on the Level2 heading? Tom York Zhao writes: >> You could promote the Level2 subtree. > > I had thought about this, but I don't think this will be trivial. > > On Mon, Jun 30, 2014 at 3:37 PM, Thomas S. Dye wrote: >> Aloha York, >> >> York Zhao writes: >> >>> Hi list, >>>

Re: [O] Wrong numbering after removal of headline

2014-06-30 Thread York Zhao
> You could promote the Level2 subtree. I had thought about this, but I don't think this will be trivial. On Mon, Jun 30, 2014 at 3:37 PM, Thomas S. Dye wrote: > Aloha York, > > York Zhao writes: > >> Hi list, >> >> As an example, I have the follow org-mode buffer: >> >> * Level1 >> ** Level2 >

Re: [O] Wrong numbering after removal of headline

2014-06-30 Thread Thomas S. Dye
Aloha York, York Zhao writes: > Hi list, > > As an example, I have the follow org-mode buffer: > > * Level1 > ** Level2 > *** Level3 > > If I export this to LaTeX (C-x C-e l p), it produces the following: > > > Contents > > 1 Level1 > 1.1 Level2 . . . . . . . . . . . . . . . . . . . . . . . . .

[O] Wrong numbering after removal of headline

2014-06-30 Thread York Zhao
Hi list, As an example, I have the follow org-mode buffer: * Level1 ** Level2 *** Level3 If I export this to LaTeX (C-x C-e l p), it produces the following: --8<---cut here---start->8--- Contents 1 Level1 1.1 Level2 . . . . . . . . . . . . . . . . . . . . .