Noam Postavsky writes: > With your patch, if I do > > ~/src/emacs $ ^this string not present in history^blah^ > > I get the latest entry in the history substituted and re-executed. In > bash I get > > ~/tmp$ ^this string not present in history^blah^ > bash: :s^this string not present in history^blah^: substitution failed > > (if it's easier, I think it would be okay if eshell prints an error > using the !!:s/foo/bar/ syntax, but this case must be an error) Ah, I did notice that, but I was not sure whether it was a bug or desired behavior (as it seemed to occur for me even before this patch). I've added a tiny change to the patch to fix that, but it has the side effect of doing: > *[j@laythe emacs-bisect]$ echo "foo"(:s/bar/baz/) > foo: substitution failed But I think that's an OK change, especially if we want to error out on ^bar^baz when no search is found. I also discovered another issue (which existed before as well): > *[j@laythe emacs-bisect]$ echo one one one > ("one" "one" "one") > *[j@laythe emacs-bisect]$ !!:sg/one/two > :sg/one/two > Wrong type argument: integer-or-marker-p, nil but I'd rather take a look at that later on to avoid cluttering this changeset. (and I'm not sure if I'm just using the feature incorrectly). Thanks, -Jay