emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: can't export org file with tables to html [7.01trans]
@ 2010-10-27 13:29 Uwe Brauer
  2010-10-27 13:48 ` Noorul Islam
  2010-10-27 14:09 ` Nick Dokos
  0 siblings, 2 replies; 9+ messages in thread
From: Uwe Brauer @ 2010-10-27 13:29 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

Hello 

I have an org file of the form 

| Nom                       | e-mail                           | Téléphone   |
|---------------------------+----------------------------------+-------------|
| Uwe Brauer                | oub.oub.oub@gmail.com            | 123 456 789 |
when I try to export it to html I obtain an error, whose trace I attach
(debug-on-error t)

Uwe Brauer 


[-- Attachment #2: org-html-bug3 --]
[-- Type: application/octet-stream, Size: 13559 bytes --]

Debugger entered--Lisp error: (wrong-type-argument stringp #<compiled-function (txt) "...(28)" [aligns no-css txt org-export-html-table-align-individual-fields n "" string-to-number match-string 1 format " align=\"%s\"" " class=\"%s\"" "left"] 4>)
  wrong-type-argument(stringp #<compiled-function (txt) "...(28)" [aligns no-css txt org-export-html-table-align-individual-fields n "" string-to-number match-string 1 format " align=\"%s\"" " class=\"%s\"" "left"] 4>)
  replace-in-string("<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">" "@@class\\([0-9]+\\)@@" #<compiled-function (txt) "...(28)" [aligns no-css txt org-export-html-table-align-individual-fields n "" string-to-number match-string 1 format " align=\"%s\"" " class=\"%s\"" "left"] 4> nil)
  replace-regexp-in-string("@@class\\([0-9]+\\)@@" #<compiled-function (txt) "...(28)" [aligns no-css txt org-export-html-table-align-individual-fields n "" string-to-number match-string 1 format " align=\"%s\"" " class=\"%s\"" "left"] 4> "<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">")
  #<compiled-function (x) "...(6)" [x replace-regexp-in-string "@@class\\([0-9]+\\)@@" #<compiled-function ... "...(28)" ... 4>] 4>("<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">")
  mapcar(#<compiled-function (x) "...(6)" [x replace-regexp-in-string "@@class\\([0-9]+\\)@@" #<compiled-function ... "...(28)" ... 4>] 4> ("<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">" "<caption></caption>" "<colgroup><col class=\"left\" /><col class=\"left\" /><col class=\"left\" />" "</colgroup>" "<thead>" "<tr><th scope=\"col\"@@class000@@>Nom</th><th scope=\"col\"@@class001@@>e-mail</th><th scope=\"col\"@@class002@@>Téléphone</th></tr>" "</thead>" "<tbody>" "<tr><td@@class000@@>Elena Fernandez</td><td@@class001@@>fernandez.garcia.elena@gmail.com</td><td@@class002@@>650 330 506</td></tr>" "<tr><td@@class000@@>Maria Alameda</td><td@@class001@@>ma<sub>alameda</sub>@hotmail.com</td><td@@class002@@>650 830 036</td></tr>" "<tr><td@@class000@@>Paloma Sangro Alcázar</td><td@@class001@@>pasangro@msn.com</td><td@@class002@@>670 913 135</td></tr>" "<tr><td@@class000@@>José Manual Yagüe Sevilla</td><td@@class001@@>yaguetala@hotmail.com</td><td@@class002@@>653 442 316</td></tr>" "<tr><td@@class000@@>Federico Olmedo</td><td@@class001@@>federico1983@gmail.com</td><td@@class002@@>615 012 076</td></tr>" "<tr><td@@class000@@>Eugenio Quintar</td><td@@class001@@>eqmorillo@hotmail.com</td><td@@class002@@>600 532 111</td></tr>" "<tr><td@@class000@@>Leyre Sanjuro</td><td@@class001@@>lyre.sanjurjo@gmail.com</td><td@@class002@@>685 251 313</td></tr>" "<tr><td@@class000@@>Uwe Brauer</td><td@@class001@@>oub.oub.oub@gmail.com</td><td@@class002@@>634 530 303</td></tr>" "<tr><td@@class000@@>Luis Calvo</td><td@@class001@@>mulenno@hotmail.com</td><td@@class002@@>646 500 564</td></tr>" "</tbody>" "</table>\n"))
  org-format-org-table-html(("| Nom                       | e-mail                           | Téléphone   |" "|---------------------------+----------------------------------+-------------|" "| Elena Fernandez           | fernandez.garcia.elena@gmail.com | 650 330 506 |" "| Maria Alameda             | ma<sub>alameda</sub>@hotmail.com           | 650 830 036 |" "| Paloma Sangro Alcázar     | pasangro@msn.com                 | 670 913 135 |" "| José Manual Yagüe Sevilla | yaguetala@hotmail.com            | 653 442 316 |" "| Federico Olmedo           | federico1983@gmail.com           | 615 012 076 |" "| Eugenio Quintar           | eqmorillo@hotmail.com            | 600 532 111 |" "| Leyre Sanjuro             | lyre.sanjurjo@gmail.com          | 685 251 313 |" "| Uwe Brauer                | oub.oub.oub@gmail.com            | 634 530 303 |" "| Luis Calvo                | mulenno@hotmail.com              | 646 500 564 |") nil nil)
  org-format-table-html(("| Nom                       | e-mail                           | Téléphone   |" "|---------------------------+----------------------------------+-------------|" "| Elena Fernandez           | fernandez.garcia.elena@gmail.com | 650 330 506 |" "| Maria Alameda             | ma<sub>alameda</sub>@hotmail.com           | 650 830 036 |" "| Paloma Sangro Alcázar     | pasangro@msn.com                 | 670 913 135 |" "| José Manual Yagüe Sevilla | yaguetala@hotmail.com            | 653 442 316 |" "| Federico Olmedo           | federico1983@gmail.com           | 615 012 076 |" "| Eugenio Quintar           | eqmorillo@hotmail.com            | 600 532 111 |" "| Leyre Sanjuro             | lyre.sanjurjo@gmail.com          | 685 251 313 |" "| Uwe Brauer                | oub.oub.oub@gmail.com            | 634 530 303 |" "| Luis Calvo                | mulenno@hotmail.com              | 646 500 564 |") ("| Nom                       | e-mail                           | Téléphone   |" "|---------------------------+----------------------------------+-------------|" "| Elena Fernandez           | fernandez.garcia.elena@gmail.com | 650 330 506 |" "| Maria Alameda             | ma_alameda@hotmail.com           | 650 830 036 |" "| Paloma Sangro Alcázar     | pasangro@msn.com                 | 670 913 135 |" "| José Manual Yagüe Sevilla | yaguetala@hotmail.com            | 653 442 316 |" "| Federico Olmedo           | federico1983@gmail.com           | 615 012 076 |" "| Eugenio Quintar           | eqmorillo@hotmail.com            | 600 532 111 |" "| Leyre Sanjuro             | lyre.sanjurjo@gmail.com          | 685 251 313 |" "| Uwe Brauer                | oub.oub.oub@gmail.com            | 634 530 303 |" "| Luis Calvo                | mulenno@hotmail.com              | 646 500 564 |"))
  byte-code("..." [local-list-type type start desc path line string-match "^\\*+ " "</pre>\n" org-open-par nil org-html-protect "\n" throw nextline "^[ 	]*:\\(\\([ 	]\\|$\\)\\(.*\\)\\)" t org-close-par-maybe "<pre class=\"example\">\n" match-string 3 "ORG-LIST-END" org-close-li format "</%sl>\n" get-text-property 0 org-protected original-indentation re-search-backward "\\(<p>\\)\\([ 	\r\n]*\\)\\=" 100 1 replace-match "\\2\n" "<p>\n" "ORG-BLOCKQUOTE-START" "<blockquote>\n" "ORG-BLOCKQUOTE-END" "\n</blockquote>\n" "ORG-VERSE-START" "\n<p class=\"verse\">\n" "ORG-VERSE-END" "</p>\n" "ORG-CENTER-START" "\n<div style=\"text-align: center\">" "ORG-CENTER-END" "\n</div>" run-hooks org-export-html-after-blockquotes-hook ...] 12)
  org-export-as-html(nil)
  call-interactively(org-export-as-html)
  org-export(nil)
  call-interactively(org-export)
  recursive-edit()
  byte-code("..." [buffer-read-only noninteractive debugger-buffer middlestart debugger-args debugger-batch-max-lines pop-to-buffer debugger-mode debugger-setup-buffer count-lines 2 "...\n" message buffer-string kill-emacs debug backtrace-debug 3 t debugger-reenable "" nil recursive-edit standard-output] 3)
  debug(error (wrong-type-argument stringp #<compiled-function (txt) "...(28)" [aligns no-css txt org-export-html-table-align-individual-fields n "" string-to-number match-string 1 format " align=\"%s\"" " class=\"%s\"" "left"] 4>))
  wrong-type-argument(stringp #<compiled-function (txt) "...(28)" [aligns no-css txt org-export-html-table-align-individual-fields n "" string-to-number match-string 1 format " align=\"%s\"" " class=\"%s\"" "left"] 4>)
  replace-in-string("<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">" "@@class\\([0-9]+\\)@@" #<compiled-function (txt) "...(28)" [aligns no-css txt org-export-html-table-align-individual-fields n "" string-to-number match-string 1 format " align=\"%s\"" " class=\"%s\"" "left"] 4> nil)
  replace-regexp-in-string("@@class\\([0-9]+\\)@@" #<compiled-function (txt) "...(28)" [aligns no-css txt org-export-html-table-align-individual-fields n "" string-to-number match-string 1 format " align=\"%s\"" " class=\"%s\"" "left"] 4> "<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">")
  #<compiled-function (x) "...(6)" [x replace-regexp-in-string "@@class\\([0-9]+\\)@@" #<compiled-function ... "...(28)" ... 4>] 4>("<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">")
  mapcar(#<compiled-function (x) "...(6)" [x replace-regexp-in-string "@@class\\([0-9]+\\)@@" #<compiled-function ... "...(28)" ... 4>] 4> ("<table border=\"2\" cellspacing=\"0\" cellpadding=\"6\" rules=\"groups\" frame=\"hsides\">" "<caption></caption>" "<colgroup><col class=\"left\" /><col class=\"left\" /><col class=\"left\" />" "</colgroup>" "<thead>" "<tr><th scope=\"col\"@@class000@@>Nom</th><th scope=\"col\"@@class001@@>e-mail</th><th scope=\"col\"@@class002@@>Téléphone</th></tr>" "</thead>" "<tbody>" "<tr><td@@class000@@>Elena Fernandez</td><td@@class001@@>fernandez.garcia.elena@gmail.com</td><td@@class002@@>650 330 506</td></tr>" "<tr><td@@class000@@>Maria Alameda</td><td@@class001@@>ma<sub>alameda</sub>@hotmail.com</td><td@@class002@@>650 830 036</td></tr>" "<tr><td@@class000@@>Paloma Sangro Alcázar</td><td@@class001@@>pasangro@msn.com</td><td@@class002@@>670 913 135</td></tr>" "<tr><td@@class000@@>José Manual Yagüe Sevilla</td><td@@class001@@>yaguetala@hotmail.com</td><td@@class002@@>653 442 316</td></tr>" "<tr><td@@class000@@>Federico Olmedo</td><td@@class001@@>federico1983@gmail.com</td><td@@class002@@>615 012 076</td></tr>" "<tr><td@@class000@@>Eugenio Quintar</td><td@@class001@@>eqmorillo@hotmail.com</td><td@@class002@@>600 532 111</td></tr>" "<tr><td@@class000@@>Leyre Sanjuro</td><td@@class001@@>lyre.sanjurjo@gmail.com</td><td@@class002@@>685 251 313</td></tr>" "<tr><td@@class000@@>Uwe Brauer</td><td@@class001@@>oub.oub.oub@gmail.com</td><td@@class002@@>634 530 303</td></tr>" "<tr><td@@class000@@>Luis Calvo</td><td@@class001@@>mulenno@hotmail.com</td><td@@class002@@>646 500 564</td></tr>" "</tbody>" "</table>\n"))
  org-format-org-table-html(("| Nom                       | e-mail                           | Téléphone   |" "|---------------------------+----------------------------------+-------------|" "| Elena Fernandez           | fernandez.garcia.elena@gmail.com | 650 330 506 |" "| Maria Alameda             | ma<sub>alameda</sub>@hotmail.com           | 650 830 036 |" "| Paloma Sangro Alcázar     | pasangro@msn.com                 | 670 913 135 |" "| José Manual Yagüe Sevilla | yaguetala@hotmail.com            | 653 442 316 |" "| Federico Olmedo           | federico1983@gmail.com           | 615 012 076 |" "| Eugenio Quintar           | eqmorillo@hotmail.com            | 600 532 111 |" "| Leyre Sanjuro             | lyre.sanjurjo@gmail.com          | 685 251 313 |" "| Uwe Brauer                | oub.oub.oub@gmail.com            | 634 530 303 |" "| Luis Calvo                | mulenno@hotmail.com              | 646 500 564 |") nil nil)
  org-format-table-html(("| Nom                       | e-mail                           | Téléphone   |" "|---------------------------+----------------------------------+-------------|" "| Elena Fernandez           | fernandez.garcia.elena@gmail.com | 650 330 506 |" "| Maria Alameda             | ma<sub>alameda</sub>@hotmail.com           | 650 830 036 |" "| Paloma Sangro Alcázar     | pasangro@msn.com                 | 670 913 135 |" "| José Manual Yagüe Sevilla | yaguetala@hotmail.com            | 653 442 316 |" "| Federico Olmedo           | federico1983@gmail.com           | 615 012 076 |" "| Eugenio Quintar           | eqmorillo@hotmail.com            | 600 532 111 |" "| Leyre Sanjuro             | lyre.sanjurjo@gmail.com          | 685 251 313 |" "| Uwe Brauer                | oub.oub.oub@gmail.com            | 634 530 303 |" "| Luis Calvo                | mulenno@hotmail.com              | 646 500 564 |") ("| Nom                       | e-mail                           | Téléphone   |" "|---------------------------+----------------------------------+-------------|" "| Elena Fernandez           | fernandez.garcia.elena@gmail.com | 650 330 506 |" "| Maria Alameda             | ma_alameda@hotmail.com           | 650 830 036 |" "| Paloma Sangro Alcázar     | pasangro@msn.com                 | 670 913 135 |" "| José Manual Yagüe Sevilla | yaguetala@hotmail.com            | 653 442 316 |" "| Federico Olmedo           | federico1983@gmail.com           | 615 012 076 |" "| Eugenio Quintar           | eqmorillo@hotmail.com            | 600 532 111 |" "| Leyre Sanjuro             | lyre.sanjurjo@gmail.com          | 685 251 313 |" "| Uwe Brauer                | oub.oub.oub@gmail.com            | 634 530 303 |" "| Luis Calvo                | mulenno@hotmail.com              | 646 500 564 |"))
  byte-code("..." [local-list-type type start desc path line string-match "^\\*+ " "</pre>\n" org-open-par nil org-html-protect "\n" throw nextline "^[ 	]*:\\(\\([ 	]\\|$\\)\\(.*\\)\\)" t org-close-par-maybe "<pre class=\"example\">\n" match-string 3 "ORG-LIST-END" org-close-li format "</%sl>\n" get-text-property 0 org-protected original-indentation re-search-backward "\\(<p>\\)\\([ 	\r\n]*\\)\\=" 100 1 replace-match "\\2\n" "<p>\n" "ORG-BLOCKQUOTE-START" "<blockquote>\n" "ORG-BLOCKQUOTE-END" "\n</blockquote>\n" "ORG-VERSE-START" "\n<p class=\"verse\">\n" "ORG-VERSE-END" "</p>\n" "ORG-CENTER-START" "\n<div style=\"text-align: center\">" "ORG-CENTER-END" "\n</div>" run-hooks org-export-html-after-blockquotes-hook ...] 12)
  org-export-as-html(nil)
  call-interactively(org-export-as-html)
  org-export(nil)
  call-interactively(org-export)

[-- Attachment #3: Type: text/plain, Size: 2732 bytes --]




Emacs  : XEmacs 21.4 (patch 21) "Educational Television" [Lucid] (i486-linux-gnu, Mule) of Sat Aug  2 2008 on palmer
Package: Org-mode version 7.01trans

current state:
==============
(setq
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines
				  org-optimize-window-after-visibility-change)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
 outline-mode-hook '(hide-body)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe
					  org-babel-hide-result-toggle-maybe)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-babel-pre-tangle-hook '(save-buffer)
 outline-regexp "  [A-Z,0-9,-]*:1.1"
 org-mode-hook '(#<compiled-function nil "...(7)"
				 [org-add-hook change-major-mode-hook org-show-block-all append local] 5> #<compiled-function
				 nil "...(7)" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5>
				 org-babel-result-hide-spec org-babel-hide-all-hashes my-org-keys turn-on-flyspell
				 iso-accents-mode turn-on-auto-capitalize-mode)
 org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers)
 org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code)
 outline-minor-mode-hook '((lambda nil (local-set-key [(shift return)] (quote hide-body))))
 org-export-preprocess-after-include-files-hook '(org-export-blocks-preprocess)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-include-diary t
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames
							   org-beamer-place-default-actions-for-lists)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks))
 org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-export-blocks-format-comment t)
					 (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil))
 org-occur-hook '(org-first-headline-recenter)
 org-table-default-size "3x3"
 )

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

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

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

* Re: Bug: can't export org file with tables to html [7.01trans]
  2010-10-27 13:29 Bug: can't export org file with tables to html [7.01trans] Uwe Brauer
@ 2010-10-27 13:48 ` Noorul Islam
  2010-10-27 14:09 ` Nick Dokos
  1 sibling, 0 replies; 9+ messages in thread
From: Noorul Islam @ 2010-10-27 13:48 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: emacs-orgmode

On Wed, Oct 27, 2010 at 6:59 PM, Uwe Brauer <oub@mat.ucm.es> wrote:
>
> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?  See
>
>     http://orgmode.org/manual/Feedback.html#Feedback
>
> Your bug report will be posted to the Org-mode mailing list.
> ------------------------------------------------------------------------
>
> Hello
>
> I have an org file of the form
>
> | Nom                       | e-mail                           | Téléphone   |
> |---------------------------+----------------------------------+-------------|
> | Uwe Brauer                | oub.oub.oub@gmail.com            | 123 456 789 |
> when I try to export it to html I obtain an error, whose trace I attach
> (debug-on-error t)
>

I tried to replicate this issue but I did not succeed.

The attached file tells that org file contains more table entries than
what you quoted in the bug report. I think you need to post all of
them here. It might be because of one of the field entries which is
causing this error.

Thanks and Regards
Noorul

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

* Re: Bug: can't export org file with tables to html [7.01trans]
  2010-10-27 13:29 Bug: can't export org file with tables to html [7.01trans] Uwe Brauer
  2010-10-27 13:48 ` Noorul Islam
@ 2010-10-27 14:09 ` Nick Dokos
  2010-10-27 14:30   ` Nick Dokos
  2010-10-27 15:04   ` Bug: can't export org file with tables to html [7.01trans] Uwe Brauer
  1 sibling, 2 replies; 9+ messages in thread
From: Nick Dokos @ 2010-10-27 14:09 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: nicholas.dokos, emacs-orgmode

Uwe Brauer <oub@mat.ucm.es> wrote:


> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?  See
> 
>      http://orgmode.org/manual/Feedback.html#Feedback
> 
> Your bug report will be posted to the Org-mode mailing list.
> ------------------------------------------------------------------------
> 
> Hello 
> 
> I have an org file of the form 
> 
> | Nom                       | e-mail                           | Telephone   |
> |---------------------------+----------------------------------+-------------|
> | Uwe Brauer                | oub.oub.oub@gmail.com            | 123 456 789 |
> when I try to export it to html I obtain an error, whose trace I attach
> (debug-on-error t)
> 

No problem on GNU emacs 23.2.50 or 24.0.50 - must be specific to Xemacs.

> 
> Content-Type: application/octet-stream
>

Harrumph - brain-dead mailers like T'bird force this on you [fn:1], but
you seem to be using Gnus: can't you ask it to make a proper attachment?
text/plain would be ideal in this case.

Nick

Footnotes:

[fn:1] OT, but I would like to be proved wrong in this: is there a way
to specify the MIME type of an attachment on the fly with T'bird?

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

* Re: Bug: can't export org file with tables to html [7.01trans]
  2010-10-27 14:09 ` Nick Dokos
@ 2010-10-27 14:30   ` Nick Dokos
  2010-10-27 15:07     ` Uwe Brauer
  2010-10-27 15:24     ` solved; sort of (was: Bug: can't export org file with tables to html [7.01trans]) Uwe Brauer
  2010-10-27 15:04   ` Bug: can't export org file with tables to html [7.01trans] Uwe Brauer
  1 sibling, 2 replies; 9+ messages in thread
From: Nick Dokos @ 2010-10-27 14:30 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Uwe Brauer, emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> wrote:

> Uwe Brauer <oub@mat.ucm.es> wrote:
> 
> 
> > Remember to cover the basics, that is, what you expected to happen and
> > what in fact did happen.  You don't know how to make a good report?  See
> > 
> >      http://orgmode.org/manual/Feedback.html#Feedback
> > 
> > Your bug report will be posted to the Org-mode mailing list.
> > ------------------------------------------------------------------------
> > 
> > Hello 
> > 
> > I have an org file of the form 
> > 
> > | Nom                       | e-mail                           | Telephone   |
> > |---------------------------+----------------------------------+-------------|
> > | Uwe Brauer                | oub.oub.oub@gmail.com            | 123 456 789 |
> > when I try to export it to html I obtain an error, whose trace I attach
> > (debug-on-error t)
> > 
> 
> No problem on GNU emacs 23.2.50 or 24.0.50 - must be specific to Xemacs.
> 

C-h v replace-regexp-in-string says (among other things):

,----
| REP is either a string used as the NEWTEXT arg of `replace-match' or a
| function.  If it is a function, it is called with the actual text of each
| match, and its value is used as the replacement text.  When REP is called,
| the match-data are the result of matching REGEXP against a substring
| of STRING.
`----

Maybe the Xemacs implementation of this function cannot deal with functions
as the replacement (second) argument?

Nick

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

* Re: Bug: can't export org file with tables to html [7.01trans]
  2010-10-27 14:09 ` Nick Dokos
  2010-10-27 14:30   ` Nick Dokos
@ 2010-10-27 15:04   ` Uwe Brauer
  1 sibling, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2010-10-27 15:04 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

>> Regarding Re: [Orgmode] Bug: can't export org file with tables to html [7.01trans]; Nick Dokos <nicholas.dokos@hp.com> adds:
   >> 

   > No problem on GNU emacs 23.2.50 or 24.0.50 - must be specific to Xemacs.

   >> 
   >> Content-Type: application/octet-stream
   >> 

   > Harrumph - brain-dead mailers like T'bird force this on
   > you [fn:1], but you seem to be using Gnus: can't you
   > ask it to make a proper attachment?  text/plain would
   > be ideal in this case.

My fault, I tend to be careless about it.

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

* Re: Bug: can't export org file with tables to html [7.01trans]
  2010-10-27 14:30   ` Nick Dokos
@ 2010-10-27 15:07     ` Uwe Brauer
  2010-10-27 16:38       ` Carsten Dominik
  2010-10-27 15:24     ` solved; sort of (was: Bug: can't export org file with tables to html [7.01trans]) Uwe Brauer
  1 sibling, 1 reply; 9+ messages in thread
From: Uwe Brauer @ 2010-10-27 15:07 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

>> Regarding Re: [Orgmode] Bug: can't export org file with tables to html [7.01trans]; Nick Dokos <nicholas.dokos@hp.com> adds:
   >> > 
   >> 
   >> No problem on GNU emacs 23.2.50 or 24.0.50 - must be specific to Xemacs.
   >> 


I just checked, the html export works fine for the org file
in question if I stick to version 6.34 but not for 6.36 nor
the most recent git version.


   > C-h v replace-regexp-in-string says (among other things):

I think this function was not used before in this
context. It  does not exist in Xemacs 21.4.X, I check
whether it exists in Xemacs 21.5 and whether it can be
ported back.

Uwe 

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

* solved; sort of (was: Bug: can't export org file with tables to html [7.01trans])
  2010-10-27 14:30   ` Nick Dokos
  2010-10-27 15:07     ` Uwe Brauer
@ 2010-10-27 15:24     ` Uwe Brauer
  1 sibling, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2010-10-27 15:24 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

>> Regarding Re: [Orgmode] Bug: can't export org file with tables to html [7.01trans]; Nick Dokos <nicholas.dokos@hp.com> adds:

   >> 

   > C-h v replace-regexp-in-string says (among other things):

I just copied the function from Xemacs 21.5 and then the
export functions works again.

Carsten, may I ask you to include this function, maybe we
should have a xemacs-21.4-compat.el file?

thanks

Uwe 



(defun replace-regexp-in-string (regexp rep string &optional
					fixedcase literal subexp start)
  "Replace all matches for REGEXP with REP in STRING.

Return a new string containing the replacements.

Optional arguments FIXEDCASE and LITERAL are like the arguments with
the same names of function `replace-match'.  If START is non-nil,
start replacements at that index in STRING.

For compatibility with old XEmacs code and with recent GNU Emacs, the
interpretation of SUBEXP is somewhat complicated.  If SUBEXP is a
buffer, it is interpreted as the buffer which provides syntax tables
and case tables for the match and replacement.  If it is not a buffer,
the current buffer is used.  If SUBEXP is an integer, it is the index
of the subexpression of REGEXP which is to be replaced.

REP is either a string used as the NEWTEXT arg of `replace-match' or a
function.  If it is a function it is applied to each match to generate
the replacement passed to `replace-match'; the match-data at this
point are such that `(match-string SUBEXP STRING)' is the function's
argument if SUBEXP is an integer \(otherwise the whole match is passed
and replaced).

To replace only the first match (if any), make REGEXP match up to \\'
and replace a sub-expression, e.g.
  (replace-regexp-in-string \"\\(foo\\).*\\'\" \"bar\" \" foo foo\" nil nil 1)
    => \" bar foo\"

Signals `invalid-argument' if SUBEXP is not an integer, buffer, or nil;
or is an integer, but the indicated subexpression was not matched.
Signals `invalid-argument' if STRING is nil but the last text matched was a string,
or if STRING is a string but the last text matched was a buffer."

  ;; To avoid excessive consing from multiple matches in long strings,
  ;; don't just call `replace-match' continually.  Walk down the
  ;; string looking for matches of REGEXP and building up a (reversed)
  ;; list MATCHES.  This comprises segments of STRING which weren't
  ;; matched interspersed with replacements for segments that were.
  ;; [For a `large' number of replacments it's more efficient to
  ;; operate in a temporary buffer; we can't tell from the function's
  ;; args whether to choose the buffer-based implementation, though it
  ;; might be reasonable to do so for long enough STRING.]
  (let ((l (length string))
	(start (or start 0))
	(expndx (if (integerp subexp) subexp 0))
	matches str mb me)
    (save-match-data
      (while (and (< start l) (string-match regexp string start))
	(setq mb (match-beginning 0)
	      me (match-end 0))
	;; If we matched the empty string, make sure we advance by one char
	(when (= me mb) (setq me (min l (1+ mb))))
	;; Generate a replacement for the matched substring.
	;; Operate only on the substring to minimize string consing.
	;; Set up match data for the substring for replacement;
	;; presumably this is likely to be faster than munging the
	;; match data directly in Lisp.
	(string-match regexp (setq str (substring string mb me)))
	(setq matches
	      (cons (replace-match (if (stringp rep)
				       rep
				     (funcall rep (match-string expndx str)))
				   ;; no, this subexp shouldn't be expndx
				   fixedcase literal str subexp)
		    (cons (substring string start mb) ; unmatched prefix
			  matches)))
	(setq start me))
      ;; Reconstruct a string from the pieces.
      (setq matches (cons (substring string start l) matches)) ; leftover
      (apply #'concat (nreverse matches)))))

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

* Re: Bug: can't export org file with tables to html [7.01trans]
  2010-10-27 15:07     ` Uwe Brauer
@ 2010-10-27 16:38       ` Carsten Dominik
  2010-10-27 17:09         ` Uwe Brauer
  0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2010-10-27 16:38 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: nicholas.dokos, emacs-orgmode


On Oct 27, 2010, at 5:07 PM, Uwe Brauer wrote:

>>> Regarding Re: [Orgmode] Bug: can't export org file with tables to  
>>> html [7.01trans]; Nick Dokos <nicholas.dokos@hp.com> adds:
>>>>
>>>
>>> No problem on GNU emacs 23.2.50 or 24.0.50 - must be specific to  
>>> Xemacs.
>>>
>
>
> I just checked, the html export works fine for the org file
> in question if I stick to version 6.34 but not for 6.36 nor
> the most recent git version.
>
>
>> C-h v replace-regexp-in-string says (among other things):
>
> I think this function was not used before in this
> context. It  does not exist in Xemacs 21.4.X, I check
> whether it exists in Xemacs 21.5 and whether it can be
> ported back.

Why can't you just use 21.5?

Cheers
- Carsten

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

* Re: Bug: can't export org file with tables to html [7.01trans]
  2010-10-27 16:38       ` Carsten Dominik
@ 2010-10-27 17:09         ` Uwe Brauer
  0 siblings, 0 replies; 9+ messages in thread
From: Uwe Brauer @ 2010-10-27 17:09 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: nicholas.dokos, emacs-orgmode

>> Regarding Re: [Orgmode] Bug: can't export org file with tables to html [7.01trans]; Carsten Dominik <carsten.dominik@gmail.com> adds:


   > Why can't you just use 21.5?
Because x-symbol does not work correctly, sigh. And x-symbol
is the most important package for me.

I will give the most recent version of XEmacs 21.5  a try
though.

Uwe  

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

end of thread, other threads:[~2010-10-27 17:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-27 13:29 Bug: can't export org file with tables to html [7.01trans] Uwe Brauer
2010-10-27 13:48 ` Noorul Islam
2010-10-27 14:09 ` Nick Dokos
2010-10-27 14:30   ` Nick Dokos
2010-10-27 15:07     ` Uwe Brauer
2010-10-27 16:38       ` Carsten Dominik
2010-10-27 17:09         ` Uwe Brauer
2010-10-27 15:24     ` solved; sort of (was: Bug: can't export org file with tables to html [7.01trans]) Uwe Brauer
2010-10-27 15:04   ` Bug: can't export org file with tables to html [7.01trans] Uwe Brauer

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).