emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: isearch-yank-until-char


From: Juri Linkov
Subject: Re: PATCH: isearch-yank-until-char
Date: Wed, 28 Aug 2019 00:31:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> `M-.' and `C-M-.' are good keys for pulling text
>> into the minibuffer, as well as into a search string,
>> so let's reserve them for the text pulling feature.
>
> OK.  (But we already have multiple text-pulling
> keys for Isearch.)

One of its first usages would be to bind `M-s M-.' to a command
that turns the active region into the search string.

>> > For `isearch-yank-until-char', I'm not partial
>> > to any particular key.  I'm just partial to not
>> > using `C-M-c' for that command.
>>
>> Then for `isearch-yank-until-char' let's use `C-M-z'
>> with mnemonics pointing to its similarity with `M-z'
>> (zap-to-char).
>
> I'm not against it.
>
> But I don't think it's a super idea to say
> that to users, i.e., to give them the idea
> that this is closely related to `zap-to-char'.
> There are some similarities, but it's not that
> close.
>
> It's OK for its mnemonic utility, but I'm not
> sure it's good to explicitly mention `zap-to-char'.
> Users of `zap-to-char' will anyway get the
> association (without our pointing it out), and
> there's no harm in that.

We could bind such implementation of skip-to-char:

  (defun skip-to-char (arg char)
    (interactive "^p\ncSkip to char: ")
    (search-forward (char-to-string char) nil nil arg)
    (forward-char -1))

to the global key `C-M-z':

  (define-key esc-map "\C-z" 'skip-to-char)

Then `C-SPC C-M-z ) M-s M-.' would be another way
to yank until next char.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]