Emacs 迫使嬉皮士扩展到尊重资本

Emacs 迫使嬉皮士扩展到尊重资本,emacs,Emacs,我想阻止hippie expand给我的补全与我已经提供的大写不匹配。示例: start with "hippie1", "Hippie2", and "HIPPIE3" "H" completes to "Hippie2" and "HIPPIE3", but not "hippie1" 有没有一种简单的方法可以实现这一点?hippie expand将工作分配给hippie expand try functions list中的函数,我认为这取决于每个函数是否认为案例重要,因此可能没有简单

我想阻止hippie expand给我的补全与我已经提供的大写不匹配。示例:

start with "hippie1", "Hippie2", and "HIPPIE3"

"H" completes to "Hippie2" and "HIPPIE3", but not "hippie1"

有没有一种简单的方法可以实现这一点?

hippie expand
将工作分配给
hippie expand try functions list
中的函数,我认为这取决于每个函数是否认为案例重要,因此可能没有简单的解决方案


从实验上看,
case fold search
变量在某些情况下是有效的,但并非所有情况下都有效

编辑:

这并不是上述问题的最终解决方案,但是,如果设置
案例折叠搜索
足以满足您的需要,您可以使用以下方法:

(defadvice hippie-expand (around hippie-expand-case-fold)
  "Try to do case-sensitive matching (not effective with all functions)."
  (let ((case-fold-search nil))
    ad-do-it))
(ad-activate 'hippie-expand)

case fold search
似乎也适合我。不幸的是,我真的很喜欢不区分大小写的搜索,所以这不是一个很好的解决方案。我会继续玩它,然后报告。答案更新。这就是为什么动态绑定对Emacs来说是一个伟大的设计决策的原因之一:)所以我已经使用了一段时间,它似乎完美地解决了这个问题。感觉像是一个完全的黑客,但正如你所说的-这就是为什么动态绑定是一个伟大的设计决策。谢谢