[Reported to the author 060520]
Currently the function slime-repl-merge-histories appears to be buggy in not deleting duplicates, and maintaining order. For example:
ELISP> (slime-repl-merge-histories '(1 2 3 4 5) '(2 3 4 8)) (8 1 5 2 3 4)
ELISP> (slime-repl-merge-histories '(1 2 3 4 5 1 2 3 4 5) '(2 3 4 8)) (8 1 5 1 5 2 3 4)
I believe the desired result is: (2 3 4 8 1 5) so M-p in a fresh repl will pick the last (latest) item from the previous repl session. I believe the following Changelog entry applies,
|2005-10-11 Stefan Kamphausen skampi@gmx.net
and would suggest a simpler function that uses delete-duplicates (for strings):
(defun slime-repl-merge-histories (old-hist new-hist) "Merge entries from OLD-HIST and NEW-HIST." (remove-duplicates (append new-hist old-hist) :test 'string= :from-end t))
-- Madhu
Currently the function slime-repl-merge-histories appears to be buggy in not deleting duplicates, and maintaining order. For example:
i've got a local change for slime-repl-merge-histories that also uses a hashtable to considerably speed up the merging (used by a new slime-repl-delete-history). i'll look into mergin back that change to cvs later today.