From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#62426: [PATCH] eshell: Add 'rgrep' builtin. Date: Thu, 30 Mar 2023 14:19:08 -0700 Message-ID: <87o7oavsxf.fsf@melete.silentflame.com> References: <87jzz5eucl.fsf@mailbox.org> <87355syce8.fsf@athena.silentflame.com> <314663e3-ff4e-814c-6ff7-6ab3376ef458@gmail.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="35018"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Antero Mejr , 62426@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 30 23:20:19 2023 Return-path: Envelope-to: geb-bug-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 1phzgv-0008wb-IW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Mar 2023 23:20:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phzgj-0003Mc-5K; Thu, 30 Mar 2023 17:20:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phzgh-0003Ls-Eb for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 17:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phzgh-0007Q5-67 for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 17:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phzgh-0008Ln-1D for bug-gnu-emacs@gnu.org; Thu, 30 Mar 2023 17:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Mar 2023 21:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62426 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62426-submit@debbugs.gnu.org id=B62426.168021116132008 (code B ref 62426); Thu, 30 Mar 2023 21:20:02 +0000 Original-Received: (at 62426) by debbugs.gnu.org; 30 Mar 2023 21:19:21 +0000 Original-Received: from localhost ([127.0.0.1]:59601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phzg0-0008KC-UT for submit@debbugs.gnu.org; Thu, 30 Mar 2023 17:19:21 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:56491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phzfy-0008Jv-2m for 62426@debbugs.gnu.org; Thu, 30 Mar 2023 17:19:18 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DCC535C0058; Thu, 30 Mar 2023 17:19:10 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 30 Mar 2023 17:19:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1680211150; x= 1680297550; bh=JKfnfWQWyOpzxLVsUsmbxinJrIoUex0/NetqdZ51Ul8=; b=X kWJTXz8epUbJv6pz727wN9hggp8RhQT8jLtxjybdr8wnRqUGEweph3KgbLZyd6C1 Ocxlk8OIhVxvkBEi/s9/Ho6Asb5FmZ2qBPkUgX+VfL/Ijd6Ddo7WoeWMyv3BPxxq 2z6Pl8BvwTqrrzraQ8rpUIjAavP6H3sNJD6OJpIn8IYIi00JXvdVlLv9nV3U6SFZ gzKu1/+EjayP0x3lmmGlk0bWsTUbfhHOXsX+Sw/AuMBm+29uD7QQQWV9CPQ2xS2k QYG8NzGWN7m/F/cM+IqHU40auWgbQ4uHofwEG3i5MjKW4+Uv8oZWfvfO7ImKrdyU tP7WWKXAtTrMuW+H9Eqpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references: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=1680211150; x=1680297550; bh=JKfnfWQWyOpzx LVsUsmbxinJrIoUex0/NetqdZ51Ul8=; b=KbjN3TczBileOEd0pZM+ag+r8WKjc xttC+Jn2tWoudYVp0ZYwznOnoovFB4jzuhSB1OaHPWuV+w1jk4gFRrfwqnY5OkEF 211uvZj7OW3hKDiPEl9GzmofcVZ7T4JBc7Io/xyHca90yZrxHxcYrt4PPTipIJFV YotLg8GGr5L3H72j6F4sLY+esoPJpiM6Ng8euAa2hjBhiCTL7cY8voVUHtVW956U 5d8d+4I4z53K1XncvbqE/jzSke71a0gL23SVRf2B8knwac9Ao/9xy1/eLYDHxel6 AaSCOXzSzLimdio7+FpXkbC1dPa7vmojEFhkuiiHTJay98MytnRTsazMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehledgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffffkfgggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpedtffdvffeuleeuvdetkedvveehgfehvdegvefghfevudek geegleevgeejkeetkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Mar 2023 17:19:10 -0400 (EDT) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id B824C7EFC34; Thu, 30 Mar 2023 14:19:08 -0700 (MST) In-Reply-To: <314663e3-ff4e-814c-6ff7-6ab3376ef458@gmail.com> (Jim Porter's message of "Sat, 25 Mar 2023 12:07:37 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258950 Archived-At: Hello, On Sat 25 Mar 2023 at 12:07PM -07, Jim Porter wrote: > Even without Pcomplete support, there's still a benefit to a command > like this though: you could use Eshell to pipe the results of 'M-x > rgrep' to some other command. Looking at the code for 'eshell-grep', I > don't think it'd be terribly difficult to support this case. Can you give a concrete use case? If you're piping won't you typically want to reuse your knowledge of traditional grep(1)? If I'm piping then I'm probably thinking in non-Emacs terms. > Maybe there should be a defcustom for this ("use M-x rgrep" vs "use > /usr/bin/rgrep")? Or maybe it should be easier to configure various > Eshell commands so they open in a compilation buffer when appropriate? > You can do this now with an alias, but the syntax is a bit tricky: > > alias rgrep 'eshell-grep grep ${append (list "-rH") $*}' > > Something like this would be nicer: > > alias rgrep 'to-compilation-buffer rgrep -rH $*' > > That would make it easier for users to define their own commands that > work like this, which would (probably) be generally useful and provide > a partial solution for this bug while we consider the available > options. (My main goal with doing this now is so that we don't merge > something and then change our minds later, disrupting users' habits.) A command-specific defcustom doesn't seem ideal because we could end up with very many such things. Something like your compilation buffer idea sounds good. -- Sean Whitton