From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: PATCH: isearch-yank-until-char Date: Sat, 17 Aug 2019 08:31:09 -0400 Message-ID: References: <87tvakfnv4.fsf@red-bean.com> <87tvainv64.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="1986"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Karl Fogel , Emacs developers To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 17 14:31:49 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyxs5-0000OJ-MJ for ged-emacs-devel@m.gmane.org; Sat, 17 Aug 2019 14:31:49 +0200 Original-Received: from localhost ([::1]:36068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyxs4-0004sh-10 for ged-emacs-devel@m.gmane.org; Sat, 17 Aug 2019 08:31:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43596) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyxrX-0004sa-EL for emacs-devel@gnu.org; Sat, 17 Aug 2019 08:31:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyxrV-0000XI-U7 for emacs-devel@gnu.org; Sat, 17 Aug 2019 08:31:14 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13856) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hyxrV-0000X7-QT for emacs-devel@gnu.org; Sat, 17 Aug 2019 08:31:13 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 304414467BC; Sat, 17 Aug 2019 08:31:13 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1942B4467A2; Sat, 17 Aug 2019 08:31:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1566045072; bh=G9eyc8wtgVLpEAq+t/QrVU5USJruB1sDZDOd/aXsWNU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=kdV56e20yMcpW/yc/lUpqeD9LDTmDjbE8LErKzTiq3ATDYcq37Zu8PKzvLuYZA3tW 3vIrlqF9pIXcxsonxB72S4X2WGYnWsd1WjFUlMxsI2IwndA2CKTYgnp12PgEfAhmQe nF9gbg89Y3Udy+s8V1WPJ5YR2EE2GYhT8lHMIP4aTilAbU7SES9ZU6bHb37i0FCSRC YqCf1/WMktR0To8OjSdXO9sByDkWlcCrEfefGa+uu7+dXsXaruJ/BO0w6EcnMW8u2h Z++f1ZrsSDm+p2DwqYfoEJzTxAf6x2DI45TMMy8GPoU4Ylp3mCtjte8KAXFbo+6+o1 ZI6oV0utiWuEA== Original-Received: from alfajor (unknown [46.189.28.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 51630120403; Sat, 17 Aug 2019 08:31:11 -0400 (EDT) In-Reply-To: <87tvainv64.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 15 Aug 2019 21:24:51 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239410 Archived-At: >> I like the idea, but would welcome even more warmly an isearch which >> yanks "whatever text is skipped by the next command" so it can be used >> to yank the next word, sexp, char, ... > A.k.a. isearch-yank-on-move. I was thinking of it more as a prefix command than a variable, but other than that, yes. > Since there is no non-isearch global command to skip to the next char > that could be used by isearch-yank-on-move, a fictional command is needed > like this > > (defun skip-to-char (arg char) > (interactive "^p\ncSkip to char: ") > (search-forward (char-to-string char) nil nil arg) > (forward-char -1)) Indeed, Stefan