Staying at the search string when dired search fails

May 24, 2013 in answer

0 votes, 0.00 avg. rating (0% score)

ANSWER:

You may try this ugly hack:

(defadvice tags-loop-continue (around protect-search-end activate)
  (let* ((oldbuf (current-buffer)))
    (unless (ignore-errors ad-do-it)
      (switch-to-buffer oldbuf)
      (message "No more matches..."))))

mk1 from http://stackoverflow.com/questions/16746219