[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sort-lines in HEAD is not compatible with current Emacs - with patch
From: |
Richard Stallman |
Subject: |
Re: sort-lines in HEAD is not compatible with current Emacs - with patch |
Date: |
Mon, 31 Mar 2003 03:37:15 -0500 |
The bug can be fixed by the code I submitted the 1st time or by the 2
changes above. My original solution has less code but enlarge the
original buffer by the size of the sorted region for a brief time (it
does the delete AFTER insertion while the above code does it BEFORE).
Yes, that's exactly why the old patch is a bad idea. Meanwhile, it
sounds like you're saying this new patch will fix it, while avoiding
that drawback.
Could you confirm this fixes it?
*** sort.el.~1.44.~ Wed Feb 12 02:22:16 2003
--- sort.el Sun Mar 30 23:13:45 2003
***************
*** 199,207 ****
;; Delete the original copy of the text.
(delete-region min max)
;; Now replace the separator " " with the sorted text.
! (goto-char (point-max))
(insert-buffer-substring temp-buffer)
! (delete-region min (1+ min))))))
;;;###autoload
(defun sort-lines (reverse beg end)
--- 199,207 ----
;; Delete the original copy of the text.
(delete-region min max)
;; Now replace the separator " " with the sorted text.
! (goto-char min)
(insert-buffer-substring temp-buffer)
! (delete-region max (1+ max))))))
;;;###autoload
(defun sort-lines (reverse beg end)