summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-12-11 17:29:38 +0100
committerBastien Guerry <bzg@altern.org>2012-12-11 17:29:38 +0100
commitc3a0dc11a36ee1fc2142b91dce6ea8c96025f839 (patch)
treeeaa8faee282c68cf3504fcf7fdf196ecb588b31d
parent980e52282d702cdf8d9ad6c03297191f6fa5d61c (diff)
downloadorg-mode-c3a0dc11a36ee1fc2142b91dce6ea8c96025f839.tar.gz
org-table.el: Ensure table coordinates are correctly displayed when sorting.
* org-table.el (org-table-sort-lines): Ensure coordinates are correctly displayed when sorting. * org.el (org-do-sort): Enhance prompt.
-rw-r--r--lisp/org-table.el4
-rw-r--r--lisp/org.el2
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 0555041..f7cae3c 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -1594,6 +1594,7 @@ should be done in reverse order."
(interactive "P")
(let* ((thisline (org-current-line))
(thiscol (org-table-current-column))
+ (otc org-table-overlay-coordinates)
beg end bcol ecol tend tbeg column lns pos)
(when (equal thiscol 0)
(if (org-called-interactively-p 'any)
@@ -1642,12 +1643,15 @@ should be done in reverse order."
x))
(org-split-string (buffer-substring beg end) "\n")))
(setq lns (org-do-sort lns "Table" with-case sorting-type))
+ (when org-table-overlay-coordinates
+ (org-table-toggle-coordinate-overlays))
(delete-region beg end)
(move-marker beg nil)
(move-marker end nil)
(insert (mapconcat 'cdr lns "\n") "\n")
(org-goto-line thisline)
(org-table-goto-column thiscol)
+ (when otc (org-table-toggle-coordinate-overlays))
(message "%d lines sorted, based on column %d" (length lns) column)))
;;;###autoload
diff --git a/lisp/org.el b/lisp/org.el
index 7b85a11..0cd7c27 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8205,7 +8205,7 @@ the car of the elements of the table.
If WITH-CASE is non-nil, the sorting will be case-sensitive."
(unless sorting-type
(message
- "Sort %s: [a]lphabetic. [n]umeric. [t]ime. A/N/T means reversed:"
+ "Sort %s: [a]lphabetic, [n]umeric, [t]ime. A/N/T means reversed:"
what)
(setq sorting-type (read-char-exclusive)))
(let ((dcst (downcase sorting-type))