Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

This commit is contained in:
Carsten Dominik 2010-05-18 08:59:06 +02:00
commit 5afef7d3d8
2 changed files with 33 additions and 13 deletions

View File

@ -35,30 +35,49 @@
(require 'org-babel) (require 'org-babel)
(defvar org-babel-key-prefix "\C-c\C-v" (defvar org-babel-key-prefix "\C-c\C-v"
"Prefix behind which all org-babel interactive key-binding will "The `org-babel-key-prefix' variable holds the key prefix
be placed. See `org-babel-key-bindings' for the list of behind which all org-babel interactive key-binding are placed.
interactive babel functions which are assigned key bindings, and See `org-babel-key-bindings' for the list of interactive babel
see `org-babel-map' for the actual babel keymap.") functions which are assigned key bindings, and see
`org-babel-map' for the actual babel keymap.")
(defvar org-babel-map (make-sparse-keymap) "The org-babel keymap.") (defvar org-babel-map (make-sparse-keymap)
"The keymap holding key bindings for interactive org-babel
functions.")
(define-key org-mode-map org-babel-key-prefix org-babel-map) (define-key org-mode-map org-babel-key-prefix org-babel-map)
(defun org-babel-describe-bindings ()
"Describe all key binding placed behind the
`org-babel-key-prefix' prefix."
(interactive)
(describe-bindings org-babel-key-prefix))
(defvar org-babel-key-bindings (defvar org-babel-key-bindings
'(("\C-p" . org-babel-expand-src-block) '(("\C-p" . org-babel-expand-src-block)
("p" . org-babel-expand-src-block)
("\C-g" . org-babel-goto-named-source-block) ("\C-g" . org-babel-goto-named-source-block)
("g" . org-babel-goto-named-source-block)
("\C-b" . org-babel-execute-buffer) ("\C-b" . org-babel-execute-buffer)
("b" . org-babel-execute-buffer)
("\C-s" . org-babel-execute-subtree) ("\C-s" . org-babel-execute-subtree)
("s" . org-babel-execute-subtree)
("\C-t" . org-babel-tangle) ("\C-t" . org-babel-tangle)
("\C-T" . org-babel-tangle-file) ("t" . org-babel-tangle)
("\C-f" . org-babel-tangle-file)
("f" . org-babel-tangle-file)
("\C-l" . org-babel-lob-ingest) ("\C-l" . org-babel-lob-ingest)
("l" . org-babel-lob-ingest)
("\C-z" . org-babel-switch-to-session) ("\C-z" . org-babel-switch-to-session)
("\C-h" . org-babel-sha1-hash)) ("z" . org-babel-switch-to-session)
"Org-babel keybindings. This list associates interactive ("\C-a" . org-babel-sha1-hash)
org-babel functions with keys. Each element of this list will ("a" . org-babel-sha1-hash)
add an entry to the `org-babel-map' using the letter key which is ("h" . org-babel-describe-bindings))
the `car' of the a-list placed behind the generic "Alist associating key bindings with interactive Org-babel
`org-babel-key-prefix'.") functions. This list associates interactive org-babel functions
with keys. Each element of this list will add an entry to the
`org-babel-map' using the letter key which is the `car' of the
a-list placed behind the generic `org-babel-key-prefix'.")
(mapc (lambda (pair) (mapc (lambda (pair)
(define-key org-babel-map (car pair) (cdr pair))) (define-key org-babel-map (car pair) (cdr pair)))

View File

@ -1235,7 +1235,8 @@ block but are passed literally to the \"example-block\"."
(defun org-babel-clean-text-properties (text) (defun org-babel-clean-text-properties (text)
"Strip all properties from text return." "Strip all properties from text return."
(set-text-properties 0 (length text) nil text) text) (when text
(set-text-properties 0 (length text) nil text) text))
(defun org-babel-strip-protective-commas (body) (defun org-babel-strip-protective-commas (body)
"Strip protective commas from bodies of source blocks." "Strip protective commas from bodies of source blocks."