[O] Rendering quoted HTML outside the last headline's HTML.
Hi there! I render the org-mode project of my website using HTML export functions. I created a three-columns layout by using the Bootstrap (http://getbootstrap.com/) and by wrapping the first three columns within a div element of class "row". I do this by prepending and appending some static html via the #+HTML directive, as in: #+HTML: and #+HTML: Also, I set the HTML_CONTAINER variable to use proper css classes: #+HTML_CONTAINER: div class="col-md-4" Now the problems arise: 1) I have noticed that when closing the headline tag, org will generate a syntactically wrong tag. Most browser will ignore such mistakes but it's still annoying. 2) Everything works okay if there are three or less columns. When adding another column, I close the "row" container and open another one, by adding #+HTML: #+HTML: But this code is rendered within the HTML code of the previous headline. In general, it is not clear "where" a piece of HTML will be rendered. Is there a way to specify that? Is there a way to say, like: "this piece of HTML is not part of the current headline and should be rendered after the last headline has been rendered" ? Thanks in advance, -- Emanuele Santoro
[Orgmode] [OT] Exporting org files to html from outside GNU Emacs
I'll be a little OT, I'm sorry. Hello people, I'm writing a sort of wiki software, and i want it to use Org-Mode's syntax for its documents. Thus, I'd need to have some code to export org files to HTML. Something like a library for Php or Perl. Is anyone planning to write something like that? Now, in the meantime, it's ok for me to use an underlying emacs for do the html export, via the org-export-as-html-batch function. I can export org-files by calling, in Perl: my $args = '/usr/bin/emacs -q --batch ' . --visit=$DOCUMENT . '--funcall org-export-as-html-batch '. /dev/null 21; (I know it's ugly code, but it's still a draft) It works, but it's damned slow since it has to spawn a new full emacs process each time. Since I usually use emacs in daemon mode, I then tried to use my emacsclient to export org files, writing this silly function: (defun batch-export-file (orgdoc) open and export an file (interactive ) (save-excursion (find-file orgdoc) (set-buffer (file-name-nondirectory orgdoc)) (org-export-as-html-batch) (write-file (concat (file-name-directory org-doc) / (file-name-sans-extension (file-name-nondirectory org-doc)) As you can see, I'm not a proficient elisp programmer. The aim is to run emacsclient -e (batch-export-file $my_file_path), but still it isn't fully working. Any idea on how to improve it? Sorry for being OT and thanks in advance. Cheers, -- Emanuele Santoro signature.asc Description: Digital signature ___ 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
[Orgmode] org-export-as-html: Wrong type argument: stringp, t
Hello, I've been using GNU Emacs and the magnificent org-mode for about a year, but now I'm having troubles at exporting a org document to html as i always did up to this morning. I am running Debian GNU/Linux 6.0 «Squeeze» (now still in testing) and emacs 23.2.1 . Debian ships org-mode 7.01g as separate, optional package. I used to use org-mode 6.33x i had in my home folder. But let's assume i want to use the debian package, since keeping an old version of the package isn't an adviceable thing, and since i get the same error despite the version switch. The error i get when publishing a file is: org-export-as-html: Wrong type argument: stringp, t So i try M-x toggle-debug-on-error. Then i try C-e F (publish this file). That's what i get: 8-88--88--88--8 Debugger entered--Lisp error: (wrong-type-argument stringp t) string-match(\\S- t) org-export-as-html(1 nil (:buffer-will-be-killed t :base-directory ~/sito/org-files/ :publishing-directory ~/sito/html/ :publish-function org-publish-org-to-html :style link rel=\stylesheet\ type=\text/css\ href=\style.css\ / :auto-index nil :convert-org-links t :section-numbers nil :author Emanuele Santoro :email sant...@autistici.org :table-of-contents 1 :headline-levels 1 :language it :link-home t :plain-source nil :auto-preamble t) nil nil /home/manu/sito/html/) org-publish-org-to(html (:base-directory ~/sito/org-files/ :publishing-directory ~/sito/html/ :publish-function org-publish-org-to-html :style link rel=\stylesheet\ type=\text/css\ href=\style.css\ / :auto-index nil :convert-org-links t :section-numbers nil :author Emanuele Santoro :email sant...@autistici.org :table-of-contents 1 :headline-levels 1 :language it :link-home t :plain-source nil :auto-preamble t) /home/manu/sito/org-files/fortune-manager.org /home/manu/sito/html/) org-publish-org-to-html((:base-directory ~/sito/org-files/ :publishing-directory ~/sito/html/ :publish-function org-publish-org-to-html :style link rel=\stylesheet\ type=\text/css\ href=\style.css\ / :auto-index nil :convert-org-links t :section-numbers nil :author Emanuele Santoro :email sant...@autistici.org :table-of-contents 1 :headline-levels 1 :language it :link-home t :plain-source nil :auto-preamble t) /home/manu/sito/org-files/fortune-manager.org /home/manu/sito/html/) org-publish-file(/home/manu/sito/org-files/fortune-manager.org) byte-code(205 Debugger entered--Lisp error: (wrong-type-argument stringp t) string-match(\\S- t) org-export-as-html(1 nil (:buffer-will-be-killed t :base-directory ~/sito/org-files/ :publishing-directory ~/sito/html/ :publish-function org-publish-org-to-html :style link rel=\stylesheet\ type=\text/css\ href=\style.css\ / :auto-index nil :convert-org-links t :section-numbers nil :author Emanuele Santoro :email sant...@autistici.org :table-of-contents 1 :headline-levels 1 :language it :link-home t :plain-source nil :auto-preamble t) nil nil /home/manu/sito/html/) org-publish-org-to(html (:base-directory ~/sito/org-files/ :publishing-directory ~/sito/html/ :publish-function org-publish-org-to-html :style link rel=\stylesheet\ type=\text/css\ href=\style.css\ / :auto-index nil :convert-org-links t :section-numbers nil :author Emanuele Santoro :email sant...@autistici.org :table-of-contents 1 :headline-levels 1 :language it :link-home t :plain-source nil :auto-preamble t) /home/manu/sito/org-files/fortune-manager.org /home/manu/sito/html/) org-publish-org-to-html((:base-directory ~/sito/org-files/ :publishing-directory ~/sito/html/ :publish-function org-publish-org-to-html :style link rel=\stylesheet\ type=\text/css\ href=\style.css\ / :auto-index nil :convert-org-links t :section-numbers nil :author Emanuele Santoro :email sant...@autistici.org :table-of-contents 1 :headline-levels 1 :language it :link-home t :plain-source nil :auto-preambl \302\303 !)\207 [force org-publish-use-timestamps-flag org-publish-file buffer-file-name] 2) org-publish-current-file(nil) call-interactively(org-publish-current-file) org-export(nil) call-interactively(org-export nil nil) 8-88--88--88--8 And now i cannot export org-files and update my website anymore. Any hints on how to solve this problem? Thanks in advance. Cheers, -- Emanuele Santoro signature.asc Description: Digital signature ___ 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
Re: [Orgmode] org-export-as-html: Wrong type argument: stringp, t
On Thu, Sep 09, 2010 at 05:45:46PM +0200, Emanuele Santoro wrote: org-export-as-html: Wrong type argument: stringp, t Ok, ok. Thank you all (all?) for the great answers, but I solved by myself. There was an error in my org-publish-project-alist. My main project had a wrong :link-home property, which lead to an error raised when the option was evaluated. After some debugging, i then fixed setting an appropriate value. Seems that older emacs versions didn't actually what was the content of the value.. Ok, bye people :-) -- Emanuele Santoro signature.asc Description: Digital signature ___ 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