I've noticed that orderless-not seems to always be case insensitive. (Or it follows the value of case-fold-search, since it uses string-match-p.)
Seems easy to enhance orderless-not to support orderless-smart-case:
(defun orderless-not (pred regexp)
"Match strings that do *not* match PRED and REGEXP."
(let ((ignore-case (orderless--ignore-case-p (list regexp))))
(lambda (str)
(let ((case-fold-search ignore-case))
(not (orderless--match-p pred regexp str))))))
(defun orderless-not (pred regexp)
"Match strings that do *not* match PRED and REGEXP."
+ (let ((ignore-case (orderless--ignore-case-p (list regexp))))
(lambda (str)
+ (let ((case-fold-search ignore-case))
(not (orderless--match-p pred regexp str))))
+))
(This doesn't handle the case where regexp is nil. I don't know enough about that case to decide what the right logic is for it.)
This enables intuitive and convenient consistency. Even when orderless-smart-case is t and capitals are involved, we can type a match that we want to negate, check that it matches exactly what we want to unmatch, and then just add "!".
I've noticed that
orderless-not
seems to always be case insensitive. (Or it follows the value ofcase-fold-search
, since it usesstring-match-p
.)Seems easy to enhance
orderless-not
to supportorderless-smart-case
:(This doesn't handle the case where
regexp
isnil
. I don't know enough about that case to decide what the right logic is for it.)This enables intuitive and convenient consistency. Even when
orderless-smart-case
ist
and capitals are involved, we can type a match that we want to negate, check that it matches exactly what we want to unmatch, and then just add "!".