From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53802) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5duN-0002fp-Im for guix-patches@gnu.org; Sat, 22 Feb 2020 18:10:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5duM-0004sC-7o for guix-patches@gnu.org; Sat, 22 Feb 2020 18:10:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5duL-0004qu-S5 for guix-patches@gnu.org; Sat, 22 Feb 2020 18:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j5duL-0006AH-Mo for guix-patches@gnu.org; Sat, 22 Feb 2020 18:10:01 -0500 Subject: [bug#39384] [PATCH] gnu: Add emacs-rg. Resent-Message-ID: References: <878slmc640.fsf@nicolasgoaziou.fr> <87pnexrrwf.fsf@lafreniere.xyz> <20200202184757.GH9517@E5400> <87o8ugs5fu.fsf@lafreniere.xyz> <20200204095851.GA19864@E5400> <87mu9xspd0.fsf@lafreniere.xyz> <87lfpg4t3t.fsf@devup.no> <87lfpfrzok.fsf@lafreniere.xyz> <20200207105435.GG7827@E5400> <87h800soqr.fsf@lafreniere.xyz> <20200209132841.GA9296@E5400> From: "LaFreniere\, Joseph" In-reply-to: <20200209132841.GA9296@E5400> Date: Sat, 22 Feb 2020 17:08:51 -0600 Message-ID: <877e0e5if0.fsf@lafreniere.xyz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39384@debbugs.gnu.org Cc: Marius Bakke , Efraim Flashner , Nicolas Goaziou --=-=-= Content-Type: text/plain; format=flowed Efraim Flashner writes: >> Can you point me to the Guix documentation where the >> functionality you're >> describing is explained? I have read through the description >> of package >> inputs in section 6.2.1 of Guix's manual, but I still do not >> explain what >> advantage patching the search path offers. > > I'm not sure I can find a spot in the manual where it is > detailed. It > comes down to the difference between "search for this program in > PATH" > and "call this program located at this location". By calling the > rg > at it's exact path rg doesn't need to be installed directly. A patch that includes ripgrep as non-propagated inputs is attached. -- Joseph LaFreniere --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-emacs-rg.patch >From 2035b630c949364e97f08c4ddfd770a3bdfea095 Mon Sep 17 00:00:00 2001 From: Joseph LaFreniere Date: Sat, 1 Feb 2020 14:23:36 -0600 Subject: [PATCH] gnu: Add emacs-rg. * gnu/packages/emacs-xyz.scm (emacs-rg): New variable. --- gnu/packages/emacs-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 3a026bec9a..281ca76119 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -135,6 +135,7 @@ #:use-module (gnu packages package-management) #:use-module (gnu packages perl) #:use-module (gnu packages pdf) + #:use-module (gnu packages rust-apps) #:use-module (gnu packages scheme) #:use-module (gnu packages speech) #:use-module (gnu packages xiph) @@ -2779,6 +2780,43 @@ column by drawing a thin line down the length of the editing window.") "This Emacs package allows managing multiple grep buffers.") (license license:gpl3+))) +(define-public emacs-rg + (package + (name "emacs-rg") + (version "1.8.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dajva/rg.el.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0k7x5z7mh9flwih35cqy8chs54rack3nswdcpw5wcpgv6xim227y")))) + (build-system emacs-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'hardcode-rg-path + ;; Hardcode the path to ripgrep. + (lambda _ + (let ((file "rg.el")) + (chmod file #o644) + (emacs-substitute-sexps file + ("(defcustom rg-executable" (which "rg"))))))))) + (propagated-inputs + `(("emacs-s" ,emacs-s) + ("emacs-wgrep" ,emacs-wgrep))) + (inputs + `(("ripgrep" ,ripgrep))) + (home-page "https://rgel.readthedocs.io/en/latest/") + (synopsis "Search tool based on @code{ripgrep}") + (description + "@code{rg} is an Emacs search package based on the @code{ripgrep} command +line tool. It allows one to interactively search based on the editing context +then refine or modify the search results.") + (license license:gpl3+))) + (define-public emacs-inf-ruby (package (name "emacs-inf-ruby") -- 2.25.1 --=-=-=--