浏览代码

Fix list end with non-empty blank lines. Fix sorting.

* org-list.el (org-list-bottom-point-with-indent): do not check
  indentation of a non-empty blank line.
* org-list.el (org-sort-list): sort a list with point anywhere inside
  it.
Nicolas Goaziou 14 年之前
父节点
当前提交
0778fb8748
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/org-list.el

+ 2 - 1
lisp/org-list.el

@@ -500,8 +500,8 @@ List ending is determined by the indentation of text. See
       (org-list-maybe-skip-block #'re-search-forward limit)
       (beginning-of-line)
       (catch 'exit
-	(skip-chars-forward " \t")
 	(while t
+	  (skip-chars-forward " \t")
 	  (let ((ind (org-get-indentation)))
 	    (cond
 	     ((or (>= (point) limit)
@@ -1965,6 +1965,7 @@ compare entries."
     (message "Sorting items...")
     (save-restriction
       (narrow-to-region start end)
+      (goto-char (point-min))
       (let* ((dcst (downcase sorting-type))
 	     (case-fold-search nil)
 	     (now (current-time))