unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
@ 2022-11-13 21:11 Thiago Jung Bauermann via Guix-patches via
  2022-11-13 21:24 ` Liliana Marie Prikler
  0 siblings, 1 reply; 10+ messages in thread
From: Thiago Jung Bauermann via Guix-patches via @ 2022-11-13 21:11 UTC (permalink / raw)
  To: 59253; +Cc: Thiago Jung Bauermann, liliana.prikler

Magit has a strong dependency on Git so it should directly reference the
git executable rather than expect it to be available in the profile or
environment.

This also fixes a build failure in emacs-forge.

* gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]<#:phases>: Substitute
git path in the ‘magit-git-executable’ variable.
---
 gnu/packages/emacs-xyz.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8ff6275bad96..1406f8a715f2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -117,6 +117,7 @@
 ;;; Copyright © 2022 Jose G Perez Taveras <josegpt27@gmail.com>
 ;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
 ;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2022 Thiago Jung Bauermann <bauermann@kolabnow.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1031,7 +1032,11 @@ (define-public emacs-magit
                   ("magit-version" #$version))))
             (add-after 'set-magit-version 'patch-exec-paths
               (lambda* (#:key inputs #:allow-other-keys)
-                (make-file-writable "lisp/magit-sequence.el")
+                (for-each make-file-writable
+                          (list "lisp/magit-git.el" "lisp/magit-sequence.el"))
+                (emacs-substitute-variables "lisp/magit-git.el"
+                  ("magit-git-executable"
+                   (search-input-file inputs "/bin/git")))
                 (emacs-substitute-variables "lisp/magit-sequence.el"
                   ("magit-perl-executable"
                    (search-input-file inputs "/bin/perl")))))




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-13 21:11 [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path Thiago Jung Bauermann via Guix-patches via
@ 2022-11-13 21:24 ` Liliana Marie Prikler
  2022-11-13 21:55   ` bug#59253: " Liliana Marie Prikler
  0 siblings, 1 reply; 10+ messages in thread
From: Liliana Marie Prikler @ 2022-11-13 21:24 UTC (permalink / raw)
  To: Thiago Jung Bauermann, 59253

Am Sonntag, dem 13.11.2022 um 18:11 -0300 schrieb Thiago Jung
Bauermann:
> Magit has a strong dependency on Git so it should directly reference
> the
> git executable rather than expect it to be available in the profile
> or
> environment.
> 
> This also fixes a build failure in emacs-forge.
> 
> * gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]<#:phases>:
> Substitute
> git path in the ‘magit-git-executable’ variable.
> ---
>  gnu/packages/emacs-xyz.scm | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 8ff6275bad96..1406f8a715f2 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -117,6 +117,7 @@
>  ;;; Copyright © 2022 Jose G Perez Taveras <josegpt27@gmail.com>
>  ;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
>  ;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
> +;;; Copyright © 2022 Thiago Jung Bauermann <bauermann@kolabnow.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1031,7 +1032,11 @@ (define-public emacs-magit
>                    ("magit-version" #$version))))
>              (add-after 'set-magit-version 'patch-exec-paths
>                (lambda* (#:key inputs #:allow-other-keys)
> -                (make-file-writable "lisp/magit-sequence.el")
> +                (for-each make-file-writable
> +                          (list "lisp/magit-git.el" "lisp/magit-
> sequence.el"))
> +                (emacs-substitute-variables "lisp/magit-git.el"
> +                  ("magit-git-executable"
> +                   (search-input-file inputs "/bin/git")))
>                  (emacs-substitute-variables "lisp/magit-sequence.el"
>                    ("magit-perl-executable"
>                     (search-input-file inputs "/bin/perl")))))
LGTM, will push once I'm done with some other stuff.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#59253: [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-13 21:24 ` Liliana Marie Prikler
@ 2022-11-13 21:55   ` Liliana Marie Prikler
  2022-11-13 22:21     ` [bug#59253] " Thiago Jung Bauermann via Guix-patches via
  0 siblings, 1 reply; 10+ messages in thread
From: Liliana Marie Prikler @ 2022-11-13 21:55 UTC (permalink / raw)
  To: Thiago Jung Bauermann, 59253-done

Am Sonntag, dem 13.11.2022 um 22:24 +0100 schrieb Liliana Marie
Prikler:
> Am Sonntag, dem 13.11.2022 um 18:11 -0300 schrieb Thiago Jung
> Bauermann:
> > Magit has a strong dependency on Git so it should directly
> > reference
> > the
> > git executable rather than expect it to be available in the profile
> > or
> > environment.
> > 
> > This also fixes a build failure in emacs-forge.
> > 
> > * gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]<#:phases>:
> > Substitute
> > git path in the ‘magit-git-executable’ variable.
> > ---
> >  gnu/packages/emacs-xyz.scm | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-
> > xyz.scm
> > index 8ff6275bad96..1406f8a715f2 100644
> > --- a/gnu/packages/emacs-xyz.scm
> > +++ b/gnu/packages/emacs-xyz.scm
> > @@ -117,6 +117,7 @@
> >  ;;; Copyright © 2022 Jose G Perez Taveras <josegpt27@gmail.com>
> >  ;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
> >  ;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
> > +;;; Copyright © 2022 Thiago Jung Bauermann
> > <bauermann@kolabnow.com>
> >  ;;;
> >  ;;; This file is part of GNU Guix.
> >  ;;;
> > @@ -1031,7 +1032,11 @@ (define-public emacs-magit
> >                    ("magit-version" #$version))))
> >              (add-after 'set-magit-version 'patch-exec-paths
> >                (lambda* (#:key inputs #:allow-other-keys)
> > -                (make-file-writable "lisp/magit-sequence.el")
> > +                (for-each make-file-writable
> > +                          (list "lisp/magit-git.el" "lisp/magit-
> > sequence.el"))
> > +                (emacs-substitute-variables "lisp/magit-git.el"
> > +                  ("magit-git-executable"
> > +                   (search-input-file inputs "/bin/git")))
> >                  (emacs-substitute-variables "lisp/magit-
> > sequence.el"
> >                    ("magit-perl-executable"
> >                     (search-input-file inputs "/bin/perl")))))
> LGTM, will push once I'm done with some other stuff.
Aaaand it's done.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-13 21:55   ` bug#59253: " Liliana Marie Prikler
@ 2022-11-13 22:21     ` Thiago Jung Bauermann via Guix-patches via
  2022-11-14  3:01       ` Maxim Cournoyer
  0 siblings, 1 reply; 10+ messages in thread
From: Thiago Jung Bauermann via Guix-patches via @ 2022-11-13 22:21 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 59253-done


Hello Liliana,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Sonntag, dem 13.11.2022 um 22:24 +0100 schrieb Liliana Marie
> Prikler:
>> Am Sonntag, dem 13.11.2022 um 18:11 -0300 schrieb Thiago Jung
>> Bauermann:
>> > Magit has a strong dependency on Git so it should directly
>> > reference
>> > the
>> > git executable rather than expect it to be available in the profile
>> > or
>> > environment.
>> > 
>> > This also fixes a build failure in emacs-forge.
>> > 
>> > * gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]<#:phases>:
>> > Substitute
>> > git path in the ‘magit-git-executable’ variable.
>> LGTM, will push once I'm done with some other stuff.
> Aaaand it's done.

Wow, that was quick. Thank you!

-- 
Thiago




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-13 22:21     ` [bug#59253] " Thiago Jung Bauermann via Guix-patches via
@ 2022-11-14  3:01       ` Maxim Cournoyer
  2022-11-14  3:09         ` Thiago Jung Bauermann via Guix-patches via
  2022-11-15  8:52         ` zimoun
  0 siblings, 2 replies; 10+ messages in thread
From: Maxim Cournoyer @ 2022-11-14  3:01 UTC (permalink / raw)
  To: 59253; +Cc: 59253-done, Liliana Marie Prikler, Thiago Jung Bauermann

Hi,

Thiago Jung Bauermann via Guix-patches via <guix-patches@gnu.org>
writes:

> Hello Liliana,
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
>> Am Sonntag, dem 13.11.2022 um 22:24 +0100 schrieb Liliana Marie
>> Prikler:
>>> Am Sonntag, dem 13.11.2022 um 18:11 -0300 schrieb Thiago Jung
>>> Bauermann:
>>> > Magit has a strong dependency on Git so it should directly
>>> > reference
>>> > the
>>> > git executable rather than expect it to be available in the profile
>>> > or
>>> > environment.
>>> > 
>>> > This also fixes a build failure in emacs-forge.
>>> > 
>>> > * gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]<#:phases>:
>>> > Substitute
>>> > git path in the ‘magit-git-executable’ variable.
>>> LGTM, will push once I'm done with some other stuff.
>> Aaaand it's done.
>
> Wow, that was quick. Thank you!

Won't this make magit unusable from TRAMP (which already seems broken
for me since the time we enabled native comp -- anyone else?).

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-14  3:01       ` Maxim Cournoyer
@ 2022-11-14  3:09         ` Thiago Jung Bauermann via Guix-patches via
  2022-11-15  0:52           ` Kyle Meyer
  2022-11-15  8:52         ` zimoun
  1 sibling, 1 reply; 10+ messages in thread
From: Thiago Jung Bauermann via Guix-patches via @ 2022-11-14  3:09 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: liliana.prikler, 59253, 59253-done


Hello Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hi,
>
> Thiago Jung Bauermann via Guix-patches via <guix-patches@gnu.org>
> writes:
>
>> Hello Liliana,
>>
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>>
>>> Am Sonntag, dem 13.11.2022 um 22:24 +0100 schrieb Liliana Marie
>>> Prikler:
>>>> Am Sonntag, dem 13.11.2022 um 18:11 -0300 schrieb Thiago Jung
>>>> Bauermann:
>>>> > Magit has a strong dependency on Git so it should directly
>>>> > reference
>>>> > the
>>>> > git executable rather than expect it to be available in the profile
>>>> > or
>>>> > environment.
>>>> > 
>>>> > This also fixes a build failure in emacs-forge.
>>>> > 
>>>> > * gnu/packages/emacs-xyz.scm (emacs-magit)[arguments]<#:phases>:
>>>> > Substitute
>>>> > git path in the ‘magit-git-executable’ variable.
>>>> LGTM, will push once I'm done with some other stuff.
>>> Aaaand it's done.
>>
>> Wow, that was quick. Thank you!
>
> Won't this make magit unusable from TRAMP (which already seems broken
> for me since the time we enabled native comp -- anyone else?).

Hm, interesting point. I don't know. I don't use TRAMP because it was
too slow for me in the couple of times I've tried.

magit/lisp/magit-git.el does have this custom variable though, which
this patch didn't change:

#+BEGIN_SRC elisp
(defcustom magit-remote-git-executable "git"
  "The Git executable used by Magit on remote machines.
On the local host `magit-git-executable' is used instead.
Consider customizing `tramp-remote-path' instead of this
option."
  :package-version '(magit . "3.2.0")
  :group 'magit-process
  :type 'string)
#+END_SRC elisp

So I'd say it's possible that my patch doesn't affect whether Magit
works from TRAMP…

-- 
Thanks
Thiago




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-14  3:09         ` Thiago Jung Bauermann via Guix-patches via
@ 2022-11-15  0:52           ` Kyle Meyer
  2022-11-15  4:30             ` Thiago Jung Bauermann via Guix-patches via
  2022-11-15 13:49             ` Maxim Cournoyer
  0 siblings, 2 replies; 10+ messages in thread
From: Kyle Meyer @ 2022-11-15  0:52 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: 59253, liliana.prikler, Maxim Cournoyer

Thiago Jung Bauermann via Guix-patches via writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
[...]
>> Won't this make magit unusable from TRAMP (which already seems broken
>> for me since the time we enabled native comp -- anyone else?).
>
> Hm, interesting point. I don't know. I don't use TRAMP because it was
> too slow for me in the couple of times I've tried.
>
> magit/lisp/magit-git.el does have this custom variable though, which
> this patch didn't change:
>
> #+BEGIN_SRC elisp
> (defcustom magit-remote-git-executable "git"
>   "The Git executable used by Magit on remote machines.
> On the local host `magit-git-executable' is used instead.
> Consider customizing `tramp-remote-path' instead of this
> option."
>   :package-version '(magit . "3.2.0")
>   :group 'magit-process
>   :type 'string)
> #+END_SRC elisp
>
> So I'd say it's possible that my patch doesn't affect whether Magit
> works from TRAMP…

That's right.  magit-remote-git-executable is the executable that will
be used when operating remotely via TRAMP, so your patch shouldn't
affect it (and if it does, it's unintended behavior on Magit's end).

Note that, as the :package-version value suggests, this split happened
in a relatively recent release, so previous some previous discussions on
the list (e.g., bug#30434) are now out of date.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-15  0:52           ` Kyle Meyer
@ 2022-11-15  4:30             ` Thiago Jung Bauermann via Guix-patches via
  2022-11-15 13:49             ` Maxim Cournoyer
  1 sibling, 0 replies; 10+ messages in thread
From: Thiago Jung Bauermann via Guix-patches via @ 2022-11-15  4:30 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: 59253, liliana.prikler, Maxim Cournoyer


Hello Kyle,

Kyle Meyer <kyle@kyleam.com> writes:

> Thiago Jung Bauermann via Guix-patches via writes:
>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> [...]
>>> Won't this make magit unusable from TRAMP (which already seems broken
>>> for me since the time we enabled native comp -- anyone else?).
>>
>> Hm, interesting point. I don't know. I don't use TRAMP because it was
>> too slow for me in the couple of times I've tried.
>>
>> magit/lisp/magit-git.el does have this custom variable though, which
>> this patch didn't change:
>>
>> #+BEGIN_SRC elisp
>> (defcustom magit-remote-git-executable "git"
>>   "The Git executable used by Magit on remote machines.
>> On the local host `magit-git-executable' is used instead.
>> Consider customizing `tramp-remote-path' instead of this
>> option."
>>   :package-version '(magit . "3.2.0")
>>   :group 'magit-process
>>   :type 'string)
>> #+END_SRC elisp
>>
>> So I'd say it's possible that my patch doesn't affect whether Magit
>> works from TRAMP…
>
> That's right.  magit-remote-git-executable is the executable that will
> be used when operating remotely via TRAMP, so your patch shouldn't
> affect it (and if it does, it's unintended behavior on Magit's end).
>
> Note that, as the :package-version value suggests, this split happened
> in a relatively recent release, so previous some previous discussions on
> the list (e.g., bug#30434) are now out of date.

That's great! Thank you for the clarification.

-- 
Thanks
Thiago




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-14  3:01       ` Maxim Cournoyer
  2022-11-14  3:09         ` Thiago Jung Bauermann via Guix-patches via
@ 2022-11-15  8:52         ` zimoun
  1 sibling, 0 replies; 10+ messages in thread
From: zimoun @ 2022-11-15  8:52 UTC (permalink / raw)
  To: Maxim Cournoyer, 59253
  Cc: Thiago Jung Bauermann, 59253-done, Liliana Marie Prikler

Hi Maxim,

Unrelated to this patch.

On Sun, 13 Nov 2022 at 22:01, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

> Won't this make magit unusable from TRAMP (which already seems broken
> for me since the time we enabled native comp -- anyone else?).

For TRAMP precisely, I do not know, but ESS has troubles with TRAMP, see bug#58690.


1: <https://issues.guix.gnu.org/issue/58690#msgid-ebbe0f9c555b37e7682777804a4af15497d457b3>

Cheers,
simon




^ permalink raw reply	[flat|nested] 10+ messages in thread

* [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path.
  2022-11-15  0:52           ` Kyle Meyer
  2022-11-15  4:30             ` Thiago Jung Bauermann via Guix-patches via
@ 2022-11-15 13:49             ` Maxim Cournoyer
  1 sibling, 0 replies; 10+ messages in thread
From: Maxim Cournoyer @ 2022-11-15 13:49 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: 59253, liliana.prikler, Thiago Jung Bauermann

Hi,

Kyle Meyer <kyle@kyleam.com> writes:

> Thiago Jung Bauermann via Guix-patches via writes:
>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> [...]
>>> Won't this make magit unusable from TRAMP (which already seems broken
>>> for me since the time we enabled native comp -- anyone else?).
>>
>> Hm, interesting point. I don't know. I don't use TRAMP because it was
>> too slow for me in the couple of times I've tried.
>>
>> magit/lisp/magit-git.el does have this custom variable though, which
>> this patch didn't change:
>>
>> #+BEGIN_SRC elisp
>> (defcustom magit-remote-git-executable "git"
>>   "The Git executable used by Magit on remote machines.
>> On the local host `magit-git-executable' is used instead.
>> Consider customizing `tramp-remote-path' instead of this
>> option."
>>   :package-version '(magit . "3.2.0")
>>   :group 'magit-process
>>   :type 'string)
>> #+END_SRC elisp
>>
>> So I'd say it's possible that my patch doesn't affect whether Magit
>> works from TRAMP…
>
> That's right.  magit-remote-git-executable is the executable that will
> be used when operating remotely via TRAMP, so your patch shouldn't
> affect it (and if it does, it's unintended behavior on Magit's end).
>
> Note that, as the :package-version value suggests, this split happened
> in a relatively recent release, so previous some previous discussions on
> the list (e.g., bug#30434) are now out of date.

Excellent.  Thanks for the explanation!

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-15 14:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-13 21:11 [bug#59253] [PATCH] gnu: emacs-magit: Substitute git executable path Thiago Jung Bauermann via Guix-patches via
2022-11-13 21:24 ` Liliana Marie Prikler
2022-11-13 21:55   ` bug#59253: " Liliana Marie Prikler
2022-11-13 22:21     ` [bug#59253] " Thiago Jung Bauermann via Guix-patches via
2022-11-14  3:01       ` Maxim Cournoyer
2022-11-14  3:09         ` Thiago Jung Bauermann via Guix-patches via
2022-11-15  0:52           ` Kyle Meyer
2022-11-15  4:30             ` Thiago Jung Bauermann via Guix-patches via
2022-11-15 13:49             ` Maxim Cournoyer
2022-11-15  8:52         ` zimoun

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).