Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is does smart mean in helm-case-fold-search? #122

Closed
lewang opened this issue Sep 23, 2012 · 6 comments
Closed

what is does smart mean in helm-case-fold-search? #122

lewang opened this issue Sep 23, 2012 · 6 comments
Labels

Comments

@lewang
Copy link
Member

lewang commented Sep 23, 2012

From the manual

Searches in Emacs normally ignore the case of the text they are searching
through, if you specify the text in lower case. Thus, if you specify
searching for ‘foo’, then ‘Foo’ and ‘foo’ also match. Regexps, and in
particular character sets, behave likewise: ‘[ab]’ matches ‘a’ or ‘A’ or ‘b’
or ‘B’.

An upper-case letter anywhere in the incremental search string makes the search case-sensitive.

How is this different than the 'smart setting of helm-case-fold-search?

@thierryvolpiatto
Copy link
Member

Le Wang notifications@github.com writes:

How is this different than the 'smart setting of helm-case-fold-search?

pattern "foo" match "foo" and "Foo"
pattern "Foo" match only "Foo"

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@lewang
Copy link
Member Author

lewang commented Sep 24, 2012

Unless I'm missing something obvious,

That is case-fold-search == t. What is helm-case-fold-search == 'smart?

@thierryvolpiatto
Copy link
Member

Le Wang notifications@github.com writes:

Unless I'm missing something obvious,

That is case-fold-search == t.
No.

What is helm-case-fold-search == 'smart?
if pattern contain upcase characters case-fold-search == nil is used.
if pattern contain only downcase characters, case-fold-search == t is
used.

See definition of helm-set-case-fold-search and documentation of
helm-case-fold-search.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@lewang
Copy link
Member Author

lewang commented Sep 24, 2012

if pattern contain upcase characters case-fold-search == nil is used.
if pattern contain only downcase characters, case-fold-search == t is
used.

This is the effect of case-fold-search == t. Case-sensitive only when
search-string has one or more upper-case letters (as described in the manual
link above).

@thierryvolpiatto
Copy link
Member

Le Wang notifications@github.com writes:

if pattern contain upcase characters case-fold-search == nil is used.
if pattern contain only downcase characters, case-fold-search == t is
used.

This is the effect of case-fold-search == t. Case-sensitive only when
search-string has one or more upper-case letters (as described in the manual
link above).
No, the link is about isearch behavior, not general searching/matching
in emacs (i.e string-match, (re)-search-forward etc...)
Just try with a precedent version of helm matching foo and Foo and you
will understand what I mean.

Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997

@lewang
Copy link
Member Author

lewang commented Sep 25, 2012

OK. I see. Thanks for the clarification.

@lewang lewang closed this as completed Sep 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants