whacked / tiddlywiki-org

TiddlyWiki 5 + emacs + org-mode = awesome
49 stars 6 forks source link

** what this lets you do

  1. add =org-mode= type to TiddlyWiki + render it (now using [[https://github.com/mooz/org-js][mooz's org-js]])
  2. edit =tid= files in emacs

** for live updating to edits made from emacs (or elsewhere)

see [[https://github.com/Jermolene/TiddlyWiki5/issues/1530][discussion on issue 1530]] about how to get TW/TD to monitor + update tiddlers edited externally

also see [[https://github.com/whacked/TiddlyWiki5/tree/2015-12_chokidar-with-browser-notify][this tiddlywiki fork]]

** how to use / install

  1. generate the plugin's tiddler: =python compileorg.py -save $DIRNAME= where =$DIRNAME= is the base path (contains the tiddlywiki.info file) of your tiddlywiki. this will auto-populate a tiddler that is the org-mode plugin.
  2. =tiddlywiki $DIRNAME --server $PORTNUMBER= [default 8080] / launch TiddlyDesktop

** stylesheet tiddler for mooz's org-output

+BEGIN_SRC css

span.section-number { font-family: monospace; opacity: 0.2; margin-right: 0.5em; }

span.task-status { padding: 2px; margin: 2px; } span.task-status.todo { color: red; font-weight: bold; }

+END_SRC

** new files created from emacs will not be picked up by the server

** node server crashes

sometimes when renaming files from the browser. Haven't looked deeper into cause.

** auto-revert workaround

previous commit relied on =auto-revert-mode=, which caused a lag from the tiddlywiki server picking up the change and updating the file mtime. the update mechanism is overridden in [[https://github.com/whacked/TiddlyWiki5/tree/2015-12_chokidar-with-browser-notify][this tiddlywiki fork]] such that =auto-revert-mode= is no longer necessary. I don't know the larger impact of the workaround.

** file name restrictions for interop

from experience (and not investigation), tiddler files and tiddler titles should have no spaces in them. TiddlyWiki will convert spaces in titles created through the browser into underscores, but reads the tiddler title from the =title= field in the tiddler headers.

This causes some trickiness in the org-style links when editing in emacs. It may be possible to use =%20= for spaces in the links. Haven't bothered trying, but mixing plain spaces and underscores /will/ fail.