From: "LaFreniere\, Joseph" <joseph@lafreniere.xyz>
To: 39384@debbugs.gnu.org
Cc: Marius Bakke <mbakke@fastmail.com>,
Efraim Flashner <efraim@flashner.co.il>,
Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: [bug#39384] [PATCH] gnu: Add emacs-rg.
Date: Sat, 22 Feb 2020 17:08:51 -0600 [thread overview]
Message-ID: <877e0e5if0.fsf@lafreniere.xyz> (raw)
In-Reply-To: <20200209132841.GA9296@E5400>
[-- Attachment #1: Type: text/plain, Size: 718 bytes --]
Efraim Flashner <efraim@flashner.co.il> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-rg.patch --]
[-- Type: text/x-patch, Size: 2411 bytes --]
From 2035b630c949364e97f08c4ddfd770a3bdfea095 Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
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
next prev parent reply other threads:[~2020-02-22 23:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-01 20:28 [bug#39384] [PATCH] gnu: Add emacs-rg LaFreniere, Joseph
2020-02-01 22:09 ` Nicolas Goaziou
2020-02-02 14:21 ` LaFreniere, Joseph
2020-02-02 18:47 ` Efraim Flashner
2020-02-03 3:41 ` LaFreniere, Joseph
2020-02-04 9:58 ` Efraim Flashner
2020-02-05 3:08 ` LaFreniere, Joseph
2020-02-05 7:13 ` Efraim Flashner
2020-02-05 21:33 ` Marius Bakke
2020-02-07 0:47 ` LaFreniere, Joseph
2020-02-07 10:54 ` Efraim Flashner
2020-02-08 22:23 ` LaFreniere, Joseph
2020-02-09 13:28 ` Efraim Flashner
2020-02-22 23:08 ` LaFreniere, Joseph [this message]
2020-02-23 11:17 ` bug#39384: " Efraim Flashner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877e0e5if0.fsf@lafreniere.xyz \
--to=joseph@lafreniere.xyz \
--cc=39384@debbugs.gnu.org \
--cc=efraim@flashner.co.il \
--cc=mail@nicolasgoaziou.fr \
--cc=mbakke@fastmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.