Sfoglia il codice sorgente

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.
Bastien Guerry 12 anni fa
parent
commit
c3a0dc11a3
2 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 4 0
      lisp/org-table.el
  2. 1 1
      lisp/org.el

+ 4 - 0
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

+ 1 - 1
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))