emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: joakim@verona.se
To: emacs-orgmode@gnu.org
Subject: Re: New feature branch: org-xhtml-and-org-odt
Date: Mon, 14 Nov 2011 13:29:44 +0100	[thread overview]
Message-ID: <m3d3cuubt3.fsf@chopper.vpn.verona.se> (raw)
In-Reply-To: 81lirjdsu3.fsf@gmail.com

Jambunathan K <kjambunathan@gmail.com> writes:

> Bastien
>
> I have created a new feature branch named "org-xhtml-and-org-odt".
>
> The main "feature" introduced by this branch is:
>
> 1. The HTML exporter in lisp/org-html.el is *totally* rewritten. It
>    should be on par with the current HTML exporter in the master branch.
>
>    Note: Anyone who depends on HTML export for his day-to-day work
>    *must* make sure that nothing is broken.
>
> 2. The ODT exporter is now moved to lisp/org-odt.el
>
> Additional Info:
>
> 1. testing
>    - There is a testfile in contrib/odt/tests/test.org which users can use
>      to unit test the changes.
>
> 2. info manual 
>
>    - I have updated the ODT section in the info manual and it is worth a
>      read for serious users. (Chirstian, I will revise the manual later
>      in the day. For now, it is pretty much same as what you had seen
>      last time.)
>
> Let me know if there are any questions or comments. 

I hope this is not OT but I have a question regarding this new
infrastructure.

I have a project at github called inkmacs, which integrates inkscape,
org-mode, and emacs:

https://github.com/jave/inkmacs

There I support interactive transfer of org nodes to inkscapes text
nodes.

My current code to extract the org nodes is not beautiful and I though
maybe org-lparse improves the situation?

Below is an excerpt from the code. As you can see it's very primitive
and does not support many org constructs. (Its surprisingly useful
anyway though)


-----
(defun org-get-entry-2 ()
  "Get the entry text, after heading, to next heading, or eof."
  (save-excursion
    (org-back-to-heading t)
    (let ((p1 (point-at-bol 2))
          (p2 (progn (forward-line) (search-forward "*" nil t))))
      (setq p2 (if (null p2) (point-max)
                 (1- p2)))
      (buffer-substring p1  p2))))

(defun inkorg-entry-text ()
  "Extract text from current org node.
Return a format suitable to
create an inkscape text node from.
asterisks and properties are removed."
  ;;TODO there ought to be some code in org-exp for this somewhere(org-ascii for example)
  (let ((text  (concat (org-get-heading) "\n" (org-get-entry-2))))
    (set-text-properties 0 (length text) nil text )

    (replace-regexp-in-string "\\([^\n]\\)\n\\([^\n]\\)" "\\1 \\2" 
                              (concat
                               (substring text 0 (string-match org-property-start-re text))
                               (if (string-match org-property-end-re text)
                                   (substring text (progn (string-match org-property-end-re text) (match-end 0)) (length text)))))))
----------

>
> Jambunathan K.

-- 
Joakim Verona

  parent reply	other threads:[~2011-11-14 12:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14  8:13 New feature branch: org-xhtml-and-org-odt Jambunathan K
2011-11-14  8:41 ` Jambunathan K
2011-11-15 19:35   ` Bastien
2011-11-14 12:29 ` joakim [this message]
2011-11-15 19:39   ` Bastien
2011-11-16  8:51     ` joakim
2011-11-16  9:09       ` Bastien
2011-11-16 10:01         ` joakim
2011-11-14 20:06 ` Matt Price
2011-11-14 20:28   ` suvayu ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d3cuubt3.fsf@chopper.vpn.verona.se \
    --to=joakim@verona.se \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).