dired-do-search
(A) 和 tags-loop-continue
(M-,) 的行为在 Emacs 24 中已更改。
如果搜索到达标记缓冲区的末尾,Emacs 23 中的可见缓冲区仍然是找到搜索字符串的最后一个缓冲区。在 Emacs 24 中,最后一次搜索丢失,另一个缓冲区(不清楚是哪个)变得可见。
如何恢复 Emacs 24 中以前的行为?
最佳答案
你可以尝试这个丑陋的黑客:
(defadvice tags-loop-continue (around protect-search-end activate)
(let ((oldbuf (current-buffer)))
(unless (ignore-errors ad-do-it t)
(switch-to-buffer oldbuf)
(message "No more matches..."))))
这个around-advice记住当前缓冲区,并可能在 tags-loop-continue
的实际执行发出错误信号时恢复它,我们trap with ignore-errors
.
关于emacs - Emacs 24 中的 dired-do-search 搞乱了缓冲区列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16719363/