Subject: Re: bug#39154: 27.0.60; Use character history in zap-up-to-char

From: Juri Linkov <[email-masked]>
Date: Wed, 05 Feb 2020 23:56:22 +0200

> Juri, do we have a similar command (as those pulling things into the search
> string) that pulls the region?
>
> I mean something as the following code (I find useful having a binding for
> it in isearch-mode-map):
>
> (defun my-isearch-yank-selection (beg end)
>   "Pull selection into search string."
>   (interactive
>    (let ((region (and (use-region-p) (region-bounds))))
>      (unless region (user-error "No selected region"))
>      (list (caar region) (cdar region))))
>   (isearch-yank-internal
>    (lambda () (goto-char (if (= (point) beg) end beg))
>      (when select-active-regions (deactivate-mark))
>      (point))))
>
>
> If we don't have it I can open a separated bug report for it.

Yes, please open a new separate bug report, and then also
add links to the recent emacs-devel discussions:

https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg01125.html
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00003.html