diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2010-09-08 00:13:12 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2010-09-08 00:13:12 -0600 |
commit | 7dd72699a932fb93de28ee902b7f48b15606ba87 (patch) | |
tree | a68b226e60a6887fa427f0a5947b36728b5ecfd8 | |
parent | e92a4b08138b929a7ba1be7553ea73d4117acbe9 (diff) | |
download | org-mode-7dd72699a932fb93de28ee902b7f48b15606ba87.tar.gz |
a new function for jumping to the head of the current code block
* lisp/ob-keys.el (org-babel-key-bindings): adding key-binding for
`org-babel-goto-src-block-head'
* lisp/ob.el (org-babel-goto-src-block-head): jump to the head of the
current code block
-rw-r--r-- | lisp/ob-keys.el | 2 | ||||
-rw-r--r-- | lisp/ob.el | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lisp/ob-keys.el b/lisp/ob-keys.el index 5ed8967..ff730c6 100644 --- a/lisp/ob-keys.el +++ b/lisp/ob-keys.el @@ -58,6 +58,8 @@ functions which are assigned key bindings, and see ("\C-o" . org-babel-open-src-block-result) ("\C-v" . org-babel-expand-src-block) ("v" . org-babel-expand-src-block) + ("u" . org-babel-goto-src-block-head) + ("\C-u" . org-babel-goto-src-block-head) ("g" . org-babel-goto-named-src-block) ("r" . org-babel-goto-named-result) ("\C-r" . org-babel-goto-named-result) @@ -1022,6 +1022,14 @@ If the point is not on a source block then return nil." (point)))))) ;;;###autoload +(defun org-babel-goto-src-block-head () + "Go to the beginning of the current code block." + (interactive) + ((lambda (head) + (if head (goto-char head) (error "not currently in a code block"))) + (org-babel-where-is-src-block-head))) + +;;;###autoload (defun org-babel-goto-named-src-block (name) "Go to a named source-code block." (interactive |