* Other software development for Org-mode
@ 2006-03-14 10:39 Carsten Dominik
2006-03-14 11:36 ` XOXO output (was Re: Other software development for Org-mode) Nic
0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2006-03-14 10:39 UTC (permalink / raw)
To: emacs-orgmode
I know that a few people are developing add-on software for Org-mode.
Maybe it is useful to make a list of these, to avoid duplicate work and
allow for feedback. I myself am aware of the following efforts.
XML export, for example XOXO or OPM or OPML.
There is already a XOXO exporter by Nic Ferrier, he posted it on
Usenet some time ago.
Bonsai Outliner for Windows/PalmOS, export/import options for Org-mode
files
Thomas Baumann has been working on these, but not finished the
org-to-bonsai branch if I remember correctly because of problems
with the data format
on the Palm.
org-mouse.el by Piotr Zielinski
This is a package with additional mouse support, also already
published on Usenet.
It does a number of things, like promotion/demotion with the mouse,
and a
context menu for mouse-clicks, for example with a list of TODO
keywords
when you click on TODO, or a list of priorities when you click on a
priority cookie.
Is there anything else I am not aware of?
- Carsten
--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477
^ permalink raw reply [flat|nested] 7+ messages in thread
* XOXO output (was Re: Other software development for Org-mode)
2006-03-14 10:39 Other software development for Org-mode Carsten Dominik
@ 2006-03-14 11:36 ` Nic
2006-04-03 7:35 ` Carsten Dominik
0 siblings, 1 reply; 7+ messages in thread
From: Nic @ 2006-03-14 11:36 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik <dominik@science.uva.nl> writes:
> I know that a few people are developing add-on software for Org-mode.
> Maybe it is useful to make a list of these, to avoid duplicate work and
> allow for feedback. I myself am aware of the following efforts.
>
>
> XML export, for example XOXO or OPM or OPML.
> There is already a XOXO exporter by Nic Ferrier, he posted it on
> Usenet some time ago.
I'm going to post it here because I want some feedback on it.
At the moment it outputs a simple XOXO view of an outline. It does not
handle org-mode content when it breaks away from an outline.
There's a reason for that: XOXO (and OPM and OPML) only specify the
outline format... nothing else.
So the question is: what do people want the non-outline org-mode
content to look like in an XOXO view?
- something like is already in org-mode's HTML output
- simpler XHTML
- something else entirely?
Btw... an XOXO exporter would be better than the current HTML exporter
because it would be more flexible. Using an XML transform (maybe XSLT,
maybe something else) on the exported XOXO could render the existing
HTML as well as any other HTML or XML.
Anyway... the source is at the bottom of this mail.
Nic
;; An org mode extension
;; Copyright (C) 2005 by Tapsell-Ferrier Limited
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
(defun org-export-as-xoxo-insert-into (buffer &rest output)
(with-current-buffer buffer
(apply 'insert output)))
(defun org-export-as-xoxo (&optional buffer)
"Export the org buffer as XOXO.
The XOXO buffer is named *xoxo-<source buffer name>*"
(interactive (list (current-buffer)))
;; A quickie abstraction
;; Output everything as XOXO
(with-current-buffer (get-buffer buffer)
(beginning-of-buffer)
(let ((out (get-buffer-create (concat "*xoxo-" (buffer-name buffer) "*")))
(last-level 1)
(hanging-li nil))
;; Check the output buffer is empty.
(with-current-buffer out
(delete-region (point-min) (point-max)))
;; Kick off the output
(org-export-as-xoxo-insert-into out "<ol class='xoxo'>\n")
(while (re-search-forward "^\\(\\*+\\) \\(.+\\)" (point-max) 't)
(let* ((hd (match-string-no-properties 1))
(level (length hd))
(text (concat
(match-string-no-properties 2)
(save-excursion
(goto-char (match-end 0))
(let ((str ""))
(catch 'loop
(while 't
(forward-line)
(if (looking-at "^[ \t]\\(.*\\)")
(setq str (concat str (match-string-no-properties 1)))
(throw 'loop str)))))))))
;; Handle level rendering
(cond
((> level last-level)
(org-export-as-xoxo-insert-into out "\n<ol>\n"))
((< level last-level)
(dotimes (- (- last-level level) 1)
(if hanging-li
(org-export-as-xoxo-insert-into out "</li>\n"))
(org-export-as-xoxo-insert-into out "</ol>\n"))
(when hanging-li
(org-export-as-xoxo-insert-into out "</li>\n")
(setq hanging-li nil)))
((equal level last-level)
(if hanging-li
(org-export-as-xoxo-insert-into out "</li>\n")))
)
(setq last-level level)
;; And output the new li
(setq hanging-li 't)
(if (equal ?+ (elt text 0))
(org-export-as-xoxo-insert-into out "<li class='" (substring text 1) "'>")
(org-export-as-xoxo-insert-into out "<li>" text))))
;; Finally finish off the ol
(dotimes (- last-level 1)
(if hanging-li
(org-export-as-xoxo-insert-into out "</li>\n"))
(org-export-as-xoxo-insert-into out "</ol>\n"))
;; Finish the buffer off and clean it up.
(switch-to-buffer out)
(xml-mode)
(indent-region (point-min) (point-max))
)))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: XOXO output (was Re: Other software development for Org-mode)
2006-03-14 11:36 ` XOXO output (was Re: Other software development for Org-mode) Nic
@ 2006-04-03 7:35 ` Carsten Dominik
2006-04-03 12:53 ` XOXO output Nic
0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2006-04-03 7:35 UTC (permalink / raw)
To: Nic; +Cc: emacs-orgmode
Nic,
if it is OK, I am going to include the XOXO exporter in the next test
release of Org-mode. Any objections or new versions? Anybody tried
this and found problems with it?
- Carsten
On Mar 14, 2006, at 12:36, Nic wrote:
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>> I know that a few people are developing add-on software for Org-mode.
>> Maybe it is useful to make a list of these, to avoid duplicate work
>> and
>> allow for feedback. I myself am aware of the following efforts.
>>
>>
>> XML export, for example XOXO or OPM or OPML.
>> There is already a XOXO exporter by Nic Ferrier, he posted it on
>> Usenet some time ago.
>
> I'm going to post it here because I want some feedback on it.
>
> At the moment it outputs a simple XOXO view of an outline. It does not
> handle org-mode content when it breaks away from an outline.
>
> There's a reason for that: XOXO (and OPM and OPML) only specify the
> outline format... nothing else.
>
> So the question is: what do people want the non-outline org-mode
> content to look like in an XOXO view?
>
> - something like is already in org-mode's HTML output
>
> - simpler XHTML
>
> - something else entirely?
>
>
> Btw... an XOXO exporter would be better than the current HTML exporter
> because it would be more flexible. Using an XML transform (maybe XSLT,
> maybe something else) on the exported XOXO could render the existing
> HTML as well as any other HTML or XML.
>
>
> Anyway... the source is at the bottom of this mail.
>
>
>
> Nic
>
>
>
> ;; An org mode extension
> ;; Copyright (C) 2005 by Tapsell-Ferrier Limited
>
> ;; This program is free software; you can redistribute it and/or modify
> ;; it under the terms of the GNU General Public License as published by
> ;; the Free Software Foundation; either version 2, or (at your option)
> ;; any later version.
>
> ;; This program is distributed in the hope that it will be useful,
> ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> ;; GNU General Public License for more details.
>
> ;; You should have received a copy of the GNU General Public License
> ;; along with this program; see the file COPYING. If not, write to the
> ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
> ;; Boston, MA 02111-1307, USA.
>
>
> (defun org-export-as-xoxo-insert-into (buffer &rest output)
> (with-current-buffer buffer
> (apply 'insert output)))
>
> (defun org-export-as-xoxo (&optional buffer)
> "Export the org buffer as XOXO.
> The XOXO buffer is named *xoxo-<source buffer name>*"
> (interactive (list (current-buffer)))
> ;; A quickie abstraction
>
> ;; Output everything as XOXO
> (with-current-buffer (get-buffer buffer)
> (beginning-of-buffer)
> (let ((out (get-buffer-create (concat "*xoxo-" (buffer-name
> buffer) "*")))
> (last-level 1)
> (hanging-li nil))
> ;; Check the output buffer is empty.
> (with-current-buffer out
> (delete-region (point-min) (point-max)))
> ;; Kick off the output
> (org-export-as-xoxo-insert-into out "<ol class='xoxo'>\n")
> (while (re-search-forward "^\\(\\*+\\) \\(.+\\)" (point-max) 't)
> (let* ((hd (match-string-no-properties 1))
> (level (length hd))
> (text (concat
> (match-string-no-properties 2)
> (save-excursion
> (goto-char (match-end 0))
> (let ((str ""))
> (catch 'loop
> (while 't
> (forward-line)
> (if (looking-at "^[ \t]\\(.*\\)")
> (setq str (concat str
> (match-string-no-properties 1)))
> (throw 'loop str)))))))))
>
> ;; Handle level rendering
> (cond
> ((> level last-level)
> (org-export-as-xoxo-insert-into out "\n<ol>\n"))
>
> ((< level last-level)
> (dotimes (- (- last-level level) 1)
> (if hanging-li
> (org-export-as-xoxo-insert-into out "</li>\n"))
> (org-export-as-xoxo-insert-into out "</ol>\n"))
> (when hanging-li
> (org-export-as-xoxo-insert-into out "</li>\n")
> (setq hanging-li nil)))
>
> ((equal level last-level)
> (if hanging-li
> (org-export-as-xoxo-insert-into out "</li>\n")))
> )
>
> (setq last-level level)
>
> ;; And output the new li
> (setq hanging-li 't)
> (if (equal ?+ (elt text 0))
> (org-export-as-xoxo-insert-into out "<li class='"
> (substring text 1) "'>")
> (org-export-as-xoxo-insert-into out "<li>" text))))
>
> ;; Finally finish off the ol
> (dotimes (- last-level 1)
> (if hanging-li
> (org-export-as-xoxo-insert-into out "</li>\n"))
> (org-export-as-xoxo-insert-into out "</ol>\n"))
>
> ;; Finish the buffer off and clean it up.
> (switch-to-buffer out)
> (xml-mode)
> (indent-region (point-min) (point-max))
> )))
>
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: XOXO output
2006-04-03 7:35 ` Carsten Dominik
@ 2006-04-03 12:53 ` Nic
2006-04-04 7:57 ` Carsten Dominik
0 siblings, 1 reply; 7+ messages in thread
From: Nic @ 2006-04-03 12:53 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik <dominik@science.uva.nl> writes:
> Nic,
>
> if it is OK, I am going to include the XOXO exporter in the next test
> release of Org-mode.
You may as well go ahead. I'll try and find time to update it to
include all the rest of org-modes output options.
> Any objections or new versions? Anybody tried this and found
> problems with it?
I didn't get even a whisper of feedback.
/8->
Nic
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: XOXO output
2006-04-03 12:53 ` XOXO output Nic
@ 2006-04-04 7:57 ` Carsten Dominik
[not found] ` <871wwdbofv.fsf@tapsellferrier.co.uk>
0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2006-04-04 7:57 UTC (permalink / raw)
To: Nic; +Cc: emacs-orgmode
On Apr 3, 2006, at 14:53, Nic wrote:
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>> Nic,
>>
>> if it is OK, I am going to include the XOXO exporter in the next test
>> release of Org-mode.
>
> You may as well go ahead. I'll try and find time to update it to
> include all the rest of org-modes output options.
One immediate thing I see now is that I don't think the code will work
correctly when the outline jumst levels (for example, going from a
level 2 to a level 4 and back again. Looking at the code I think in
this case it will only start one new outline level, but close two of
them.
Another issue is that I have recently started to make the export an
two-stage process. I first copy the entire file to a temporary buffer,
where I do some kine of preprocessing. For example I am making all the
links to use the now standard [[ ]] format, I am preparing the targets,
and I create links from all matches of radio targets. Then, in the
second step I do the exporting. maybe it would be good to do these
preparatory steps also before exporting to XOXO?
Finally a question. You have said at several points that using a
format like XOXO and do little or now structural analysis of what is in
the Org-mode file except for looking at the levels is a good thing
because you can then later use another transformation to do whatever
you want. But I guess that transformation code would actually have to
be custom written and understand all of the properties of Org-mode
files. So I am still wondering if it would be useful to have ev
erything that is Org-mode specific translated into something more
general.
- Carsten
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-04-04 12:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-14 10:39 Other software development for Org-mode Carsten Dominik
2006-03-14 11:36 ` XOXO output (was Re: Other software development for Org-mode) Nic
2006-04-03 7:35 ` Carsten Dominik
2006-04-03 12:53 ` XOXO output Nic
2006-04-04 7:57 ` Carsten Dominik
[not found] ` <871wwdbofv.fsf@tapsellferrier.co.uk>
2006-04-04 11:38 ` Carsten Dominik
[not found] ` <87y7yla61c.fsf@tapsellferrier.co.uk>
2006-04-04 12:25 ` Carsten Dominik
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).