[[http://howardism.org/Technical/Emacs/literate-devops.html][Literate DevOps]] and [[http://www.howardism.org/Technical/Emacs/literate-database.html][Literate Database Work]] are only 2 use cases.
With [[https://github.com/fniessen/org-html-themes.git][org html themes]] it's easy to generate beautiful output.
+** org-protocol
+
Run these commands to make org-protocol work in gnome:
#+BEGIN_SRC sh :eval no :tangle no
#+END_SRC
-Some initial languages we want org-babel to support
+** Some initial languages we want org-babel to support
#+BEGIN_SRC emacs-lisp
#+END_SRC
-Find next and previous =#+BEGIN_SRC sh= block.
+** Find next and previous =#+BEGIN_SRC sh= block.
Very useful for repetitive literate devops jobs.
<C-c> <S-n> then <C-c><C-c> and so on.
#+END_SRC
-Define some shortcuts to access major org files.
+** Define some shortcuts to access major org files.
#+BEGIN_SRC emacs-lisp
#+END_SRC
-Tag tasks with GTD contexts
+** Tag tasks with GTD contexts
#+BEGIN_SRC emacs-lisp
(setq org-tag-alist '(("@work" . ?b)
#+END_SRC
-Define some handy link abbreviations
+** Define some handy link abbreviations
#+BEGIN_SRC emacs-lisp
#+END_SRC
-Some clock stuff.
+** Some clock stuff.
taken from http://doc.norang.ca/org-mode.org
#+BEGIN_SRC emacs-lisp
#+END_SRC
+** youtube links
+
+Thanks to [[http://endlessparentheses.com/embedding-youtube-videos-with-org-mode-links.html][endlessparentheses]]: Youtube makes it pretty simple
+to embed videos, they give you the entire iframe HTML code to use, but
+this wouldn’t really be Emacs if we couldn’t make things just a little
+bit easier.
+
+#+BEGIN_SRC emacs-lisp
+ (defvar yt-iframe-format
+ ;; You may want to change your width and height.
+ (concat "<iframe width=\"440\""
+ " height=\"335\""
+ " src=\"https://www.youtube.com/embed/%s\""
+ " frameborder=\"0\""
+ " allowfullscreen>%s</iframe>"))
+
+ (org-add-link-type
+ "yt"
+ (lambda (handle)
+ (browse-url
+ (concat "https://www.youtube.com/embed/"
+ handle)))
+ (lambda (path desc backend)
+ (cl-case backend
+ (html (format yt-iframe-format
+ path (or desc "")))
+ (latex (format "\href{%s}{%s}"
+ path (or desc "video"))))))
+#+END_SRC
+
+To use this, just write your org links in the following way (optionally adding a description).
+
+[[yt:A3JAlWM8qRM]]
+
+When you export to HTML, this will produce that same inlined snippet
+that Youtube specifies. The advantage (over simply writing out the
+iframe) is that this link can be clicked in org-mode, and can be
+exported to other formats as well.
+
* cfengine
#+BEGIN_SRC emacs-lisp
)
))
- (eval-after-load "json-mode"
- '(add-hook 'json-mode-hook (lambda() (add-hook 'write-contents-functions
+ (eval-after-load "js-mode"
+ '(add-hook 'js-mode-hook (lambda() (add-hook 'write-contents-functions
(lambda()
(save-excursion
(delete-trailing-whitespace)))