From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Alex Kost <alezost@gmail.com>
Cc: 28327@debbugs.gnu.org
Subject: [bug#28327] [PATCH] gnu: Add emacs-bash-completion.
Date: Wed, 06 Sep 2017 19:52:51 +0200 [thread overview]
Message-ID: <877exb90jw.fsf@gnu.org> (raw)
In-Reply-To: <87r2vmwb91.fsf@gmail.com> (Alex Kost's message of "Mon, 04 Sep 2017 21:48:42 +0300")
[-- Attachment #1: Type: text/plain, Size: 2471 bytes --]
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 ‘version’ and ‘".tar"’ on 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=melpa 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
[-- Attachment #2: 0001-gnu-Add-emacs-bash-completion.patch --]
[-- Type: text/x-patch, Size: 2456 bytes --]
From 14649caae21669adcc495b109b8d328f5b71c2e9 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
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 with
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+)))
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next prev parent reply other threads:[~2017-09-06 17:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-02 9:11 [bug#28327] [PATCH] gnu: Add emacs-bash-completion Jan Nieuwenhuizen
2017-09-02 9:15 ` Jan Nieuwenhuizen
2017-09-04 18:48 ` Alex Kost
2017-09-06 17:52 ` Jan Nieuwenhuizen [this message]
2017-09-09 19:44 ` Alex Kost
2017-09-10 20:45 ` bug#28327: " Jan Nieuwenhuizen
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=877exb90jw.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=28327@debbugs.gnu.org \
--cc=alezost@gmail.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.