emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <r.m.krug@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [BABEL] html export for R not working, but for sh and others
Date: Thu, 1 Jul 2010 10:14:13 +0200	[thread overview]
Message-ID: <AANLkTinW3aIKQOsrjgfp3ZZILMT0dS3jv2WUMILsyf3U@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 894 bytes --]

Hi

I am trying to export the attached test.org file to HTML, but I can only
export it, when I change the source block language to anything different
from R.

I also attach my emacs.org file, but I am not doing any customisations to R.

In addition: if I specify  :session *R* in #:BABEL: , the code is evaluated,
even though I specified :exports code. Is this intended?

Thanks,

Rainer

-- 
NEW GERMAN FAX NUMBER!!!

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:           +27 - (0)83 9479 042
Fax:            +27 - (0)86 516 2782
Fax:            +49 - (0)321 2125 2244
email:          Rainer@krugs.de

Skype:          RMkrug
Google:         R.M.Krug@gmail.com

[-- Attachment #1.2: Type: text/html, Size: 1248 bytes --]

[-- Attachment #2: test.org --]
[-- Type: application/octet-stream, Size: 621 bytes --]

#+TITLE:     test.org
#+AUTHOR:    Rainer M Krug
#+EMAIL:     rkrug@ecolmod
#+DATE:      2010-07-01 Thu
#+DESCRIPTION: 
#+KEYWORDS: 
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME: 
#+XSLT: 
#+BABEL: :tangle test.R

* first
#+begin_src ruby
  x <- 1:10
  y <- runif(10)
  print(x)
  plot(x,y)
x <- function() {}
#+end_src

[-- Attachment #3: emacs.org --]
[-- Type: application/octet-stream, Size: 20132 bytes --]

#+TITLE: .emacs file 
#+OPTIONS: toc:nil num:nil ^:nil

* From Custom
* Save desktop
#+begin_src emacs-lisp
  (desktop-save-mode 1)
#+end_src
* Search path definitions
#+begin_src emacs-lisp
  (add-to-list 'load-path "~/.emacs.d/site-lisp")
  (add-to-list 'load-path "~/.emacs.d/icicles")
  (add-to-list 'load-path "~/.emacs.d/ess")
  (add-to-list 'load-path "~/.emacs.d/cedet")
  (add-to-list 'load-path "~/.emacs.d/ecb")
#+end_src
* CEDET
  See cedet/common/cedet.info for configuration details.
#+begin_src emacs-lisp
  (load-file "~/.emacs.d/cedet/common/cedet.el")
#+end_src
  Optional other options
#+begin_src emacs-lisp
  ;; Enable EDE (Project Management) features
  (global-ede-mode 1)

  ;; Enable EDE for a pre-existing C++ project
  ;; (ede-cpp-root-project "NAME" :file "~/myproject/Makefile")


  ;; Enabling Semantic (code-parsing, smart completion) features
  ;; Select one of the following:

  ;; * This enables the database and idle reparse engines
  ; (semantic-load-enable-minimum-features)

  ;; * This enables some tools useful for coding, such as summary mode
  ;;   imenu support, and the semantic navigator
  ; (semantic-load-enable-code-helpers)

  ;; * This enables even more coding tools such as intellisense mode
  ;;   decoration mode, and stickyfunc mode (plus regular code helpers)
  ;; (semantic-load-enable-gaudy-code-helpers)

  ;; * This enables the use of Exuberent ctags if you have it installed.
  ;;   If you use C++ templates or boost, you should NOT enable it.
  ;; (semantic-load-enable-all-exuberent-ctags-support)

  ;; Enable SRecode (Template management) minor-mode.
  (global-srecode-minor-mode 1)
#+end_src
* Ecb
#+begin_src emacs-lisp
  (require 'ecb-autoloads)
  (setq ecb-layout-name "left3")
  (setq ecb-layout-window-sizes (quote (("left8" (0.23076923076923078 . 0.23333333333333334) (0.23076923076923078 . 0.25) (0.23076923076923078 . 0.2833333333333333) (0.23076923076923078 . 0.21666666666666667)) ("left3" (0.22162162162162163 . 0.10344827586206896) (0.22162162162162163 . 0.46551724137931033) (0.22162162162162163 . 0.41379310344827586)))))
  (setq ecb-options-version "2.32")
  (setq ecb-toggle-layout-sequence (quote ("left9" "left14" "left3")))
#+end_src
* ESS
** Basic Settings
#+begin_src emacs-lisp
   (load "~/.emacs.d/ess/lisp/ess-site")
   (require 'ess-site)
   (font-lock-add-keywords 'ess-mode
#+end_src
*** Add highlighting for certain keywords
#+begin_src emacs-lisp
   '(("\\<\\(FIXME\\|TODO\\|COMMENT\\|DONE\\|CHANGES\\|FIXED\\)\\>" 1 font-lock-warning-face prepend)))
#+end_src
*** Further customisations
#+begin_src emacs-lisp
   (setq inferior-R-args "--vanilla")
   (setq ess-eval-visibly-p nil)
   (setq inferior-ess-same-window t)
   (setq inferior-ess-client-command "Initial")
   (setq inferior-ess-own-frame nil)
   (setq ess-ask-for-ess-directory nil)
#+end_src
*** Make html help in R default
#+begin_src emacs-lisp
 (setq inferior-ess-r-help-command "help(\"%s\", help_type=\"html\")\n")
#+end_src
** r-utils
#+begin_src emacs-lisp
   (require 'r-utils)
#+end_src
** ess-roxy (might be redundant)
Load ess-roxy from http://www.metabolome.jp/download/ess-roxy
#+begin_src emacs-lisp
   ;; (add-to-list 'load-path "~/emacs/site-lisp/ess-roxy")
   ;; (require 'ess-roxy)
   ;; (add-hook 'ess-mode-hook
   ;; (lambda () (ess-roxy-mode) ))
#+end_src
* Syntax highlighting for functions in R
  based on https://mail.google.com/mail/#label/Lists%2FESS/125131ed24688970
  The following code needs to be run in R:
  
  obj <- do.call("c", sapply(c("package:base", "package:stats",
  "package:utils"), objects, all.names=TRUE))
  re <- "(^[^.[:alpha:][:digit:]]|<-|__)"  # to remove "weird" functions
  obj <- obj[-grep(re, obj)]
  fpath <- file.path(Sys.getenv("HOME"), ".emacs.d", "R-function-names.txt")
  write.table(obj, fpath, quote=FALSE, row.names=FALSE, col.names=FALSE)
  
  Read a whole file into list of lines
  Author: Xah Lee
  see http://xahlee.org/emacs/elisp_process_lines.html
#+begin_src emacs-lisp
  (defun read-lines (file)
  "Return a list of lines in FILE."
  (with-temp-buffer
  (insert-file-contents file)
  (split-string
  (buffer-string) "\n" t)
  )
  )

  (add-hook 'ess-mode-hook
  '(lambda()
  (setq ess-my-extra-R-function-keywords
  (read-lines "~/.emacs.d/R-function-names.txt"))
  (setq ess-R-mode-font-lock-keywords
  (append ess-R-mode-font-lock-keywords
  (list (cons (concat "\\<" (regexp-opt
  ess-my-extra-R-function-keywords 'enc-paren) "\\>")
  'font-lock-function-name-face))))))
#+end_src
* hideshow for ESS
#+begin_src emacs-lisp
  (autoload 'hideshowvis-enable "hideshowvis" "Highlight foldable regions")
  (dolist (hook (list 'emacs-lisp-mode-hook
  'ess-mode-hook))
  (add-hook hook 'hideshowvis-enable))
  (setq hs-special-modes-alist
  (cons '(ess-mode "{" "}" "#" nil nil) hs-special-modes-alist))

  (define-fringe-bitmap 'hs-marker [0 24 24 126 126 24 24 0])

  (defcustom hs-fringe-face 'hs-fringe-face
  "*Specify face used to highlight the fringe on hidden regions."
  :type 'face
  :group 'hideshow)

  (defface hs-fringe-face
  '((t (:foreground "#888" :box (:line-width 2 :color "grey75" :style released-button))))
  "Face used to highlight the fringe on folded regions"
  :group 'hideshow)

  (defcustom hs-face 'hs-face
  "*Specify the face to to use for the hidden region indicator"
  :type 'face
  :group 'hideshow)

  (defface hs-face
  '((t (:background "#ff8" :box t)))
  "Face to hightlight the ... area of hidden regions"
  :group 'hideshow)

  (defun display-code-line-counts (ov)
  (when (eq 'code (overlay-get ov 'hs))
  (let* ((marker-string "*fringe-dummy*")
  (marker-length (length marker-string))
  (display-string (format "(%d)..." (count-lines (overlay-start ov) (overlay-end ov))))
  )
  (overlay-put ov 'help-echo "Hiddent text. C-c,= to show")
  (put-text-property 0 marker-length 'display (list 'left-fringe 'hs-marker 'hs-fringe-face) marker-string)
  (overlay-put ov 'before-string marker-string)
  (put-text-property 0 (length display-string) 'face 'hs-face display-string)
  (overlay-put ov 'display display-string)
  )))

  (setq hs-set-up-overlay 'display-code-line-counts)
#+end_src
* hideshow
  hideshow-org (http://github.com/secelis/hideshow-org/tree/master)
#+begin_src emacs-lisp
  (require 'hideshow)
  (require 'hideshow-org)
  (add-to-list 'hs-special-modes-alist
  '(ess-mode "{" "}" "/[*/]" nil
  hs-c-like-adjust-block-beginning))
  (global-set-key "\C-ch" 'hs-org/minor-mode) ;; toggles hideshow-org
  ;; (add-hook 'ess-mode-hook 'hs-org/minor-mode) ;; starts for ESS files
  (add-hook 'ess-mode-hook '(lambda () (hs-org/minor-mode 1)))
#+end_src
* Graphviz (disabled)
Load graphviz-dot-mode
#+begin_src emacs-lisp
  ;; (load-file "~/emacs/graphviz-dot-mode.el") 
  ;; (setq graphviz-dot-view-command "display %s")
#+end_src
* SSH Major mode
#+begin_src emacs-lisp
  (load-file "/home/rkrug/.emacs.d/site-lisp/ssh.el") 
#+end_src
* Bookmark (bm)
#+begin_src emacs-lisp
  ;; (setq bm-restore-repository-on-load t)
  ;; (require 'bm)
  ;; (global-set-key (kbd "<f2>") 'bm-toggle)
  ;; (global-set-key (kbd "<C-f2>")   'bm-next)
  ;; (global-set-key (kbd "<s-f2>") 'bm-previous)
  
  ;; ;; make bookmarks persistent as default
  ;; (setq-default bm-buffer-persistence t)
  
  ;; ;; Loading the repository from file when on start up.
  ;; (add-hook' after-init-hook 'bm-repository-load)
  
  ;; ;; Restoring bookmarks when on file find.
  ;; (add-hook 'find-file-hooks 'bm-buffer-restore)
  
  ;; ;; Saving bookmark data on killing a buffer
  ;; (add-hook 'kill-buffer-hook 'bm-buffer-save)
  
  ;; ;; Saving the repository to file when on exit.
  ;; ;; kill-buffer-hook is not called when emacs is killed, so we
  ;; ;; must save all bookmarks first.
  ;; (add-hook 'kill-emacs-hook '(lambda nil
  ;;                               (bm-buffer-save-all)
  ;;                               (bm-repository-save)))
#+end_src
* anything
#+begin_src emacs-lisp
  (require 'anything)
  (require 'anything-config)
  (require 'recentf)

  (global-set-key [f11] 'anything)
  (remove-hook 'kill-emacs-hook 'anything-c-adaptive-save-history)
#+end_src
** R objects
#+begin_src emacs-lisp
  (setq anything-c-source-R-help
  '((name . "R objects / help")
  (init . (lambda ()
  ; this grabs the process name associated with the buffer
  (setq anything-c-ess-local-process-name ess-local-process-name)))
  (candidates . (lambda ()
  (condition-case nil
  (ess-get-object-list anything-c-ess-local-process-name)
  (error nil))))
  (action
  ("help" . ess-display-help-on-object)
  ("head (10)" . (lambda(obj-name)
  (ess-execute (concat "head(" obj-name ", n = 10)\n") nil (concat "R head: " obj-name))))
  ("head (100)" . (lambda(obj-name)
  (ess-execute (concat "head(" obj-name ", n = 100)\n") nil (concat "R head: " obj-name))))
  ("tail" . (lambda(obj-name)
  (ess-execute (concat "tail(" obj-name ", n = 10)\n") nil (concat "R tail: " obj-name))))
  ("str" . (lambda(obj-name)
  (ess-execute (concat "str(" obj-name ")\n") nil (concat "R str: " obj-name))))
  ("summary" . (lambda(obj-name)
  (ess-execute (concat "summary(" obj-name ")\n") nil (concat "R summary: " obj-name))))
  ("view source" . (lambda(obj-name)
  (ess-execute (concat "print(" obj-name ")\n") nil (concat "R object: " obj-name))))
  ("dput" . (lambda(obj-name)
  (ess-execute (concat "dput(" obj-name ")\n") nil (concat "R dput: " obj-name)))))
  (volatile)))
#+end_src
** R local objects
#+begin_src emacs-lisp
  (setq anything-c-source-R-local
  '((name . "R local objects")
  (init . (lambda ()
  ; this grabs the process name associated with the buffer
  (setq anything-c-ess-local-process-name ess-local-process-name)
  ; this grabs the buffer for later use
  (setq anything-c-ess-buffer (current-buffer))))
  (candidates . (lambda ()
  (let (buf)
  (condition-case nil
  (with-temp-buffer
  (progn
  (setq buf (current-buffer))
  (with-current-buffer anything-c-ess-buffer
  (ess-command "print(ls.str(), max.level=0)\n" buf))
  (split-string (buffer-string) "\n" t)))
  (error nil)))))
  (display-to-real . (lambda (obj-name) (car (split-string obj-name " : " t))))
  (action
  ("str" . (lambda(obj-name)
  (ess-execute (concat "str(" obj-name ")\n") nil (concat "R str: " obj-name))))
  ("summary" . (lambda(obj-name)
  (ess-execute (concat "summary(" obj-name ")\n") nil (concat "R summary: " obj-name))))
  ("head (10)" . (lambda(obj-name)
  (ess-execute (concat "head(" obj-name ", n = 10)\n") nil (concat "R head: " obj-name))))
  ("head (100)" . (lambda(obj-name)
  (ess-execute (concat "head(" obj-name ", n = 100)\n") nil (concat "R head: " obj-name))))
  ("tail" . (lambda(obj-name)
  (ess-execute (concat "tail(" obj-name ", n = 10)\n") nil (concat "R tail: " obj-name))))
  ("print" . (lambda(obj-name)
  (ess-execute (concat "print(" obj-name ")\n") nil (concat "R object: " obj-name))))
  ("dput" . (lambda(obj-name)
  (ess-execute (concat "dput(" obj-name ")\n") nil (concat "R dput: " obj-name)))))
  (volatile)))
#+end_src
** Occur
#+begin_src emacs-lisp
  (setq anything-c-source-occur
  '((name . "Occur")
  (init . (lambda ()
  (setq anything-occur-current-buffer
  (current-buffer))))
  (candidates . (lambda ()
  (let ((anything-occur-buffer (get-buffer-create "*Anything Occur*")))
  (with-current-buffer anything-occur-buffer
  (occur-mode)
  (erase-buffer)
  (let ((count (occur-engine anything-pattern
  (list anything-occur-current-buffer) anything-occur-buffer
  list-matching-lines-default-context-lines case-fold-search
  list-matching-lines-buffer-name-face
  nil list-matching-lines-face
  (not (eq occur-excluded-properties t)))))
  (when (> count 0)
  (setq next-error-last-buffer anything-occur-buffer)
  (cdr (split-string (buffer-string) "\n" t))))))))
  (action . (("Goto line" . (lambda (candidate)
  (with-current-buffer "*Anything Occur*"
  (search-forward candidate))
  (goto-line (string-to-number candidate) anything-occur-current-buffer)))))
  (requires-pattern . 3)
  (volatile)
  (delayed)))
#+end_src
** imenu --- probably ---
#+begin_src emacs-lisp
  (defvar anything-c-imenu-delimiter "/")
  (defvar anything-c-cached-imenu-alist nil)
  (defvar anything-c-cached-imenu-candidates nil)
  (defvar anything-c-cached-imenu-tick nil)
  (make-variable-buffer-local 'anything-c-cached-imenu-alist)
  (make-variable-buffer-local 'anything-c-cached-imenu-candidates)
  (make-variable-buffer-local 'anything-c-cached-imenu-tick)
  (setq anything-c-source-imenu
  '((name . "Imenu")
  (init . (lambda ()
  (setq anything-c-imenu-current-buffer
  (current-buffer))))
  (candidates
  . (lambda ()
  (with-current-buffer anything-c-imenu-current-buffer
  (let ((tick (buffer-modified-tick)))
  (if (eq anything-c-cached-imenu-tick tick)
  anything-c-cached-imenu-candidates
  (setq anything-c-cached-imenu-tick tick
  anything-c-cached-imenu-candidates
  (condition-case nil
  (mapcan
  (lambda (entry)
  (if (listp (cdr entry))
  (mapcar (lambda (sub)
  (concat (car entry) anything-c-imenu-delimiter (car sub)))
  (cdr entry))
  (list (car entry))))
  (setq anything-c-cached-imenu-alist (imenu--make-index-alist)))
  (error nil))))))))
  (volatile)
  (action
  . (lambda (entry)
  (let* ((pair (split-string entry anything-c-imenu-delimiter))
  (first (car pair))
  (second (cadr pair)))
  (imenu
  (if second
  (assoc second (cdr (assoc first anything-c-cached-imenu-alist)))
  (assoc entry anything-c-cached-imenu-alist))))))))
#+end_src
** Visible bookmarks
#+begin_src emacs-lisp
  ;; (defvar anything-c-source-bm
  ;;   '((name . "Visible Bookmarks")
  ;;     (init . (lambda ()
  ;;               (let ((bookmarks (bm-lists)))
  ;;                 (setq anything-bm-marks
  ;;                       (delq nil
  ;;                             (mapcar (lambda (bm)
  ;;                                       (let ((start (overlay-start bm))
  ;;                                             (end (overlay-end bm)))
  ;;                                         (if (< (- end start) 2)
  ;;                                             nil
  ;;                                           (format "%7d: %s"
  ;;                                                   (line-number-at-pos start)
  ;;                                                   (buffer-substring start (1- end))))))
  ;;                                     (append (car bookmarks) (cdr bookmarks))))))))
  ;;     (candidates . (lambda ()
  ;;                     anything-bm-marks))
  ;;     (action . (("Goto line" . (lambda (candidate)
  ;;                                 (goto-line (string-to-number candidate))))))))
#+end_src
** I don't know
#+begin_src emacs-lisp
  ;;
  (setq anything-sources
  (list 
  anything-c-source-buffers ; buffers
  ;;        anything-c-source-bm
  anything-c-source-imenu   ; e.g. Imenu-S menu
  ;;        anything-c-source-recentf ; recent files: needs (require 'recentf)
  anything-c-source-R-local
  anything-c-source-R-help
  anything-c-source-files-in-current-dir
  anything-c-source-occur
  anything-c-source-locate  ; needs the utility locate
  ))
#+end_src
* icicles
#+begin_src emacs-lisp
  ;; (load-file "~/emacs/icicles/icicles.el") 
#+end_src
* highlight-parentheses
  http://nschum.de/src/emacs/highlight-parentheses/highlight-parentheses.el
  highlight parenthesis with different colours
#+begin_src emacs-lisp
  (require 'highlight-parentheses)
  (setq hl-paren-colors '("gold" "IndianRed" "cyan" "green" "orange"
  "magenta"))
  (defun hpm-on ()
  (highlight-parentheses-mode t))
  (add-hook 'ess-mode-hook 'hpm-on)
  (add-hook 'inferior-ess-mode-hook 'hpm-on)
#+end_src
* automatically closing brackets
  following from Marc Schwartz from ESS list, works globally
  insert closing bracets automatically
#+begin_src emacs-lisp
  (setq skeleton-pair t)
  ;(setq skeleton-pair-on-word t)
  (global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
  (global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
  (global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
  (global-set-key (kbd "\"") 'skeleton-pair-insert-maybe)
  ;;(global-set-key (kbd "\'") 'skeleton-pair-insert-maybe) ;; apostrophe
  (global-set-key (kbd "\`") 'skeleton-pair-insert-maybe)
  ;;(global-set-key (kbd "<") 'skeleton-pair-insert-maybe)
  ;; Delete empty pairs like '()' taken from
  ;; http://www.emacswiki.org/cgi-bin/wiki/SkeletonMode#toc14 ##Deletion section
  (defvar skeletons-alist
  '((?\( . ?\))
  (?\' . ?\')
  (?\" . ?\")
  (?[  . ?])
  (?{  . ?})
  (?<  . ?>)
  (?$  . ?$)))
  (defadvice delete-backward-char (before delete-empty-pair activate)
  (if (eq (cdr (assq (char-before) skeletons-alist)) (char-after))
  (and (char-after) (delete-char 1))))
#+end_src
* load color-theme-hober
  load color-theme package
#+begin_src emacs-lisp
  (require 'color-theme)
  (eval-after-load "color-theme"
  '(progn
  ;;     (color-theme-initialize)
  (color-theme-hober)))
#+end_src
* org-mode
** Basic org mode
*** Initialise org-mode
  http://orgmode.org/manual/Installation.html#Installation
  http://orgmode.org/manual/Activation.html#Activation 
#+begin_src emacs-lisp
  ;; The following lines are always needed.  Choose your own keys.
  (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
  (global-set-key "\C-cl" 'org-store-link)
  (global-set-key "\C-ca" 'org-agenda)
  (global-set-key "\C-cb" 'org-iswitchb)
  ;; activate font-lock-mode
  (global-font-lock-mode 1)                     ; for all buffers
  ;; (add-hook 'org-mode-hook 'turn-on-font-lock)  ; Org buffers only
  (transient-mark-mode 1)
#+end_src

*** Startup settings
**** Hide leading stars
#+begin_src emacs-lisp
  (setq org-hide-leading-stars t)
#+end_src
**** Indent by default
#+begin_src emacs-lisp
(setq org-startup-indented t)
#+end_src
**** Start with hidden source blocks
#+begin_src emacs-lisp
(setq org-hide-block-startup nil)
#+end_src
**** Visibility of outline tree
#+begin_src emacs-lisp
org-startup-folded
#+end_src
*** Use the info files from the actual org-mode used
#+begin_src emacs-lisp
  (add-to-list 'Info-default-directory-list "~/.emacs.d/org-mode/doc/")
#+end_src

** Remember for org
  setup and load remember for org mode (http://orgmode.org/manual/Setting-up-Remember-for-Org.html#Setting-up-Remember-for-Org)
#+begin_src emacs-lisp
  ;; (require ‘remember)
  (org-remember-insinuate)
  (setq org-directory "~/Documents/orgfiles/")
  (setq org-default-notes-file (concat org-directory "/notes.org"))
  (define-key global-map "\C-cr" 'org-remember)
  ;; Define templates as in http://orgmode.org/manual/Remember-templates.html#Remember-templates
  (setq org-remember-templates
  '(("Todo"               ?t "* TODO %U\n %?\n  %i\n  %a" nil "Tasks"               )
  ("Journal"            ?j "* %U %?\n\n  %i\n  %a"      nil                       )
  ("Idea"               ?i "* %^{Title}\n  %i\n  %a"    nil            "New Ideas")
  ("Reference Material" ?r "*%? %&%^g"                  "reference.org"           )))
#+end_src

** org-babel
*** Load library-of-babel.el
Load the source-code blocks defined in an Org-mode file into the global "org-babel-library-of-babel" variable
#+begin_src emacs-lisp
(org-babel-lob-ingest "~/.emacs.d/org-mode/contrib/babel/library-of-babel.org")
#+end_src
*** Define languages to be loaded
#+begin_src emacs-lisp
  (require 'ob-R)         ;; requires R and ess-mode
  ;; (require 'ob-ruby)      ;; requires ruby, irb, ruby-mode, and inf-ruby
  (require 'ob-python)    ;; requires python, and python-mode
  ;; (require 'ob-clojure)   ;; requires clojure, clojure-mode, swank-clojure and slime
#+end_src

*** Tangle with comments
#+begin_src emacs-lisp
  (setq org-babel-tangle-w-comments t)
#+end_src
*** Customization of sh
  set shebang for sh script to "#!/bin/bash"
#+begin_src emacs-lisp
 ;; ensure this variable is defined
 (unless (boundp 'org-babel-default-header-args:sh)
   (setq org-babel-default-header-args:sh '()))

 ;; add a default shebang header argument
 (add-to-list 'org-babel-default-header-args:sh
              '(:shebang . "#!/bin/bash"))
#+end_src
	      
* Org-mobile settinge --- disabled
#+begin_src emacs-lisp
  ;; (setq org-mobile-directory "/scpc:rmkrug@webdav.mydrive.ch:org/")
#+end_src

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2010-07-01  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-01  8:14 Rainer M Krug [this message]
2010-07-01 15:55 ` [BABEL] html export for R not working, but for sh and others Eric Schulte
2010-07-02  7:44   ` Rainer M Krug
2010-07-02 12:37     ` Rainer M Krug
2010-07-02 22:52       ` Eric Schulte
2010-07-03 18:42         ` Rainer M Krug

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinW3aIKQOsrjgfp3ZZILMT0dS3jv2WUMILsyf3U@mail.gmail.com \
    --to=r.m.krug@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).