[PATCH 3/4] gnu: Add emacs-pippel.

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Rostislav Svoboda
Owner
unassigned
Submitted by
Rostislav Svoboda
Severity
normal
R
R
Rostislav Svoboda wrote on 11 Mar 2023 15:49
(address . guix-patches@gnu.org)(name . Rostislav Svoboda)(address . Rostislav.Svoboda@gmail.com)
20230311144938.765-3-Rostislav.Svoboda@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-pippel): New variable.
---
gnu/packages/emacs-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (51 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index d371cfd6f3..cbd0e64e65 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17358,6 +17358,44 @@ (define-public emacs-pinyinlib
letter of Pinyin to Simplified/Traditional Chinese characters.")
(license license:gpl3+)))
+(define-public emacs-pippel
+ (let ((commit "cb194952ee150e77601d3233dabdb521b976ee79")
+ (revision "0"))
+ (package
+ (name "emacs-pippel")
+ (version (git-version "1.4" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/arifer612/pippel")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17606l24yyrjxa4rc0p2zj50lfbayqldw4phhi59yqf61289d520"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ (list emacs-dash emacs-s))
+ (inputs
+ (list python))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'substitute-curl-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (emacs-substitute-variables "plz.el"
+ ("pippel-python-command" (search-input-file
+ inputs "/bin/python"))))))))
+ (home-page "https://github.com/arifer612/pippel")
+ (synopsis "Emacs frontend to Python package manager pip")
+ (description
+ "Emacs frontend for the Python package manager pip. As pippel also uses
+@code{tabulated-list-mode}, it provides a similar package menu like
+@code{package-list-packages}.")
+ (license license:gpl3+))))
+
(define-public emacs-reverse-im
(package
(name "emacs-reverse-im")
--
2.39.2
R
R
Rostislav Svoboda wrote on 13 Mar 2023 14:01
(address . guix-patches@gnu.org)
CAEtmmezZWwj5k1su3mwazHMJ9FYi=8CR99r9HdTgXpLzqkbLkw@mail.gmail.com
Oh, the patch is broken, ignore it. sorry. Here's a correction. Please
have a look at the 'python2 vs. python3' comment. Is it OK to make it
work just for python3?

Cheers
Bost

From 29c79c13c4cdfe5c6014cd9ba35cea41a465a106 Mon Sep 17 00:00:00 2001
From: Rostislav Svoboda <Rostislav.Svoboda@gmail.com>
Date: Sat, 11 Mar 2023 15:36:11 +0100
Subject: [PATCH 3/4] gnu: Add emacs-pippel.

* gnu/packages/emacs-xyz.scm (emacs-pippel): New variable.
---
gnu/packages/emacs-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index d371cfd6f3..f4e557e98a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17358,6 +17358,43 @@ (define-public emacs-pinyinlib
letter of Pinyin to Simplified/Traditional Chinese characters.")
(license license:gpl3+)))

+(define-public emacs-pippel
+ (let ((commit "cb194952ee150e77601d3233dabdb521b976ee79")
+ (revision "0"))
+ (package
+ (name "emacs-pippel")
+ (version (git-version "1.4" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/arifer612/pippel")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17606l24yyrjxa4rc0p2zj50lfbayqldw4phhi59yqf61289d520"))))
+ (build-system emacs-build-system)
+ (inputs (list python))
+ (propagated-inputs (list emacs-dash emacs-s))
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'substitute-python-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (emacs-substitute-variables "pippel.el"
+
("pippel-python-command"
+ (search-input-file
+ inputs
+;;; For 'python2 vs. python3' see the choice:
+;;; https://github.com/arifer612/pippel/blob/cb194952ee150e77601d3233dabdb521b976ee79/pippel.el#L65
+
"/bin/python3"))))))))
+ (home-page "https://github.com/arifer612/pippel")
+ (synopsis "Emacs frontend to Python package manager pip")
+ (description
+ "Emacs frontend for the Python package manager pip. As pippel also uses
+@code{tabulated-list-mode}, it provides a similar package menu like
+@code{package-list-packages}.")
+ (license license:gpl3+))))
+
(define-public emacs-reverse-im
(package
(name "emacs-reverse-im")
--
2.39.2
N
N
Nicolas Goaziou wrote on 17 Mar 2023 09:51
Re: [bug#62123] [PATCH 3/4] gnu: Add emacs-pippel.
(name . Rostislav Svoboda)(address . rostislav.svoboda@gmail.com)(address . 62123@debbugs.gnu.org)
871qlndal1.fsf@nicolasgoaziou.fr
Hello,

Rostislav Svoboda <rostislav.svoboda@gmail.com> writes:

Toggle quote (2 lines)
> Oh, the patch is broken, ignore it. sorry. Here's a correction.

Thanks. Some comments follow.

Toggle quote (3 lines)
> Please have a look at the 'python2 vs. python3' comment. Is it OK to
> make it work just for python3?

Guix does not support Python 2 anymore. Note, however,
that you can provide `python-wrapper' as input instead of `python', and
use "python" executable. Anyway sticking to "python3" is OK.

Toggle quote (3 lines)
> + (inputs (list python))
> + (propagated-inputs (list emacs-dash emacs-s))

Nitpick: usually, inputs and propagated inputs are located after arguments.

Toggle quote (3 lines)
> + (arguments
> + (list #:phases #~(modify-phases %standard-phases

You can add a newline characther after `list' and another one after
`#:phases'.

Toggle quote (14 lines)
> + (add-after 'unpack 'substitute-python-path
> + (lambda* (#:key inputs #:allow-other-keys)
> + (emacs-substitute-variables "pippel.el"
> +
> ("pippel-python-command"
> + (search-input-file
> + inputs
> +;;; For 'python2 vs. python3' see the choice:
> +;;; https://github.com/arifer612/pippel/blob/cb194952ee150e77601d3233dabdb521b976ee79/pippel.el#L65
> +
> "/bin/python3"))))))))
> + (home-page "https://github.com/arifer612/pippel")
> + (synopsis "Emacs frontend to Python package manager pip")

pip -> Pip

Toggle quote (5 lines)
> + (description
> + "Emacs frontend for the Python package manager pip. As pippel also uses
> +@code{tabulated-list-mode}, it provides a similar package menu like
> +@code{package-list-packages}.")

The first sentence is not complete : "Pippel is an Emacs…"

Also, pip -> Pip, pippel -> Pippel, @code{tabulated-list-mode} ->
Tabulated List mode.

Toggle quote (2 lines)
> + (license license:gpl3+))))

I think you also need to include "pippel.py" file through #:include
keyword and possibly configure `pippel-package-path'.

Regards,
--
Nicolas Goaziou
R
R
Rostislav Svoboda wrote on 29 Mar 2023 00:34
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 62123@debbugs.gnu.org)
CAEtmmeyJMhhQui-JB+UV1SQ1CEQ_7dVsV8hk8Pb0YA=80jhFcg@mail.gmail.com
Hi Nicolas

Toggle quote (2 lines)
> Nitpick: usually, inputs and propagated inputs are located after arguments.

Done

Toggle quote (6 lines)
> > + (arguments
> > + (list #:phases #~(modify-phases %standard-phases
>
> You can add a newline characther after `list' and another one after
> `#:phases'.

Done

Toggle quote (2 lines)
> Also, pip -> Pip, pippel -> Pippel

Done

Toggle quote (2 lines)
> I think you also need to include "pippel.py" file through #:include

Done

Toggle quote (2 lines)
> keyword and possibly configure `pippel-package-path'.

Done. Please have a look if it's done correctly.

Cheers
Bost




From 4b83e10686d8189568b756fe514d0be0d2c54750 Mon Sep 17 00:00:00 2001
From: Rostislav Svoboda <Rostislav.Svoboda@gmail.com>
Date: Wed, 29 Mar 2023 00:15:12 +0200
Subject: [PATCH] gnu: Add emacs-pippel.

* gnu/packages/emacs-xyz.scm (emacs-pippel): New variable.
---
gnu/packages/emacs-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index da2856abc8..1cdaccd366 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17288,6 +17288,54 @@ (define-public emacs-php-mode
documentation search and a source and class browser.")
(license license:gpl3+)))

+(define-public emacs-pippel
+ (let ((commit "cb194952ee150e77601d3233dabdb521b976ee79")
+ (revision "0"))
+ (package
+ (name "emacs-pippel")
+ (version (git-version "0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/arifer612/pippel")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "17606l24yyrjxa4rc0p2zj50lfbayqldw4phhi59yqf61289d520"))))
+ (build-system emacs-build-system)
+ (arguments
+ (list
+ #:include #~(cons "^pippel\\.py$" %default-include)
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'substitute-pippel-package-path
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (package-path (string-append
+ out
+ "/share/emacs/site-lisp/pippel-"
+ #$version)))
+ (emacs-substitute-variables "pippel.el"
+ ("pippel-package-path"
+ package-path)))))
+ (add-after 'unpack 'substitute-python-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (emacs-substitute-variables "pippel.el"
+ ("pippel-python-command"
+ (search-input-file
+ inputs
+ "/bin/python"))))))))
+ (inputs (list python-wrapper))
+ (propagated-inputs (list emacs-dash emacs-s))
+ (home-page "https://github.com/arifer612/pippel")
+ (synopsis "Emacs frontend to Python package manager Pip")
+ (description
+ "Pippel is an Emacs frontend for the Python package manager Pip. As
+Pippel also uses Tabulated List mode, it provides a similar package menu like
+@code{package-list-packages}.")
+ (license license:gpl3+))))
+
(define-public emacs-pos-tip
(package
(name "emacs-pos-tip")
--
2.39.2
N
N
Nicolas Goaziou wrote on 30 Mar 2023 12:38
(name . Rostislav Svoboda)(address . rostislav.svoboda@gmail.com)(address . 62123-done@debbugs.gnu.org)
87edp6mslr.fsf@nicolasgoaziou.fr
Hello,

Rostislav Svoboda <rostislav.svoboda@gmail.com> writes:

Toggle quote (2 lines)
> Done. Please have a look if it's done correctly.

Applied with the change below. Thank you.
Toggle quote (8 lines)
> + (add-after 'unpack 'substitute-pippel-package-path
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (package-path (string-append
> + out
> + "/share/emacs/site-lisp/pippel-"
> + #$version)))

I used `elpa-directory' here, and removed `out' binding.

Regards,
--
Nicolas Goaziou
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 62123@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62123
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch