The Modal bootstrap script can be used to display the content of an external
file in a modal window. The magic line is:
#+O_BLOG_SOURCE: path/to/file [mode]
The org template shorcut is <os
TAB
. Two parameters might be used:
- The mandatory
/path/to/file
which is the path to the file from which
content should be read.
- The optional
mode
parameter, which can be determined if omitted.
Here is an example of the sample-init.el
file:
;;; sample-init.el --- sample init file to be used to debug o-blog
;; Copyright © 2012 Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
;; Author: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
;; Keywords: emacs,
;; Created: 2012-03-20
;; Last changed: 2012-08-23 17:48:23
;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/
;; This file is NOT part of GNU Emacs.
;;; Commentary:
;;
;;; Code:
(defun ob-build-sample ()
(let* ((d default-directory)
(sample (format "%s/.emacs.d/o-blog/example/sample.org" d))
(debugger
(lambda (&rest debugger-args)
(let* ((trace (with-temp-buffer
(insert (with-output-to-string (backtrace)))
(beginning-of-buffer)
;; error begins on line 16
;; line stats with " signal(error ..."
(goto-line 16)
(goto-char (point-at-bol))
;; Remove null chars
(replace-regexp-in-string
(char-to-string 0) "^@"
(buffer-substring (point) (point-max))))))
(o-blog-bug-report trace))))
(debug-on-error t)
print-length print-level)
(add-to-list 'load-path (format "%s/.emacs.d/org-mode/lisp" d))
(add-to-list 'load-path (format "%s/.emacs.d/org-mode/contrib/lisp" d))
(add-to-list 'load-path (format "%s/.emacs.d/o-blog" d))
(require 'o-blog)
(print
(concat
(emacs-version) "\n"
(org-version) "\n"
(o-blog-version) "\n"))
(find-file sample)
(org-publish-blog sample)
(kill-emacs)))