summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ecay <aaronecay@gmail.com>2013-10-31 01:47:44 -0400
committerAaron Ecay <aaronecay@gmail.com>2013-10-31 01:54:53 -0400
commita94501a13205cc72911266a2172b938393b56ca9 (patch)
tree8f352dbb3eaa06c66f47e89db82583639a642fc9
parent327aff7a141a6df513c9358d39ec7632590b9949 (diff)
downloadorg-mode-a94501a13205cc72911266a2172b938393b56ca9.tar.gz
babel: don’t move point when tangling a single block
* lisp/ob-tangle.el: (org-babel-tangle): don’t move point when called with single prefix arg Previously, C-u C-x C-v C-t would move point to the head of the source block.
-rw-r--r--lisp/ob-tangle.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 0b22467..7a27c7b 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -180,12 +180,12 @@ used to limit the exported source code blocks by language."
(run-hooks 'org-babel-pre-tangle-hook)
;; Possibly Restrict the buffer to the current code block
(save-restriction
- (when (equal arg '(4))
- (let ((head (org-babel-where-is-src-block-head)))
+ (save-excursion
+ (when (equal arg '(4))
+ (let ((head (org-babel-where-is-src-block-head)))
(if head
(goto-char head)
(user-error "Point is not in a source code block"))))
- (save-excursion
(let ((block-counter 0)
(org-babel-default-header-args
(if target-file