1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2025-01-08 15:35:16 +00:00

Remove org-export-freemind, it o longer seems to work

This commit is contained in:
Carsten Dominik 2009-11-10 17:31:30 +01:00
parent 52fe733f84
commit d05a12bbd5
5 changed files with 0 additions and 289 deletions

View File

@ -44,9 +44,6 @@ orgtbl-sqlinsert.el --- Convert Org-mode tables to SQL insertions.
PACKAGES
========
org-export-freemind --- exporting utilities from org-mode to freemind
SCRIPTS (shell, bash, etc.)
===========================

View File

@ -1,33 +0,0 @@
2007-06-25 Marco Vezzoli <noise dot otn at alice dot it>
* org-export-freemind-install.el (org-export-as-freemind):
- created installation file
2007-06-25 Marco Vezzoli <noise dot otn at alice dot it>
* org-export-freemind.el (org-export-as-freemind):
- created customization variables for org-freemind-icons-alist and
org-freemind-cloud-alist
- fixed export bug to handle level jump (e.g. a * followed by a ***)
- added keybinding 'C-c C-x f' org-export-as-freemind
2007-06-02 Marco Vezzoli <noise dot otn at alice dot it>
* org-export-freemind.el (org-export-as-freemind):
- fixed conversion bug: all headings are converted inserting html
entities
- added configuration with org-freemind-icons-alist: an alist that
allows to associate regexp with builtins freemind icons
- added configuration with org-freemind-cloud-alist: an alist that
allows to associate regexp with cloud colors
- added org-export-as-freemind-agenda-files : exports all agenda
files in separate files with the same name and extension .mm
- added org-export-as-freemind-agenda-files-one-file : do the same
but grouping all trees in a single file

View File

@ -1,50 +0,0 @@
The project
-----------
This is an extension to emacs Org Mode [1] to export into FreeMind
[2], two very valuable productivity tools.
This code is donated to both porjects and is distributable under any
of the copyright notices of these.
Current status of the code is alpha: use it at your own
risk. Nonetheless I'm happy to support user of this code as far as I
can.
Install
-------
Before use this code please verify you have Org Mode correctly
installed in your emacs.
Installation:
copy all *.el files into the org installation directory.
add the following line to your .emacs
(require 'org-export-freemind-install)
This will define the following functions:
org-export-as-freemind: export current buffer into a freemind file
with the same name, placed in the XOXO publishing directory
org-export-as-freemind-agenda-files: export all agenda files into
separate freemind files, placed on the XOXO publishing directory
org-export-as-freemind-agenda-files-one-file: export all agenda files
into a single freemind file
also the following variables are set
org-freemind-icons-alist: an alist which associates regexp with
freemind builtin icons
org-freemind-cloud-alist: an alist which associates regexp with
freemind cloud colors (rrggbb hex notation)
Todos
-----
- try to export html parts
[1] http://staff.science.uva.nl/~dominik/Tools/org/
[2] http://freemind.sourceforge.net/wiki/index.php/Main_Page

View File

@ -1,7 +0,0 @@
(autoload 'org-export-as-freemind "org-export-freemind"
"export a single org file in freemind format" t)
(autoload 'org-export-as-freemind-agenda-files "org-export-freemind"
"export all agenda files file in freemind format" t)
(autoload 'org-export-as-freemind-agenda-files-one-file "org-export-freemind"
"export all agenda files file in freemind format into a single file" t)
(provide 'org-export-freemind-install)

View File

@ -1,196 +0,0 @@
;;; org-export-freemind - exporting utilities from org-mode to freemind
;; Copyright (C) 2007 Marco Vezzoli
;; Author: marco vezzoli <noise.otn@alice.it>
;; Created:
;; Version: 0.1.0
;; Keywords: org-mode export freemind
;; Commentary:
;; This file is *not* part of GNU Emacs.
;; 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 of
;; the License, 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; if not, write to the Free
;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301 USA
;;; Code:
(defgroup org-export-freemind ()
"This group let you customize your own export into freemind format"
:group 'org-export)
(defcustom org-freemind-icons-alist
'(("TODO" . "button_cancel")
("SPEC" . "pencil")
("WIP" . "pencil")
("TEST" . "xmag")
("DONE" . "button_ok"))
"change the icon according to a regular expression"
:type '(alist :key-type regexp
:value-type string)
:group 'org-export-freemind)
(defcustom org-freemind-cloud-alist
'((":PROJECT:" . "ccffcc")
(":MEETING:" . "ccccff"))
"create a cloud with the defined color if title match a regexp"
:type '(alist :key-type regexp :value-type string)
:group 'org-export-freemind)
(defun org-export-as-freemind (&optional buffer outbuffer)
"Export the org buffer as FreeMind XML.
"
(interactive (list (current-buffer) ()))
;; A quickie abstraction
;; Output everything as FreeMind
(with-current-buffer (get-buffer buffer)
(goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
(let* ((opt-plist (org-combine-plists (org-default-export-plist)
(org-infile-export-plist)))
(title (or (plist-get opt-plist :title)
(file-name-sans-extension
(file-name-nondirectory buffer-file-name))))
(filename (concat (file-name-as-directory
(org-export-directory :xoxo opt-plist))
title
".mm"))
(out (if (bufferp outbuffer)
outbuffer
(find-file-noselect filename)))
(last-level 0)
(hanging-li nil))
;; Check the output buffer is empty.
;; Kick off the output
(unless (bufferp outbuffer)
(progn
(with-current-buffer out (erase-buffer))
(org-export-as-xoxo-insert-into out "<map version='0.8.0'>\n")))
(org-export-as-xoxo-insert-into out
"<node TEXT='" title "'"
(if (bufferp outbuffer)
" FOLDED='true'" "")
">\n")
(if (bufferp outbuffer)
(org-export-as-xoxo-insert-into out "<cloud COLOR='#ccffff'/>\n"))
(while (re-search-forward "^\\(\\*+\\) \\(.+\\)" (point-max) 't)
(let* ((hd (match-string-no-properties 1))
(level (length hd))
(text (match-string-no-properties 2)))
(save-excursion
(goto-char (match-end 0))
(catch 'loop
(while 't
(forward-line)
(if (looking-at "^[ \t]\\(.*\\)")
()
(throw 'loop "")))))
;; Handle level rendering
(cond
((> level last-level)
(let ((rept (- level last-level 1))
(value ()))
(dotimes (i rept value)
(org-export-as-xoxo-insert-into out "<node FOLDED='false' TEXT='.'>\n")))
(org-export-as-xoxo-insert-into out "\n<node FOLDED='true' TEXT='"))
((< level last-level)
(let ((rept (+ (- last-level level) 1))
(value ()))
(dotimes (i rept value)
(org-export-as-xoxo-insert-into out "</node>\n")))
(org-export-as-xoxo-insert-into out "<node FOLDED='true' TEXT='"))
((equal level last-level)
(org-export-as-xoxo-insert-into out "</node>\n<node FOLDED='true' TEXT='")))
(setq last-level level)
;; And output the new node
(let* ((heading
(concat "<html><h3>"
(replace-regexp-in-string
":.*:"
(lambda (x)
(concat "<font color='red'>" x "</font>"))
text)
"</h3></html>"))
(html-quoted-heading (org-html-expand heading))
(exp-quote-heading (replace-regexp-in-string "'" "&quot;" html-quoted-heading)))
(org-export-as-xoxo-insert-into out exp-quote-heading "'>\n"))
(dolist (rule org-freemind-icons-alist)
(if (string-match (car rule) text)
(org-export-as-xoxo-insert-into out "<icon BUILTIN='" (cdr rule) "'/>\n")))
(dolist (rule org-freemind-cloud-alist)
(when (string-match (car rule) text)
(progn
(org-export-as-xoxo-insert-into out
"<cloud COLOR='#" (cdr rule) "'/>\n")
(message (cdr rule))
)))
))
;; Finally finish off the map
(let ((value ()))
(org-export-as-xoxo-insert-into out "\n")
(dotimes (i last-level value)
(org-export-as-xoxo-insert-into out "</node>\n")))
(org-export-as-xoxo-insert-into out "</node>\n")
;; Finish the buffer off and clean it up.
(unless (bufferp outbuffer)
(progn
(org-export-as-xoxo-insert-into out "</map>\n")
(switch-to-buffer-other-window out)
(indent-region (point-min) (point-max) nil)
(save-buffer)
(goto-char (point-min))
)))))
(defun org-export-as-freemind-agenda-files ()
"Export all agenda files into Freemind format
each files is saved with .mm extension
into the XOXO publishing directory"
(interactive)
(dolist (file org-agenda-files)
(org-check-agenda-file file)
(set-buffer (org-get-agenda-file-buffer file))
(org-export-as-freemind (current-buffer))
))
(defun org-export-as-freemind-agenda-files-one-file (filename)
"Export all agenda files into FreeMind format.
All results are grouped in a single .mm file"
(interactive "FFile to save: ")
(let* ((title (file-name-sans-extension
(file-name-nondirectory filename)))
(out (find-file-noselect filename)))
(with-current-buffer out (erase-buffer))
(org-export-as-xoxo-insert-into out "<map version='0.8.0'><node TEXT='" title "'>\n")
(dolist (file org-agenda-files)
(org-check-agenda-file file)
(set-buffer (org-get-agenda-file-buffer file))
(org-export-as-freemind (current-buffer) out)
)
(org-export-as-xoxo-insert-into out "</node></map>\n")
(switch-to-buffer-other-window out)
(indent-region (point-min) (point-max) nil)
(save-buffer)
(goto-char (point-min))
))
(define-key org-mode-map "\C-c\C-xf" 'org-export-as-freemind)
;;; org-export-freemind ends here