* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
@ 2017-04-20 17:55 ynyaaa
2017-04-21 3:40 ` Tino Calancha
0 siblings, 1 reply; 12+ messages in thread
From: ynyaaa @ 2017-04-20 17:55 UTC (permalink / raw
To: 26580
'M-C-s \A' matches both lower letter a and upper letter A.
'M-C-s [\A]' matches \ and lower letter a and upper letter A.
'M-C-s \cCa' matches 一a, but does not match 一A.
In GNU Emacs 25.1.1 (i686-w64-mingw32)
of 2016-09-18 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.0.6002
Configured using:
'configure --host=i686-w64-mingw32 --without-dbus
--without-compress-install CFLAGS=-static'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS
Important settings:
value of $LANG: JPN
locale-coding-system: cp932
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils
misearch multi-isearch help-mode easymenu cl-loaddefs pcase cl-lib
time-date mule-util japan-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table
w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)
Memory information:
((conses 8 92081 7564)
(symbols 32 19681 0)
(miscs 32 54 161)
(strings 16 15921 3924)
(string-bytes 1 430154)
(vectors 8 13169)
(vector-slots 4 519590 4478)
(floats 8 165 28)
(intervals 28 217 13)
(buffers 520 19))
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-20 17:55 bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp ynyaaa
@ 2017-04-21 3:40 ` Tino Calancha
2017-04-21 9:22 ` Andreas Schwab
0 siblings, 1 reply; 12+ messages in thread
From: Tino Calancha @ 2017-04-21 3:40 UTC (permalink / raw
To: ynyaaa; +Cc: 26580, Juri Linkov, tino.calancha
ynyaaa@gmail.com writes:
> 'M-C-s \A' matches both lower letter a and upper letter A.
> 'M-C-s [\A]' matches \ and lower letter a and upper letter A.
> 'M-C-s \cCa' matches 一a, but does not match 一A.
Thanks for the report. I guess this is a feature.
A capital letter triggers a case sensitive search. In your last example,
upper letter C turned on the case sensitive search. It might be argue
if that should happen in this case. I think the current way is handy.
Maybe we should mention about this in the `isearch-forward' docstring.
In the former examples the slash somehow prevents this to happen. For instance,
if you don't escape 'A' in the first example, then the search will match just 'A'.
Try the following:
'M-C-s A' matches upper letter A.
'M-C-s [a\]' matches \ and lower letter a and upper letter A.
'M-C-s [A\]' matches \ and upper letter A.
'M-C-s \cca' matches 一a, and 一A.
'M-C-s \ccA' just matches 一A.
'M-C-s \cCA' just matches 一A.
'M-C-s \cCa' just matches 一a.
Of couse, you always can toggle the case sensitivity during
those searches with M-c:
'M-C-s A M-c' matches both lower letter a and upper letter A.
'M-C-s \cCa M-c' matches 一a, and 一A.
Regards,
Tino
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 3:40 ` Tino Calancha
@ 2017-04-21 9:22 ` Andreas Schwab
2017-04-21 9:50 ` Tino Calancha
0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2017-04-21 9:22 UTC (permalink / raw
To: Tino Calancha; +Cc: ynyaaa, 26580, Juri Linkov
On Apr 21 2017, Tino Calancha <tino.calancha@gmail.com> wrote:
> A capital letter triggers a case sensitive search. In your last example,
> upper letter C turned on the case sensitive search. It might be argue
> if that should happen in this case. I think the current way is handy.
IMHO that is a bug. Just like \W doesn't trigger it, \cC should not do
it either.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 9:22 ` Andreas Schwab
@ 2017-04-21 9:50 ` Tino Calancha
2017-04-21 12:04 ` Andreas Schwab
0 siblings, 1 reply; 12+ messages in thread
From: Tino Calancha @ 2017-04-21 9:50 UTC (permalink / raw
To: Andreas Schwab; +Cc: ynyaaa, Tino Calancha, 26580, Juri Linkov
On Fri, 21 Apr 2017, Andreas Schwab wrote:
> On Apr 21 2017, Tino Calancha <tino.calancha@gmail.com> wrote:
>
>> A capital letter triggers a case sensitive search. In your last example,
>> upper letter C turned on the case sensitive search. It might be argue
>> if that should happen in this case. I think the current way is handy.
>
> IMHO that is a bug. Just like \W doesn't trigger it, \cC should not do
> it either.
Yeah, it looks strange. I would say, if \W doesn't trigger, then c\C
would not either (\cC might do, because the upper case is not escaped).
I'm also wondering if \W should do what is doing. Is it documented
somewhere that the slash does not trigger case sensitivity?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 9:50 ` Tino Calancha
@ 2017-04-21 12:04 ` Andreas Schwab
2017-04-21 12:16 ` Tino Calancha
0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2017-04-21 12:04 UTC (permalink / raw
To: Tino Calancha; +Cc: ynyaaa, 26580, Juri Linkov
On Apr 21 2017, Tino Calancha <tino.calancha@gmail.com> wrote:
> I'm also wondering if \W should do what is doing. Is it documented
> somewhere that the slash does not trigger case sensitivity?
\W has nothing to do with case, it's just a non-word character. Same
for \cC.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 12:04 ` Andreas Schwab
@ 2017-04-21 12:16 ` Tino Calancha
2017-04-21 13:26 ` Eli Zaretskii
2017-04-21 13:31 ` Andreas Schwab
0 siblings, 2 replies; 12+ messages in thread
From: Tino Calancha @ 2017-04-21 12:16 UTC (permalink / raw
To: Andreas Schwab; +Cc: ynyaaa, Tino Calancha, 26580, Juri Linkov
On Fri, 21 Apr 2017, Andreas Schwab wrote:
> On Apr 21 2017, Tino Calancha <tino.calancha@gmail.com> wrote:
>
>> I'm also wondering if \W should do what is doing. Is it documented
>> somewhere that the slash does not trigger case sensitivity?
>
> \W has nothing to do with case, it's just a non-word character. Same
> for \cC.
OK, i just picked up \W from you. Let's changed to \T:
emacs -Q:
C-M-s \T ; matches lower and upper T
C-M-s T ; just matches upper T
I don't see in the manual this effect on an escaped upper letter.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 12:16 ` Tino Calancha
@ 2017-04-21 13:26 ` Eli Zaretskii
2017-04-21 14:59 ` Tino Calancha
2017-04-21 13:31 ` Andreas Schwab
1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2017-04-21 13:26 UTC (permalink / raw
To: Tino Calancha; +Cc: ynyaaa, schwab, 26580, juri
> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Fri, 21 Apr 2017 21:16:27 +0900 (JST)
> Cc: ynyaaa@gmail.com, Tino Calancha <tino.calancha@gmail.com>,
> 26580@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
>
> C-M-s \T ; matches lower and upper T
> C-M-s T ; just matches upper T
>
> I don't see in the manual this effect on an escaped upper letter.
(defcustom search-upper-case 'not-yanks
"If non-nil, upper case chars disable case fold searching.
That is, upper and lower case chars must match exactly.
This applies no matter where the chars come from, but does not
apply to chars in regexps that are prefixed with `\\'.
If this value is `not-yanks', text yanked into the search string
in Isearch mode is always downcased."
:type '(choice (const :tag "off" nil)
(const not-yanks)
(other :tag "on" t)))
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 12:16 ` Tino Calancha
2017-04-21 13:26 ` Eli Zaretskii
@ 2017-04-21 13:31 ` Andreas Schwab
2017-04-21 15:17 ` Tino Calancha
1 sibling, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2017-04-21 13:31 UTC (permalink / raw
To: Tino Calancha; +Cc: ynyaaa, 26580, Juri Linkov
On Apr 21 2017, Tino Calancha <tino.calancha@gmail.com> wrote:
> OK, i just picked up \W from you. Let's changed to \T:
Since \T has no meaning nobody would use it anyway.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 13:26 ` Eli Zaretskii
@ 2017-04-21 14:59 ` Tino Calancha
0 siblings, 0 replies; 12+ messages in thread
From: Tino Calancha @ 2017-04-21 14:59 UTC (permalink / raw
To: Eli Zaretskii; +Cc: ynyaaa, Tino Calancha, schwab, 26580, juri
On Fri, 21 Apr 2017, Eli Zaretskii wrote:
>> From: Tino Calancha <tino.calancha@gmail.com>
>> Date: Fri, 21 Apr 2017 21:16:27 +0900 (JST)
>> Cc: ynyaaa@gmail.com, Tino Calancha <tino.calancha@gmail.com>,
>> 26580@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
>>
>> C-M-s \T ; matches lower and upper T
>> C-M-s T ; just matches upper T
>>
>> I don't see in the manual this effect on an escaped upper letter.
>
> (defcustom search-upper-case 'not-yanks
> "If non-nil, upper case chars disable case fold searching.
> That is, upper and lower case chars must match exactly.
> This applies no matter where the chars come from, but does not
> apply to chars in regexps that are prefixed with `\\'.
> If this value is `not-yanks', text yanked into the search string
> in Isearch mode is always downcased."
> :type '(choice (const :tag "off" nil)
> (const not-yanks)
> (other :tag "on" t)))
>
Great, thanks!
Now it's clear why \A matches both 'a' and 'A'.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 13:31 ` Andreas Schwab
@ 2017-04-21 15:17 ` Tino Calancha
2017-04-21 17:42 ` Andreas Schwab
2017-04-25 20:57 ` Juri Linkov
0 siblings, 2 replies; 12+ messages in thread
From: Tino Calancha @ 2017-04-21 15:17 UTC (permalink / raw
To: Andreas Schwab; +Cc: 26580, ynyaaa, Tino Calancha, Juri Linkov
On Fri, 21 Apr 2017, Andreas Schwab wrote:
> On Apr 21 2017, Tino Calancha <tino.calancha@gmail.com> wrote:
>
>> OK, i just picked up \W from you. Let's changed to \T:
>
> Since \T has no meaning nobody would use it anyway.
Someone might want to use it to disable the case sensitivity search.
After Eli e-mail, i agree with the OP and you that would be more
consistent if '\cCa' disables case sensitive searches as '\cc\A' does.
In case that is difficult to implement, we might want to document
that the slash trick just works for single characters. Then, the user
would just use '\cca' which loks even simpler.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 15:17 ` Tino Calancha
@ 2017-04-21 17:42 ` Andreas Schwab
2017-04-25 20:57 ` Juri Linkov
1 sibling, 0 replies; 12+ messages in thread
From: Andreas Schwab @ 2017-04-21 17:42 UTC (permalink / raw
To: Tino Calancha; +Cc: 26580, ynyaaa, Juri Linkov
On Apr 22 2017, Tino Calancha <tino.calancha@gmail.com> wrote:
> would just use '\cca' which loks even simpler.
\cc means something quite different than \cC.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp
2017-04-21 15:17 ` Tino Calancha
2017-04-21 17:42 ` Andreas Schwab
@ 2017-04-25 20:57 ` Juri Linkov
1 sibling, 0 replies; 12+ messages in thread
From: Juri Linkov @ 2017-04-25 20:57 UTC (permalink / raw
To: Tino Calancha; +Cc: ynyaaa, Andreas Schwab, 26580
> In case that is difficult to implement, we might want to document
> that the slash trick just works for single characters. Then, the user
> would just use '\cca' which loks even simpler.
The implementation that takes care of ‘\’ is in ‘isearch-no-upper-case-p’.
I guess we need a special casing for ‘\cC’ here as well.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-04-25 20:57 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-20 17:55 bug#26580: 25.1; inappropriate case folding while isearch-forward-regexp ynyaaa
2017-04-21 3:40 ` Tino Calancha
2017-04-21 9:22 ` Andreas Schwab
2017-04-21 9:50 ` Tino Calancha
2017-04-21 12:04 ` Andreas Schwab
2017-04-21 12:16 ` Tino Calancha
2017-04-21 13:26 ` Eli Zaretskii
2017-04-21 14:59 ` Tino Calancha
2017-04-21 13:31 ` Andreas Schwab
2017-04-21 15:17 ` Tino Calancha
2017-04-21 17:42 ` Andreas Schwab
2017-04-25 20:57 ` Juri Linkov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.