Re: [Orgmode] 6.29c export latex bug?

2009-08-11 Thread Carsten Dominik



On Aug 11, 2009, at 5:26 AM, Nick Dokos wrote:


Nick Dokos nicholas.do...@hp.com wrote:



31ceed47ffd3070418dd34316fef8869d2434c26 is first bad commit
commit 31ceed47ffd3070418dd34316fef8869d2434c26
Author: Carsten Dominik carsten.domi...@gmail.com
Date:   Tue Jun 30 07:24:57 2009 +0200

   New minor mode org-indent-mode

   This mode implements outline indentation similar to clean view,  
but in

   a dynamic and virtual way, at display time.



I looked over the commit and saw this change to org-table.el:

   ...
   (if (equal (char-before) ?\n)
   ;; This hack is for org-indent, to force redisplay of the
   ;; line prefix of the first line. Apparently the redisplay
   ;; is tied to the newline, which is, I think, a bug.
   ;; To force this redisplay, we remove and re-insert the
   ;; newline, so that the redisplay engine thinks it belongs
   ;; to the changed text.
   (progn
 (backward-delete-char 1)
 (insert \n)))
   ...

I commented it out and the export of the table worked - but I have no
idea why.


Hi zwz, thanks for the report.
Hi Nick, thanks for nailing it.

This bug is fixed now.

Nick, if you are interested, please see the commit log entry for an
explanation why this bug was happening.

- Carsten




Nick




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] 6.29c export latex bug?

2009-08-11 Thread Nick Dokos
Carsten Dominik carsten.domi...@gmail.com wrote:

 Hi zwz, thanks for the report.
 Hi Nick, thanks for nailing it.
 
 This bug is fixed now.
 

Indeed - my test succeeded.

 Nick, if you are interested, please see the commit log entry for an
 explanation why this bug was happening.
 

I feel like a ping-pong ball :-), smacked from one place in the code
to another and back again. Thanks for the explanation!

Nick


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] 6.29c export latex bug?

2009-08-10 Thread zwz
Here is the content of my org file:
  
 * Test
   | | A | B | 
   |-+---+---| 
   | com | 1 | 2 | 
   | org | 3 | 4 | 
   
   Some math formulae: 
   
   y = x_1^2 + x_2^2   
   
   y^2 = 2x^2 + 1  
   
   z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r) 
  

Then I press C-c C-e l, I get the debug back-trace:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string(|| | nil)
  org-export-latex-tables(t)
  org-export-latex-content(#(\n  | | A | B |\n  |-+---+---|\n  | com | 
1 | 2 |\n  | org | 3 | 4 |\n\n  Some math formulae:\n\n  y = x_1^2 + x_2^2\n\n  
y^2 = 2x^2 + 1\n\n  z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)\n\n\n 0 1 (fontified 
nil) 1 3 (fontified nil org-caption nil org-attributes nil org-label nil) 3 5 
(fontified nil org-caption nil org-attributes nil org-label nil) 5 6 (fontified 
nil hilit-chg hilit-chg org-caption nil org-attributes nil org-label nil) 6 7 
(fontified nil hilit-chg hilit-chg org-caption nil org-attributes nil org-label 
nil) 7 8 (fontified nil hilit-chg hilit-chg org-caption nil org-attributes nil 
org-label nil) 8 9 (fontified nil hilit-chg hilit-chg org-caption nil 
org-attributes nil org-label nil) 9 10 (fontified nil hilit-chg hilit-chg 
org-caption nil org-attributes nil org-label nil) 10 18 (fontified nil 
org-caption nil org-attributes nil org-label nil) 18 19 (fontified nil) 19 21 
(fontified nil) 21 36 (fontified nil) 36 37 (fontified nil) 37 39 (fontified 
nil org-caption nil org-attributes nil org-label nil) 39 54 (fontified nil 
org-caption nil org-attributes nil org-label nil) 54 55 (fontified nil) 55 57 
(fontified nil org-caption nil org-attributes nil org-label nil) 57 72 
(fontified nil org-caption nil org-attributes nil org-label nil) 72 117 
(fontified nil) 117 174 (fontified nil) 174 175 (fontified nil) 175 176 
(fontified nil)))
  org-export-latex-subcontent(((pos . 2) (level . 1) (occur . 1) (heading . #( 
Test  1 2 ... 2 5 ...)) (content . #(\n  | | A | B |\n  |-+---+---|\n 
 | com | 1 | 2 |\n  | org | 3 | 4 |\n\n  Some math formulae:\n\n  y = x_1^2 + 
x_2^2\n\n  y^2 = 2x^2 + 1\n\n  z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)\n\n\n 0 1 
... 1 3 ... 3 5 ... 5 6 ... 6 7 ... 7 8 ... 8 9 ... 9 10 ... 10 18 ... 18 19 
... 19 21 ... 21 36 ... 36 37 ... 37 39 ... 39 54 ... 54 55 ... 55 57 ... 57 72 
... 72 117 ... 117 174 ... 174 175 ... 175 176 ...)) (subcontent)) t)
  #[(x) Â \‡ [x num org-export-latex-subcontent] 3](((pos . 2) (level . 
1) (occur . 1) (heading . #( Test  1 2 ... 2 5 ...)) (content . #(\n  | 
| A | B |\n  |-+---+---|\n  | com | 1 | 2 |\n  | org | 3 | 4 |\n\n  Some 
math formulae:\n\n  y = x_1^2 + x_2^2\n\n  y^2 = 2x^2 + 1\n\n  z_2 = x_1 + x_2 
+ 2 (y_1 + y_2 + r)\n\n\n 0 1 ... 1 3 ... 3 5 ... 5 6 ... 6 7 ... 7 8 ... 8 9 
... 9 10 ... 10 18 ... 18 19 ... 19 21 ... 21 36 ... 36 37 ... 37 39 ... 39 54 
... 54 55 ... 55 57 ... 57 72 ... 72 117 ... 117 174 ... 174 175 ... 175 176 
...)) (subcontent)))
  mapc(#[(x) Â\‡ [x num org-export-latex-subcontent] 3] (((pos . 2) 
(level . 1) (occur . 1) (heading . #( Test  1 2 ... 2 5 ...)) (content . 
#(\n  | | A | B |\n  |-+---+---|\n  | com | 1 | 2 |\n  | org | 3 | 4 
|\n\n  Some math formulae:\n\n  y = x_1^2 + x_2^2\n\n  y^2 = 2x^2 + 1\n\n  z_2 
= x_1 + x_2 + 2 (y_1 + y_2 + r)\n\n\n 0 1 ... 1 3 ... 3 5 ... 5 6 ... 6 7 ... 
7 8 ... 8 9 ... 9 10 ... 10 18 ... 18 19 ... 19 21 ... 21 36 ... 36 37 ... 37 
39 ... 39 54 ... 54 55 ... 55 57 ... 57 72 ... 72 117 ... 117 174 ... 174 175 
... 175 176 ...)) (subcontent
  org-export-latex-subpos . 2) (level . 1) (occur . 1) (heading . #( Test 
 1 2 ... 2 5 ...)) (content . #(\n  | | A | B |\n  |-+---+---|\n  | 
com | 1 | 2 |\n  | org | 3 | 4 |\n\n  Some math formulae:\n\n  y = x_1^2 + 
x_2^2\n\n  y^2 = 2x^2 + 1\n\n  z_2 = x_1 + x_2 + 2 (y_1 + y_2 + r)\n\n\n 0 1 
... 1 3 ... 3 5 ... 5 6 ... 6 7 ... 7 8 ... 8 9 ... 9 10 ... 10 18 ... 18 19 
... 19 21 ... 21 36 ... 36 37 ... 37 39 ... 39 54 ... 54 55 ... 55 57 ... 57 72 
... 72 117 ... 117 174 ... 174 175 ... 175 176 ...)) (subcontent
  org-export-latex-global... ... ... ... ... ...
  org-export-as-latex(nil)
  call-interactively(org-export-as-latex)
  org-export(nil)
  call-interactively(org-export nil nil)



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] 6.29c export latex bug?

2009-08-10 Thread Nick Dokos
zwz zhangwe...@gmail.com wrote:

 Here is the content of my org file:
   
  * Test
| | A | B | 
|-+---+---| 
| com | 1 | 2 | 
| org | 3 | 4 | 

Some math formulae: 

y =3D x_1^2 + x_2^2   

y^2 =3D 2x^2 + 1  

z_2 =3D x_1 + x_2 + 2 (y_1 + y_2 + r) 
   
 
 Then I press C-c C-e l, I get the debug back-trace:
 
 Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
   replace-regexp-in-string(|| | nil)
   org-export-latex-tables(t)
 

I can reproduce this. I also tried with a different table and I can
verify zwz's subsequent finding that a non-empty, non-headline line
above the table fixes it. I looked at the org-export-latex-tables
code, but since I couldn't come up with something obvious, I did
a git bisect and got this:

31ceed47ffd3070418dd34316fef8869d2434c26 is first bad commit
commit 31ceed47ffd3070418dd34316fef8869d2434c26
Author: Carsten Dominik carsten.domi...@gmail.com
Date:   Tue Jun 30 07:24:57 2009 +0200

New minor mode org-indent-mode

This mode implements outline indentation similar to clean view, but in
a dynamic and virtual way, at display time.

HTH,
Nick

PS. Note that org-indent-mode is *not* enabled. I get an error when I try
to enable it, but that's another story.


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] 6.29c export latex bug?

2009-08-10 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:


 31ceed47ffd3070418dd34316fef8869d2434c26 is first bad commit
 commit 31ceed47ffd3070418dd34316fef8869d2434c26
 Author: Carsten Dominik carsten.domi...@gmail.com
 Date:   Tue Jun 30 07:24:57 2009 +0200
 
 New minor mode org-indent-mode
 
 This mode implements outline indentation similar to clean view, but in
 a dynamic and virtual way, at display time.
 

I looked over the commit and saw this change to org-table.el:

...
(if (equal (char-before) ?\n)
;; This hack is for org-indent, to force redisplay of the
;; line prefix of the first line. Apparently the redisplay
;; is tied to the newline, which is, I think, a bug.
;; To force this redisplay, we remove and re-insert the
;; newline, so that the redisplay engine thinks it belongs
;; to the changed text.
(progn
  (backward-delete-char 1)
  (insert \n)))
...

I commented it out and the export of the table worked - but I have no
idea why.

Nick




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode