From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Newsgroups: gmane.emacs.help Subject: Select/highlight and *copy* matches of some regex Date: Mon, 27 Jun 2022 17:52:48 +0200 Message-ID: <82a978f3-e974-4d8f-b87e-5707ffec0b5b@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20581"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.7.0-alpha0-713-g1f035dc716-fm-20220617.001-g1f035dc7 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 27 17:57:02 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5r6j-00057w-Mu for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 17:57:01 +0200 Original-Received: from localhost ([::1]:47198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5r6i-00089h-Ms for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 11:57:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5r5U-00085K-HG for help-gnu-emacs@gnu.org; Mon, 27 Jun 2022 11:55:45 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55399) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5r5S-0006ll-VI for help-gnu-emacs@gnu.org; Mon, 27 Jun 2022 11:55:44 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 552BD5C0077 for ; Mon, 27 Jun 2022 11:55:40 -0400 (EDT) Original-Received: from imap44 ([10.202.2.94]) by compute2.internal (MEProxy); Mon, 27 Jun 2022 11:55:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t= 1656345340; x=1656431740; bh=+pbeitYt1ZOI8tmX/vPWFQR74rPGZ4evUGg ZxKRf8ao=; b=QhXSja916f/epxwj25vIj2tiePUB463SEKIN0C3y23Naklo73Hd VfdpAWlX2PxuAoMpxgKJFbZIGDxtRZBSzh1oQT9rzN6fGCoU0uJPkTrwcIX84fea NVJ2p36fxSqOuuVeya0guc1KuGq8bM8k80EuDCH5puOGrmuDxrERDqyxwD4ikr+i Y/aSq92Ju1/1Fh7z1gmjkFQvbBTfj4nYA0Sbv2YPB5E2Hxnm6sQW9oaWwVolucXM aE+aXn6t1jf8dMMuV0nw0AGqEoT6gyaEIVQxVmPW/5OxkZPUzspRilXlmVI0lVsU 6z7HN6W2Rxpp6dhTnLIKNwB4p52bZ2VZH7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1656345340; x= 1656431740; bh=+pbeitYt1ZOI8tmX/vPWFQR74rPGZ4evUGgZxKRf8ao=; b=H O4Wfq0D6l3qXhlbtdIcRus51DdA9+BdX7Wnv2qqelKJO/9GuqhhwNngRZmhs6leM hsDn9qflnoAqQwcWIM4iIxTGYgx07rlYyEJHMDlAgrc7FW1XRDvIw0Uuc8q1ov2e 3ShLz4Qzj9p6KIt5xxLhjf2wLz7nKViObzI2/yw0bkzd+d8zxSVUCDqoFtNGgexm otPhNr/8EL3nRMdCDyQL7ttXh4sh0HvUJu40x/w+O0KOFu3oK4bF5NhpotGas0Ua eaqVe4k8A9b5XU8dIr6fXPajSHNi4swymJ0bG8y+QAIoi3klPiOeB2Cj5NnNnNyI LIkXIXFrB4Iucb0KLSxaA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeghedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpeflohhoshhtuceojhhoohhsthhkrhgvmhgvrhhssehfrghsthhm rghilhdrfhhmqeenucggtffrrghtthgvrhhnpeeihffgkeejjedufeevtdetteehveffie ehjedtvdehveffgfeggfejffekieekjeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhlrd hfmh X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2660036A0073; Mon, 27 Jun 2022 11:55:40 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Received-SPF: pass client-ip=66.111.4.28; envelope-from=joostkremers@fastmail.fm; helo=out4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138127 Archived-At: Hi all, I've been looking for at least an hour for something that my Sublime-using colleagues seem to be able to do out of the box... Highlight all matches of some regex in the current buffer and then copy/kill *all* of those matches so that you can yank them in a new buffer. The first part, highlighting all matches, is not a problem. But I haven't found a way yet to then extract all matches. I've also looked for third-party packages, but haven't been able to find anything. I read a few times that `multiple-cursors` can kill all matches as a rectangle, so that you can use `yank-rectangle`, but I haven't been able to make that work. So what am I overlooking here? I mean, there *must* be a way, right? TIA, Joost -- Joost Kremers Life has its moments