From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: [RFC] Urgrep: New ELPA submission (eventually) Date: Sun, 11 Sep 2022 21:56:04 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33864"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 12 06:56:54 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oXbV7-0008g1-Mg for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Sep 2022 06:56:53 +0200 Original-Received: from localhost ([::1]:48484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXbV6-0007Do-Ms for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Sep 2022 00:56:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXbUP-0006Yp-3m for emacs-devel@gnu.org; Mon, 12 Sep 2022 00:56:09 -0400 Original-Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:56266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXbUN-0003QH-Ax for emacs-devel@gnu.org; Mon, 12 Sep 2022 00:56:08 -0400 Original-Received: by mail-pj1-x102f.google.com with SMTP id fs14so6854177pjb.5 for ; Sun, 11 Sep 2022 21:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:mime-version:date :message-id:to:subject:from:from:to:cc:subject:date; bh=Js0aLPGetX0NWsOG2AZk4m+nTGI5jjXgvNMB0/syVTY=; b=lLbw8ubO8epjfG2UkaaUQoyznyY0mSBfqqTNlPlw4M/YSip4vIzUGwxA2oRbZ4zWJh BgHuo4GoLYkVJDgp4+kARcpjrcVFJlV0AmqO/mkZdGEPgdue0RCyJg+TpmqsKjoNs9MZ CFYJ++Rlmn+tabZBFbOS5vHfVVQ2OkfTzA+9oTsxwV9I8yrvt7G9EcJfovMLvIYeUtvc DOoUKJZ8rOGf2ahaB2VSK5Z6QAG/aJT0MHjKk49+oGBRgJc7qlgOVIkydmHRf+3UhPOy AdsNJJOUjnC0Ksv78tkRQg634H6lYyjHa+agWBy1eCBcbRfGS4jN80q7y+zJ/Rs1Z6IV I+GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:mime-version:date :message-id:to:subject:from:x-gm-message-state:from:to:cc:subject :date; bh=Js0aLPGetX0NWsOG2AZk4m+nTGI5jjXgvNMB0/syVTY=; b=S3Qo8x8IrsxC1Mdmo6do1CoyqxANaeqLbngBXqeUhey/VmePXW6B8Lb8iK1+Up1++5 UXsjCD0gJam29oa5XTxkVJrcbuFSOdfOGfVgyvp1zqzdaPzsvVSyvWaI4u6gEcE/2lEX J2cNgnhU4tLtQVIsHD7rNRyXMgIyPmCub+bVAFYNFoKsq/+ZKAXujwPI0tvhhXv1YkcK UNsMWlG8KJULHvpNUxHx4UzaUHVwYBsJ72DerS2QCGdWQTLLpTzvmefVAwCLWzbwZGnm RVXm4H7rGjqs8y7D4bE3CSCzcL2VUWVUzz66rRrV5pVLEhCtciug8FBgNPAFUlYwwtQx P3cQ== X-Gm-Message-State: ACgBeo3mOmb3MmDAMKyDErQqBXDjSEDOzcUoyzzSbk8MQAM7E1lkJynW NnjMb4gI/yc0rYRIR23g8kT8X6eVlTk= X-Google-Smtp-Source: AA6agR5f3iu1qbRGnCwhJazPykAy11UZZJmpfDKBa4hreyOrG9rFaRjiq3Wgw0Ct34csExGqV2UdpA== X-Received: by 2002:a17:90a:fa8e:b0:200:b4b9:c6f3 with SMTP id cu14-20020a17090afa8e00b00200b4b9c6f3mr22168810pjb.190.1662958565405; Sun, 11 Sep 2022 21:56:05 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id d7-20020a170902654700b0017691eb7e17sm4732094pln.239.2022.09.11.21.56.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Sep 2022 21:56:04 -0700 (PDT) X-Mozilla-News-Host: news://news://news.gmane.org:119 Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=jporterbugs@gmail.com; helo=mail-pj1-x102f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295190 Archived-At: (Resending; sorry if you get duplicates.) A while back, I made a package called Urgrep ("Universal Recursive Grep" - ), and now that it's pretty stable, I'm starting preparations to submit it to GNU ELPA. I'm not *quite* ready to submit it for real, but I'm reasonably close and wanted to get some wider feedback before I actually do submit it. If you have any suggestions, questions, etc, I'm happy to hear them. A brief summary: Urgrep is designed to provide a universal interface on top of all "recursive grep"-like commands, from ripgrep to git grep to the classic find+grep. I made it to solve a frustration I had with other similar packages: they're primarily built to support a *particular* searching tool, and while some can be coaxed into running with other tools, it doesn't always work. Even when it does, it's usually not seamless, especially when you add Tramp to the equation. With Urgrep, you can use *any* rgrep-like command[1]. It will automatically use the best tool on the system in question, so if some remote host doesn't have your favorite tool, it'll still work just fine. I also added some Isearch-like bindings in the main function's prompt (creatively named 'urgrep'). These all start with M-s and let you set common search flags, like number of context lines. Maybe there's a better way to do this; the current method seemed reasonable to me, but I'm certainly open to suggestions. (I looked at transient.el, but it didn't seem like the best fit in this case; maybe I just don't know enough about transient.el though.) Again, I'm not quite ready to submit this to GNU ELPA, but I think it's stabilized enough that it's worth getting some more eyes on it in case I missed something. - Jim [1] If it doesn't support your favorite one out of the box, you can add your own support: you just need to add to 'urgrep-tools' with the right mappings for the various flags.