Using org-mode as a flat file database and input disinfection

I would like to use the org-mode file as a flat file database that can be edited both programmatically and manually. The following is an example of a bookmark list.

* Somebody blog :: I like org-mode :url: http://somebody.com/org ** Quotation 1 :date: 2013/01/13 08:32:11 EST Very interesting observations here. ** Quotation 2 :date: 2013/01/13 08:33:46 EST A marvelous code snippets * Man bites dog :url: http://newssite.com/today 

I would like emacs or a cgi-script web server or similar to edit such a file (in the example above add more bookmarks or more quotes to existing bookmarks).

The problem is that, for example, taking arbitrary choices from websites to be inserted under the org-mode heading, it becomes necessary to sanitize the input so that at least the quoted lines starting with asterisks do not affect the file structure: if the quote starts with โ€œ* this is a pathological exampleโ€ and is inserted into the file under some heading, when I open the file in emacs, it will appear as a new first level heading (h1).

How can I achieve two goals: (i) an editable database of flat org-mode files (this excludes escaping and all our XML tricks) and (ii) isolate arbitrary inputs?

  • anti-solution: # + BEGIN_QUOTE will not work because lines starting with "*" are displayed as new headers.
  • opportunity 1: box / rebox all from the outside world: http://www.emacswiki.org/emacs/BoxQuote , this seems excessive, though.
+4
source share

All Articles