aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Dominik2006-12-18 11:53:08 +0000
committerCarsten Dominik2006-12-18 11:53:08 +0000
commit7e4661393919dce268d25def2cb8287a2331b4be (patch)
treea2ef64d7f40a8b5a452efa6714a7f28661f0fee0
parent8195676affea176f0a219d47d962e90f3c8418e0 (diff)
downloademacs-7e4661393919dce268d25def2cb8287a2331b4be.tar.gz
emacs-7e4661393919dce268d25def2cb8287a2331b4be.zip
(org-current-line): Make sure that lines are
counted from beginning of buffer. (org-table-copy-region, org-table-paste-rectangle): Make sure that lines are counted from beginning of buffer.
-rw-r--r--lisp/textmodes/org.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index d9baad489a3..6133f531aae 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
5;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6;; Keywords: outlines, hypermedia, calendar, wp 6;; Keywords: outlines, hypermedia, calendar, wp
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 4.56b 8;; Version: 4.56c
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -3238,7 +3238,7 @@ The following commands are available:
3238(defsubst org-current-line (&optional pos) 3238(defsubst org-current-line (&optional pos)
3239 (save-excursion 3239 (save-excursion
3240 (and pos (goto-char pos)) 3240 (and pos (goto-char pos))
3241 (+ (if (bolp) 1 0) (count-lines (point-min) (point))))) 3241 (+ (if (bolp) 1 0) (count-lines 1 (point)))))
3242 3242
3243(defun org-current-time () 3243(defun org-current-time ()
3244 "Current time, possibly rounded to `org-time-stamp-rounding-minutes'." 3244 "Current time, possibly rounded to `org-time-stamp-rounding-minutes'."
@@ -12375,11 +12375,11 @@ with `org-table-paste-rectangle'."
12375 (rpl (if cut " " nil))) 12375 (rpl (if cut " " nil)))
12376 (goto-char beg) 12376 (goto-char beg)
12377 (org-table-check-inside-data-field) 12377 (org-table-check-inside-data-field)
12378 (setq l01 (count-lines (point-min) (point)) 12378 (setq l01 (org-current-line)
12379 c01 (org-table-current-column)) 12379 c01 (org-table-current-column))
12380 (goto-char end) 12380 (goto-char end)
12381 (org-table-check-inside-data-field) 12381 (org-table-check-inside-data-field)
12382 (setq l02 (count-lines (point-min) (point)) 12382 (setq l02 (org-current-line)
12383 c02 (org-table-current-column)) 12383 c02 (org-table-current-column))
12384 (setq l1 (min l01 l02) l2 (max l01 l02) 12384 (setq l1 (min l01 l02) l2 (max l01 l02)
12385 c1 (min c01 c02) c2 (max c01 c02)) 12385 c1 (min c01 c02) c2 (max c01 c02))
@@ -12410,7 +12410,7 @@ lines."
12410 (error "First cut/copy a region to paste!")) 12410 (error "First cut/copy a region to paste!"))
12411 (org-table-check-inside-data-field) 12411 (org-table-check-inside-data-field)
12412 (let* ((clip org-table-clip) 12412 (let* ((clip org-table-clip)
12413 (line (count-lines (point-min) (point))) 12413 (line (org-current-line))
12414 (col (org-table-current-column)) 12414 (col (org-table-current-column))
12415 (org-enable-table-editor t) 12415 (org-enable-table-editor t)
12416 (org-table-automatic-realign nil) 12416 (org-table-automatic-realign nil)