[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter
From: |
Tino Calancha |
Subject: |
bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter |
Date: |
Tue, 17 May 2022 14:34:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
I have added Stefan, who suggests using the interactive arg (see
explanation below).
I have also added Juri, who is expert on isearch.
>> From: Tino Calancha <tino.calancha@gmail.com>
>> * lisp/misc.el (zap-up-to-char): Add an optional arg INTERACTIVE.
>> Perform a case-sensitive search when INTERACTIVE is non-nil and
>> CHAR is an upper-case character.
>
> I don't understand why the need for the new INTERACTIVE argument.
> And, as mentioned above, I don't think I understand why we need to do
> this only in interactive calls. Non-interactive invocations already
> have a way to request case-sensitivity, by let-binding
> case-fold-search, right?
I'll try to explain this.
This is what Emacs does for isearch/search.
If you go to the *scratch* buffer, and you do
C-s T C-s C-s
you only jump on 'T', that is, you skip the 't'. This is regardless
on the `case-fold-search' value.
Calling from Lisp:
(search-forward "T" nil t)
we'll also jump on the 't' if `case-fold-search' is non-nil.
I want the analog behavior for zap-to... commands: automatic
case sensitivity when the char is uppercase.
I want this behavior on interactive calls only, for instance when users
do `M-z'.
How to detect that the users are calling these commands interactively?
I got inspired from this comment found at the docstring of
`called-interactively-p' (Stefan wrote that):
"Instead of using this function, it is cleaner and more reliable to give your
function an extra optional argument whose ‘interactive’ spec specifies
non-nil unconditionally ("p" is a good way to do this), or via
(not (or executing-kbd-macro noninteractive))."
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, (continued)
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Tino Calancha, 2022/05/11
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Lars Ingebrigtsen, 2022/05/11
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Robert Pluim, 2022/05/11
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Tino Calancha, 2022/05/11
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Andreas Schwab, 2022/05/11
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Tino Calancha, 2022/05/11
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Andreas Schwab, 2022/05/11
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Tino Calancha, 2022/05/11
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Tino Calancha, 2022/05/12
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Eli Zaretskii, 2022/05/13
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter,
Tino Calancha <=
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Eli Zaretskii, 2022/05/17
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Stefan Monnier, 2022/05/17
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Tino Calancha, 2022/05/17
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Eli Zaretskii, 2022/05/17
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Stefan Monnier, 2022/05/17
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Juri Linkov, 2022/05/17
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Tino Calancha, 2022/05/18
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Sean Whitton, 2022/05/20
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Eli Zaretskii, 2022/05/21
- bug#54804: 29.0.50; zap-to-char: case sensitive for upper-case letter, Tino Calancha, 2022/05/21