From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpeWd-0001Fv-So for guix-patches@gnu.org; Wed, 06 Sep 2017 13:54:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpeWY-0001YP-Tr for guix-patches@gnu.org; Wed, 06 Sep 2017 13:54:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:44628) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpeWY-0001YG-OH for guix-patches@gnu.org; Wed, 06 Sep 2017 13:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dpeWY-0007uu-EW for guix-patches@gnu.org; Wed, 06 Sep 2017 13:54:02 -0400 Subject: [bug#28327] [PATCH] gnu: Add emacs-bash-completion. Resent-Message-ID: From: Jan Nieuwenhuizen References: <20170902091112.1336-1-janneke@gnu.org> <87r2vmwb91.fsf@gmail.com> Date: Wed, 06 Sep 2017 19:52:51 +0200 In-Reply-To: <87r2vmwb91.fsf@gmail.com> (Alex Kost's message of "Mon, 04 Sep 2017 21:48:42 +0300") Message-ID: <877exb90jw.fsf@gnu.org> 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: Alex Kost Cc: 28327@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Alex Kost writes: > Jan Nieuwenhuizen (2017-09-02 11:11 +0200) wrote: > >> --- >> gnu/packages/emacs.scm | 25 +++++++++++++++++++++++++ >> 1 file changed, 25 insertions(+) > Please use the source directly from the upstream, i.e.: > > https://github.com/szermatt/emacs-bash-completion/archive/v2.0.0.tar.gz Ok! > There is a problem with MELPA: when there will be a new commit in the > repo, the new melpa tarball will be generated and the previous one > ("20170901.1445") will be *removed*, so this package will lose its > source. Ugh...how reproducible! I didn't know (or investigate...), thanks for the explanation. >> + version >> + ".tar")) > > I wouldn't leave =E2=80=98version=E2=80=99 and =E2=80=98".tar"=E2=80=99 o= n separate lines, but it's a > matter of taste :-) I like your suggestion. >> + (sha256 >> + (base32 >> + "12ggygcfhny5sqq18zn6qyyqbh9314niywjagv9nclwxfa0i9pvr")))) >> + (native-inputs `(("bash" ,bash))) > > You probably meant to make this package call this "bash" (btw it should > be 'input', not 'native-input') from store, but this is not enough. Indeed. It took me quite a while of debugging until I finally stumbled upon bash-minimal. Google had a very hard time telling me how complete or compgen could not exist. > You also need to patch 'bash-completion-prog' variable using > 'emacs-substitute-variables' procedure (see (gnu packages emacs) > module for the examples). I have added something here and built package works and looks okay... Because adding bash to (native-)inputs already made that 'emacs-substitute-variables' is set to bash instead of bash-minimal, I don't really know how to test it. >> + (build-system emacs-build-system) >> + (home-page "https://github.com/szermatt/emacs-bash-completion") >> + (synopsis "BASH completion for the shell buffer") >> + (description >> + "@code{bash-completion} defines dynamic completion hooks for shell= -mode >> +and shell-command prompts that are based on bash completion. >> +") > > Please put this quote and parenthesis to the previous line. Ok. >> + (license license:gpl3+))) > > I see GPL 2 or later in "bash-completion.el". I used guix import elpa --archive=3Dmelpa and didn't check. It seems we cannot rely on that! New version attached, still 13 of the 30 lines were unchanged, wow...thanks for all your helpful remarks! Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-emacs-bash-completion.patch Content-Transfer-Encoding: quoted-printable >From 14649caae21669adcc495b109b8d328f5b71c2e9 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 2 Sep 2017 10:54:14 +0200 Subject: [PATCH] gnu: Add emacs-bash-completion. * gnu/packages/emacs.scm (emacs-bash-completion): New variable. --- gnu/packages/emacs.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 9c0f9bc89..a4157a3db 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -59,6 +59,7 @@ #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages audio) + #:use-module (gnu packages bash) #:use-module (gnu packages code) #:use-module (gnu packages guile) #:use-module (gnu packages gtk) @@ -5575,3 +5576,35 @@ It is meant to quickly generate linear ranges, e.g. = 5, 6, 7, 8. Some elisp proficiency is an advantage, since you can transform your numeric range wi= th an elisp expression.") (license license:gpl3+))) + +(define-public emacs-bash-completion + (package + (name "emacs-bash-completion") + (version "2.0.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/szermatt/emacs-bash-completion/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0mkci4a1fy8z4cmry8mx5vsx4f16a8r454slnh7lqzidnhfi63hj")))) + (inputs `(("bash" ,bash))) + (build-system emacs-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'install 'configure + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash (assoc-ref inputs "bash"))) + (emacs-substitute-variables "bash-completion.el" + ("bash-completion-prog" (string-append bash "/bin/bash"))= )) + #t))))) + (home-page "https://github.com/szermatt/emacs-bash-completion") + (synopsis "BASH completion for the shell buffer") + (description + "@code{bash-completion} defines dynamic completion hooks for shell-mode +and shell-command prompts that are based on bash completion.") + (license license:gpl2+))) --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--