GNU bug report logs - #30328
[PATCH] gnu: Add emacs-browse-at-remote-gnu.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Fri, 2 Feb 2018 21:47:01 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30328 in the body.
You can then email your comments to 30328 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#30328; Package guix-patches. (Fri, 02 Feb 2018 21:47:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 02 Feb 2018 21:47:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [PATCH] gnu: Add emacs-browse-at-remote-gnu.
Date: Sat,  3 Feb 2018 00:44:57 +0300
* gnu/packages/emacs.scm (emacs-browse-at-remote-gnu): New public variable.
* gnu/packages/patches/emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add this.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/emacs.scm                             | 10 ++++
 ...mote-gnu-add-support-for-gnu-repositories.patch | 59 ++++++++++++++++++++++
 3 files changed, 70 insertions(+)
 create mode 100644 gnu/packages/patches/emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 6fdea16c8..088ddee85 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -617,6 +617,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/elfutils-tests-ptrace.patch		\
   %D%/packages/patches/elixir-disable-failing-tests.patch	\
   %D%/packages/patches/einstein-build.patch			\
+  %D%/packages/patches/emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch	\
   %D%/packages/patches/emacs-exec-path.patch			\
   %D%/packages/patches/emacs-fix-scheme-indent-function.patch	\
   %D%/packages/patches/emacs-json-reformat-fix-tests.patch	\
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 9523f14da..827469217 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6470,6 +6470,16 @@ github/gitlab (or bitbucket) by calling @code{browse-at-remote} command.
 It supports dired buffers and opens them in tree mode at destination.")
       (license license:gpl3+))))
 
+(define-public emacs-browse-at-remote-gnu
+  (package
+    (inherit emacs-browse-at-remote)
+    (name "emacs-browse-at-remote-gnu")
+    (source
+     (origin
+       (inherit (package-source emacs-browse-at-remote))
+       (patches (search-patches "emacs-browse-at-remote-gnu\
+-add-support-for-gnu-repositories.patch"))))))
+
 (define-public emacs-tiny
   (package
     (name "emacs-tiny")
diff --git a/gnu/packages/patches/emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch b/gnu/packages/patches/emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch
new file mode 100644
index 000000000..b90017fdb
--- /dev/null
+++ b/gnu/packages/patches/emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch
@@ -0,0 +1,59 @@
+Copyright © 2018 Oleg Pykhalov <go.wigust <at> gmail.com>
+
+This patch adds a support for Git repositories hosted on git.savannah.gnu.org.
+
+Upstream bug URL:
+
+https://github.com/rmuslimov/browse-at-remote/pull/46
+
+From cd2ccdaef8b1d97337d790175f71cc3dbcfcff64 Mon Sep 17 00:00:00 2001
+From: Oleg Pykhalov <go.wigust <at> gmail.com>
+Date: Fri, 26 Jan 2018 00:05:30 +0300
+Subject: [PATCH] Add support for repositories that are hosted on gnu cgit
+
+---
+ browse-at-remote.el | 21 ++++++++++++++++++++-
+ 1 file changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/browse-at-remote.el b/browse-at-remote.el
+index 66967b3..e210d18 100644
+--- a/browse-at-remote.el
++++ b/browse-at-remote.el
+@@ -44,7 +44,8 @@
+ (defcustom browse-at-remote-remote-type-domains
+   '(("bitbucket.org" ."bitbucket")
+     ("github.com" . "github")
+-    ("gitlab.com" . "gitlab"))
++    ("gitlab.com" . "gitlab")
++    ("git.savannah.gnu.org" . "gnu"))
+   "Alist of domain patterns to remote types."
+ 
+   :type '(alist :key-type (string :tag "Domain")
+@@ -199,6 +200,24 @@ If HEAD is detached, return nil."
+     (if (fboundp formatter)
+         formatter nil)))
+ 
++(defun browse-at-remote-gnu-format-url (repo-url)
++  "Get a gnu formatted URL."
++  (replace-regexp-in-string
++   (concat "https://" (car (rassoc "gnu" browse-at-remote-remote-type-domains))
++           "/\\(git\\).*\\'")
++   "cgit" repo-url nil nil 1))
++
++(defun browse-at-remote--format-region-url-as-gnu (repo-url location filename &optional linestart lineend)
++  "URL formatter for gnu."
++  (let ((repo-url (browse-at-remote-gnu-format-url repo-url)))
++    (cond
++     (linestart (format "%s.git/tree/%s?h=%s#n%d" repo-url filename location linestart))
++     (t (format "%s.git/tree/%s?h=%s" repo-url filename location)))))
++
++(defun browse-at-remote--format-commit-url-as-gnu (repo-url commithash)
++  "Commit URL formatted for gnu"
++  (format "%s.git/commit/?id=%s" (browse-at-remote-gnu-format-url repo-url) commithash))
++
+ (defun browse-at-remote--format-region-url-as-github (repo-url location filename &optional linestart lineend)
+   "URL formatted for github."
+   (cond
+-- 
+2.15.1
+
-- 
2.15.1





Information forwarded to guix-patches <at> gnu.org:
bug#30328; Package guix-patches. (Tue, 06 Feb 2018 15:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 30328 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 30328 <at> debbugs.gnu.org
Subject: Re: [bug#30328] [PATCH] gnu: Add emacs-browse-at-remote-gnu.
Date: Tue, 06 Feb 2018 16:26:36 +0100
Oleg Pykhalov <go.wigust <at> gmail.com> skribis:

> * gnu/packages/emacs.scm (emacs-browse-at-remote-gnu): New public variable.
> * gnu/packages/patches/emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add this.

[...]

> +(define-public emacs-browse-at-remote-gnu
> +  (package
> +    (inherit emacs-browse-at-remote)
> +    (name "emacs-browse-at-remote-gnu")
> +    (source
> +     (origin
> +       (inherit (package-source emacs-browse-at-remote))
> +       (patches (search-patches "emacs-browse-at-remote-gnu\
> +-add-support-for-gnu-repositories.patch"))))))

What about simply adding the patch to ‘emacs-browse-at-remote’ if it’s
committed upstream way?

Also please make the .patch file name a bit shorter; see ‘guix lint’.

OK with these changes, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#30328; Package guix-patches. (Wed, 07 Feb 2018 07:22:02 GMT) Full text and rfc822 format available.

Message #11 received at 30328 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 30328 <at> debbugs.gnu.org
Subject: Re: [bug#30328] [PATCH] gnu: Add emacs-browse-at-remote-gnu.
Date: Tue, 06 Feb 2018 19:47:13 +0300
[Message part 1 (text/plain, inline)]
Hello Ludovic,

Thank you for review!

ludo <at> gnu.org (Ludovic Courtès) writes:
 
  > What about simply adding the patch to ‘emacs-browse-at-remote’ if
  > it’s committed upstream way?

I'm sorry, what do you mean by “committed upstream way”?

I kinda agree to move the patch to ‘emacs-browse-at-remote’, but if
somebody want to upgrade it, maybe he will need to recreate a patch.

WDYT?

  > Also please make the .patch file name a bit shorter; see ‘guix lint’.

Ouch, I missed this because of “GUIX_PACKAGE_PATH”.  Usually I unset
this when prepare a package for Guix collection, but forget this time.
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env env guix lint emacs-browse-at-remote-gnu

$ ./pre-inst-env env GUIX_PACKAGE_PATH= guix lint emacs-browse-at-remote-gnu
/home/natsu/src/guix-wip-emacs-browse-at-remote-gnu/gnu/packages/emacs.scm:6474:2:
emacs-browse-at-remote-gnu <at> 0.9.0-1.31dcf77:
emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch: file
name is too long
fetching CVE database for 2018...nu <at> 0.9.0-1.31dcf77 [cve]...
--8<---------------cut here---------------end--------------->8---

Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#30328; Package guix-patches. (Wed, 07 Feb 2018 09:20:02 GMT) Full text and rfc822 format available.

Message #14 received at 30328 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 30328 <at> debbugs.gnu.org
Subject: Re: [bug#30328] [PATCH] gnu: Add emacs-browse-at-remote-gnu.
Date: Wed, 07 Feb 2018 10:18:58 +0100
Hi Oleg,

Oleg Pykhalov <go.wigust <at> gmail.com> skribis:

> ludo <at> gnu.org (Ludovic Courtès) writes:
>  
>   > What about simply adding the patch to ‘emacs-browse-at-remote’ if
>   > it’s committed upstream way?
>
> I'm sorry, what do you mean by “committed upstream way”?

I mean that the patch for Savannah support is already in the repository
of ‘browse-at-remote’, isn’t it?  Which is to say that the next version
of ‘browse-at-remote’ will have that functionality.

> I kinda agree to move the patch to ‘emacs-browse-at-remote’, but if
> somebody want to upgrade it, maybe he will need to recreate a patch.

(“He” or “she”.)

I don’t know, won’t the next ‘browse-at-remote’ include it?

>   > Also please make the .patch file name a bit shorter; see ‘guix lint’.
>
> Ouch, I missed this because of “GUIX_PACKAGE_PATH”.  Usually I unset
> this when prepare a package for Guix collection, but forget this time.
>
> $ ./pre-inst-env env guix lint emacs-browse-at-remote-gnu
>
> $ ./pre-inst-env env GUIX_PACKAGE_PATH= guix lint emacs-browse-at-remote-gnu
> /home/natsu/src/guix-wip-emacs-browse-at-remote-gnu/gnu/packages/emacs.scm:6474:2:
> emacs-browse-at-remote-gnu <at> 0.9.0-1.31dcf77:
> emacs-browse-at-remote-gnu-add-support-for-gnu-repositories.patch: file
> name is too long
> fetching CVE database for 2018...nu <at> 0.9.0-1.31dcf77 [cve]...

Oh I see, interesting.

The output of ‘guix lint’ seems to be messy, too.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#30328; Package guix-patches. (Wed, 07 Feb 2018 16:38:01 GMT) Full text and rfc822 format available.

Message #17 received at 30328 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 30328 <at> debbugs.gnu.org
Subject: Re: [bug#30328] [PATCH] gnu: Add emacs-browse-at-remote-gnu.
Date: Wed, 07 Feb 2018 19:37:36 +0300
[Message part 1 (text/plain, inline)]
ludo <at> gnu.org (Ludovic Courtès) writes:

  >>   > What about simply adding the patch to ‘emacs-browse-at-remote’ if
  >>   > it’s committed upstream way?
  >>
  >> I'm sorry, what do you mean by “committed upstream way”?
  >
  > I mean that the patch for Savannah support is already in the repository
  > of ‘browse-at-remote’, isn’t it?

Technically it is there.

  > Which is to say that the next version of ‘browse-at-remote’ will
  > have that functionality.
  >
  > I don’t know, won’t the next ‘browse-at-remote’ include it?

I hope so, but I cannot answer for them (upstream).
 
  > The output of ‘guix lint’ seems to be messy, too.

Do you mean “filled”?  Sorry for that.


So, what will our strategy be?  Stay close to upstream by making a new
package with patch or patching the original package?


Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#30328; Package guix-patches. (Wed, 07 Feb 2018 21:43:01 GMT) Full text and rfc822 format available.

Message #20 received at 30328 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 30328 <at> debbugs.gnu.org
Subject: Re: [bug#30328] [PATCH] gnu: Add emacs-browse-at-remote-gnu.
Date: Wed, 07 Feb 2018 22:41:53 +0100
Oleg Pykhalov <go.wigust <at> gmail.com> skribis:

> ludo <at> gnu.org (Ludovic Courtès) writes:
>
>   >>   > What about simply adding the patch to ‘emacs-browse-at-remote’ if
>   >>   > it’s committed upstream way?
>   >>
>   >> I'm sorry, what do you mean by “committed upstream way”?
>   >
>   > I mean that the patch for Savannah support is already in the repository
>   > of ‘browse-at-remote’, isn’t it?
>
> Technically it is there.

Good.

>   > Which is to say that the next version of ‘browse-at-remote’ will
>   > have that functionality.
>   >
>   > I don’t know, won’t the next ‘browse-at-remote’ include it?
>
> I hope so, but I cannot answer for them (upstream).

Well if it’s already in their repo, let’s assume it’ll be in the next
version.

>   > The output of ‘guix lint’ seems to be messy, too.
>
> Do you mean “filled”?  Sorry for that.

Several lines appear to overlap.

> So, what will our strategy be?  Stay close to upstream by making a new
> package with patch or patching the original package?

Patch the ‘emacs-browse-at-remote’ package, I’d say.

Sounds good?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#30328; Package guix-patches. (Fri, 09 Feb 2018 19:28:01 GMT) Full text and rfc822 format available.

Message #23 received at 30328 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 30328 <at> debbugs.gnu.org, 30328-done <at> debbugs.gnu.org
Subject: Re: [bug#30328] [PATCH] gnu: Add emacs-browse-at-remote-gnu.
Date: Fri, 09 Feb 2018 22:26:51 +0300
[Message part 1 (text/plain, inline)]
Hello Ludovic,

ludo <at> gnu.org (Ludovic Courtès) writes:
 
  > Well if it’s already in their repo, let’s assume it’ll be in the next
  > version.

I would say it's not in the their repo, but like in their mailing list.
 
  > Patch the ‘emacs-browse-at-remote’ package, I’d say.

OK.

Pushed as 61995dce5038dc801bca5a3ea1419ced2c6bd69c

I'll close the bug report.

Thanks,
Oleg.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
You have taken responsibility. (Fri, 09 Feb 2018 19:28:02 GMT) Full text and rfc822 format available.

Notification sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
bug acknowledged by developer. (Fri, 09 Feb 2018 19:28:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Mar 2018 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.