annotate lisp/org/ob-keys.el @ 109500:3a9a140f18bb

* net/tramp.el (tramp-methods): Move hostname to the end in all plink `tramp-login-args'.
author Michael Albinus <michael.albinus@gmx.de>
date Fri, 23 Jul 2010 15:58:52 +0200
parents a150e8a14679
children 5cb272c831e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109462
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
1 ;;; ob-keys.el --- key bindings for org-babel
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
2
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
3 ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
4
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
5 ;; Author: Eric Schulte
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
6 ;; Keywords: literate programming, reproducible research
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
7 ;; Homepage: http://orgmode.org
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
8 ;; Version: 7.01
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
9
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
11
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
14 ;; the Free Software Foundation, either version 3 of the License, or
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
15 ;; (at your option) any later version.
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
16
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
20 ;; GNU General Public License for more details.
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
21
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
24
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
25 ;;; Commentary:
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
26
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
27 ;; Add org-babel keybindings to the org-mode keymap for exposing
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
28 ;; org-babel functions. These will all share a common prefix. See
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
29 ;; the value of `org-babel-key-bindings' for a list of interactive
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
30 ;; functions and their associated keys.
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
31
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
32 ;;; Code:
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
33 (require 'ob)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
34
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
35 (defvar org-babel-key-prefix "\C-c\C-v"
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
36 "The key prefix for Babel interactive key-bindings.
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
37 See `org-babel-key-bindings' for the list of interactive babel
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
38 functions which are assigned key bindings, and see
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
39 `org-babel-map' for the actual babel keymap.")
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
40
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
41 (defvar org-babel-map (make-sparse-keymap)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
42 "The keymap for interactive Babel functions.")
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
43
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
44 ;;;###autoload
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
45 (defun org-babel-describe-bindings ()
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
46 "Describe all keybindings behind `org-babel-key-prefix'."
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
47 (interactive)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
48 (describe-bindings org-babel-key-prefix))
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
49
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
50 (defvar org-babel-key-bindings
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
51 '(("p" . org-babel-previous-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
52 ("\C-p" . org-babel-previous-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
53 ("n" . org-babel-next-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
54 ("\C-n" . org-babel-next-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
55 ("e" . org-babel-execute-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
56 ("\C-e" . org-babel-execute-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
57 ("o" . org-babel-open-src-block-result)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
58 ("\C-o" . org-babel-open-src-block-result)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
59 ("\C-v" . org-babel-expand-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
60 ("v" . org-babel-expand-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
61 ("g" . org-babel-goto-named-src-block)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
62 ("r" . org-babel-goto-named-result)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
63 ("\C-r" . org-babel-goto-named-result)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
64 ("\C-b" . org-babel-execute-buffer)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
65 ("b" . org-babel-execute-buffer)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
66 ("\C-s" . org-babel-execute-subtree)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
67 ("s" . org-babel-execute-subtree)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
68 ("\C-t" . org-babel-tangle)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
69 ("t" . org-babel-tangle)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
70 ("\C-f" . org-babel-tangle-file)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
71 ("f" . org-babel-tangle-file)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
72 ("\C-l" . org-babel-lob-ingest)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
73 ("l" . org-babel-lob-ingest)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
74 ("\C-z" . org-babel-switch-to-session)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
75 ("z" . org-babel-switch-to-session)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
76 ("\C-a" . org-babel-sha1-hash)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
77 ("a" . org-babel-sha1-hash)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
78 ("h" . org-babel-describe-bindings))
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
79 "Alist of key bindings and interactive Babel functions.
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
80 This list associates interactive Babel functions
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
81 with keys. Each element of this list will add an entry to the
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
82 `org-babel-map' using the letter key which is the `car' of the
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
83 a-list placed behind the generic `org-babel-key-prefix'.")
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
84
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
85 (provide 'ob-keys)
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
86
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
87 ;; arch-tag: 01e348ee-4906-46fa-839a-6b7b6f989048
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
88
a150e8a14679 Install version 7.01 of Org-mode
Carsten Dominik <carsten.dominik@gmail.com>
parents:
diff changeset
89 ;;; ob-keys.el ends here