* [bug#53879] [PATCH] gnu: Add emacs-everywhere.
@ 2022-02-08 15:17 Jai Vetrivelan
2022-02-08 17:29 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: Jai Vetrivelan @ 2022-02-08 15:17 UTC (permalink / raw)
To: 53879
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-emacs-everywhere.patch --]
[-- Type: text/x-patch, Size: 1967 bytes --]
From f8f503e5aea4515340d9f7b86ad96ceb4bb71502 Mon Sep 17 00:00:00 2001
From: Jai Vetrivelan <jaivetrivelan@gmail.com>
Date: Tue, 8 Feb 2022 20:44:05 +0530
Subject: [PATCH] gnu: Add emacs-everywhere.
* gnu/packages/emacs-xyz.scm (emacs-everywhere): New variable.
---
gnu/packages/emacs-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 56af72b2ab..c891a71250 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -26279,6 +26279,32 @@ (define-public emacs-evil-tmux-navigator
Emacs windows and tmux panes.")
(license license:expat)))
+(define-public emacs-everywhere
+ ;; No upstream release. Extract version from main file.
+ (let ((revision "0") (version "0.0.1")
+ (commit "ace53396a66ed4b753f42c04a5a0db2bcd770423"))
+ (package
+ (name "emacs-everywhere")
+ (version (git-version version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tecosaur/emacs-everywhere")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0p55shxvqm1713af33mfglny7rpi31d42wvgwylcsfy4jvnsq8bb"))))
+ (propagated-inputs
+ (list xclip xdotool xprop xwininfo))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/tecosaur/emacs-everywhere")
+ (synopsis "System-wide popup Emacs windows for quick edits")
+ (description "@code{emacs-everywhere} launches a new Emacs frame, and the
+contents of the buffer are pasted into the previously focused application on
+deletion of the frame.")
+ (license license:gpl3+))))
+
(define-public emacs-xclip
(package
(name "emacs-xclip")
base-commit: 35d56676db0988aad6d1a5b52dc4efef578885f2
--
2.34.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#53879] [PATCH] gnu: Add emacs-everywhere.
2022-02-08 15:17 [bug#53879] [PATCH] gnu: Add emacs-everywhere Jai Vetrivelan
@ 2022-02-08 17:29 ` Nicolas Goaziou
2022-02-08 23:40 ` Jai Vetrivelan
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2022-02-08 17:29 UTC (permalink / raw)
To: Jai Vetrivelan; +Cc: 53879
Hello,
Jai Vetrivelan <jaivetrivelan@gmail.com> writes:
> Subject: [PATCH] gnu: Add emacs-everywhere.
Thanks. Some comments follow.
> +(define-public emacs-everywhere
> + ;; No upstream release. Extract version from main file.
> + (let ((revision "0") (version "0.0.1")
Nitpick: binding should go to separate lines. However, in this case,
I suggest to move version string right in the "version" field. It will
make life of the updater scripts easier.
> + (propagated-inputs
> + (list xclip xdotool xprop xwininfo))
Could you turn those into regular inputs, and patch calls in the
library? Ideally, upstream should turn the location of these executables
into a defcustom. You may want to suggest it to them.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#53879] [PATCH] gnu: Add emacs-everywhere.
2022-02-08 17:29 ` Nicolas Goaziou
@ 2022-02-08 23:40 ` Jai Vetrivelan
2022-02-08 23:44 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: Jai Vetrivelan @ 2022-02-08 23:40 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 53879
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
On 2022-02-08, 18:29 +0100, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> + (propagated-inputs
>> + (list xclip xdotool xprop xwininfo))
>
> Could you turn those into regular inputs, and patch calls in the
> library? Ideally, upstream should turn the location of these
> executables into a defcustom. You may want to suggest it to them.
Could you please point out any package that does this, so that I could
better understand what you're talking about.
Thanks!
--
Jai Vetrivelan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#53879] [PATCH] gnu: Add emacs-everywhere.
2022-02-08 23:40 ` Jai Vetrivelan
@ 2022-02-08 23:44 ` Nicolas Goaziou
2022-02-09 0:51 ` Jai Vetrivelan
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2022-02-08 23:44 UTC (permalink / raw)
To: Jai Vetrivelan; +Cc: 53879
Hello,
Jai Vetrivelan <jaivetrivelan@gmail.com> writes:
>> Could you turn those into regular inputs, and patch calls in the
>> library? Ideally, upstream should turn the location of these
>> executables into a defcustom. You may want to suggest it to them.
>
> Could you please point out any package that does this, so that I could
> better understand what you're talking about.
Certainly. See, for example, `patch-exec-paths' phase in emacs-theme-magic.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#53879] [PATCH] gnu: Add emacs-everywhere.
2022-02-08 23:44 ` Nicolas Goaziou
@ 2022-02-09 0:51 ` Jai Vetrivelan
2022-02-09 14:11 ` bug#53879: " Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: Jai Vetrivelan @ 2022-02-09 0:51 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 53879
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-emacs-everywhere.patch --]
[-- Type: text/x-patch, Size: 3111 bytes --]
From baf437b34b900ba1733657e560187807c7a67007 Mon Sep 17 00:00:00 2001
From: Jai Vetrivelan <jaivetrivelan@gmail.com>
Date: Tue, 8 Feb 2022 20:44:05 +0530
Subject: [PATCH] gnu: Add emacs-everywhere.
* gnu/packages/emacs-xyz.scm (emacs-everywhere): New variable.
---
gnu/packages/emacs-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 56af72b2ab..e68877ee30 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -26279,6 +26279,49 @@ (define-public emacs-evil-tmux-navigator
Emacs windows and tmux panes.")
(license license:expat)))
+(define-public emacs-everywhere
+ ;; No upstream release. Extract version from main file.
+ (let ((commit "ace53396a66ed4b753f42c04a5a0db2bcd770423")
+ (revision "0"))
+ (package
+ (name "emacs-everywhere")
+ (version (git-version "0.0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tecosaur/emacs-everywhere")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0p55shxvqm1713af33mfglny7rpi31d42wvgwylcsfy4jvnsq8bb"))))
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-exec-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((xclip (assoc-ref inputs "xclip"))
+ (xdotool (assoc-ref inputs "xdotool"))
+ (xprop (assoc-ref inputs "xprop"))
+ (xwininfo (assoc-ref inputs "xwininfo")))
+ (substitute* "emacs-everywhere.el"
+ (("\"xclip\"") (string-append "\"" xclip
+ "/bin/xclip\""))
+ (("\"xdotool\"") (string-append "\"" xdotool
+ "/bin/xdotool\""))
+ (("\"xprop\"") (string-append "\"" xprop
+ "/bin/xprop\""))
+ (("\"xwininfo\"") (string-append "\"" xwininfo
+ "/bin/xwininfo\""))))
+ #t)))))
+ (inputs (list xclip xdotool xprop xwininfo))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/tecosaur/emacs-everywhere")
+ (synopsis "System-wide popup Emacs windows for quick edits")
+ (description "@code{emacs-everywhere} launches a new Emacs frame, and the
+contents of the buffer are pasted into the previously focused application on
+deletion of the frame.")
+ (license license:gpl3+))))
+
(define-public emacs-xclip
(package
(name "emacs-xclip")
base-commit: 35d56676db0988aad6d1a5b52dc4efef578885f2
--
2.34.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#53879: [PATCH] gnu: Add emacs-everywhere.
2022-02-09 0:51 ` Jai Vetrivelan
@ 2022-02-09 14:11 ` Nicolas Goaziou
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2022-02-09 14:11 UTC (permalink / raw)
To: Jai Vetrivelan; +Cc: 53879-done
Hello,
Jai Vetrivelan <jaivetrivelan@gmail.com> writes:
Thanks for the update. I'm sorry: I pointed you, as an example, to
a package using old syntax.
> +(define-public emacs-everywhere
> + ;; No upstream release. Extract version from main file.
> + (let ((commit "ace53396a66ed4b753f42c04a5a0db2bcd770423")
> + (revision "0"))
> + (package
> + (name "emacs-everywhere")
> + (version (git-version "0.0.1" revision commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/tecosaur/emacs-everywhere")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0p55shxvqm1713af33mfglny7rpi31d42wvgwylcsfy4jvnsq8bb"))))
> + (arguments
> + `(#:phases (modify-phases %standard-phases
We're now using G-expressions, which are less ambiguous than quasi-quotes:
(arguments
(list
#:phases
#~(modify-phases %standard-phases
> + (add-after 'unpack 'patch-exec-paths
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let ((xclip (assoc-ref inputs "xclip"))
> + (xdotool (assoc-ref inputs "xdotool"))
> + (xprop (assoc-ref inputs "xprop"))
> + (xwininfo (assoc-ref inputs "xwininfo")))
We don't use (assoc-ref inputs ...) expressions anymore. It is possible
to replace those calls with `search-input-file'.
> + (substitute* "emacs-everywhere.el"
> + (("\"xclip\"") (string-append "\"" xclip
> + "/bin/xclip\""))
For example, here, it is possible to write
(string-append "\"" (search-input-file inputs "/bin/xclip") "\"")
> + #t)))))
Phases do not need to end with "#t" anymore, so this can be dropped.
I made the changes above on your behalf and applied your patch.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-02-09 15:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-08 15:17 [bug#53879] [PATCH] gnu: Add emacs-everywhere Jai Vetrivelan
2022-02-08 17:29 ` Nicolas Goaziou
2022-02-08 23:40 ` Jai Vetrivelan
2022-02-08 23:44 ` Nicolas Goaziou
2022-02-09 0:51 ` Jai Vetrivelan
2022-02-09 14:11 ` bug#53879: " Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).