GNU bug report logs - #28832
[PATCH 0/3] gnu: Add emacs-json-mode.

Previous Next

Package: guix-patches;

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

Date: Sat, 14 Oct 2017 09:53: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 28832 in the body.
You can then email your comments to 28832 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#28832; Package guix-patches. (Sat, 14 Oct 2017 09:53:02 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. (Sat, 14 Oct 2017 09:53:02 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
Subject: [PATCH 0/3] gnu: Add emacs-json-mode.
Date: Sat, 14 Oct 2017 12:51:52 +0300
[0000-cover-letter.patch (text/x-patch, inline)]
From b3b7b79f85e3b2aca6322e9c994b0fe0a666825d Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Sat, 14 Oct 2017 12:50:21 +0300
Subject: [PATCH 0/3] gnu: Add emacs-json-mode.

2 tests fails in emacs-json-reformat.

Oleg Pykhalov (3):
  gnu: Add emacs-json-reformat.
  gnu: Add emacs-json-snatcher.
  gnu: Add emacs-json-mode.

 gnu/packages/emacs.scm | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Sat, 14 Oct 2017 10:30:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: 28832 <at> debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Sat, 14 Oct 2017 13:29:13 +0300
* gnu/packages/emacs.scm (emacs-json-reformat): New variable.
---
 gnu/packages/emacs.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 66f0a2ebe..8d94341ab 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5569,6 +5569,55 @@ pair of minor modes which suppress all mouse events by intercepting them and
 running a customisable handler command (@code{ignore} by default). ")
     (license license:gpl3+)))
 
+(define-public emacs-json-reformat
+  (package
+    (name "emacs-json-reformat")
+    (version "0.0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/gongo/json-reformat/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "11fbq4scrgr7m0iwnzcrn2g7xvqwm2gf82sa7zy1l0nil7265p28"))))
+    (build-system emacs-build-system)
+    (propagated-inputs `(("emacs-undercover" ,emacs-undercover)))
+    (inputs
+     `(("emacs-dash" ,emacs-dash)         ; for tests
+       ("emacs-shut-up" ,emacs-shut-up))) ; for tests
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'check
+           (lambda* (#:key inputs #:allow-other-keys)
+             (zero? (system* "emacs" "--batch" "-L" "."
+                             "-L" (string-append
+                                   (assoc-ref inputs "emacs-undercover")
+                                   "/share/emacs/site-lisp/guix.d/undercover-"
+                                   ,(package-version emacs-undercover))
+                             "-L" (string-append
+                                   (assoc-ref inputs "emacs-dash")
+                                   "/share/emacs/site-lisp/guix.d/dash-"
+                                   ,(package-version emacs-dash))
+                             "-L" (string-append
+                                   (assoc-ref inputs "emacs-shut-up")
+                                   "/share/emacs/site-lisp/guix.d/shut-up-"
+                                   ,(package-version emacs-shut-up))
+                             "-l" "test/test-helper.el"
+                             "-l" "test/json-reformat-test.el"
+                             "-f" "ert-run-tests-batch-and-exit"))
+             ;; Fails
+             ;; json-reformat-test:json-reformat-region-occur-error
+             ;; json-reformat-test:string-to-string
+             #t)))))
+    (home-page "https://github.com/gongo/json-reformat")
+    (synopsis "Reformatting tool for JSON")
+    (description "@code{json-reformat} provides a reformatting tool for
+@url{http://json.org/, JSON}.")
+    (license license:gpl3+)))
+
 (define-public emacs-restclient
   (let ((commit "07a3888bb36d0e29608142ebe743b4362b800f40")
         (revision "1"))                 ;Guix package revision,
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Sat, 14 Oct 2017 10:30:03 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: 28832 <at> debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [PATCH 2/3] gnu: Add emacs-json-snatcher.
Date: Sat, 14 Oct 2017 13:29:14 +0300
* gnu/packages/emacs.scm (emacs-json-snatcher): New variable.
---
 gnu/packages/emacs.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 8d94341ab..9bf7acf0b 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5618,6 +5618,26 @@ running a customisable handler command (@code{ignore} by default). ")
 @url{http://json.org/, JSON}.")
     (license license:gpl3+)))
 
+(define-public emacs-json-snatcher
+  (package
+    (name "emacs-json-snatcher")
+    (version "1.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/Sterlingg/json-snatcher/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1nfiwsifpdiz0lbrqa77nl0crnfrv5h85ans9b0g5rggnmyshcfb"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/sterlingg/json-snatcher")
+    (synopsis "Grabs the path to JSON values in a JSON file")
+    (description "@code{emacs-json-snatcher} grabs the path to JSON values in
+a @url{http://json.org/, JSON} file.")
+    (license license:gpl3+)))
+
 (define-public emacs-restclient
   (let ((commit "07a3888bb36d0e29608142ebe743b4362b800f40")
         (revision "1"))                 ;Guix package revision,
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Sat, 14 Oct 2017 10:30:03 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: 28832 <at> debbugs.gnu.org
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>
Subject: [PATCH 3/3] gnu: Add emacs-json-mode.
Date: Sat, 14 Oct 2017 13:29:15 +0300
* gnu/packages/emacs.scm (emacs-json-mode): New variable.
---
 gnu/packages/emacs.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 9bf7acf0b..78a950900 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5638,6 +5638,29 @@ running a customisable handler command (@code{ignore} by default). ")
 a @url{http://json.org/, JSON} file.")
     (license license:gpl3+)))
 
+(define-public emacs-json-mode
+  (package
+    (name "emacs-json-mode")
+    (version "1.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/joshwnj/json-mode/archive/"
+                           "v" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "06h45p4cn767pk9sqi2zb1c65wy5gyyijqxzpglp80zwxhvajdz5"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-json-reformat" ,emacs-json-reformat)
+       ("emacs-json-snatcher" ,emacs-json-snatcher)))
+    (home-page "https://github.com/joshwnj/json-mode")
+    (synopsis "Major mode for editing JSON files")
+    (description "@code{json-mode} extends the builtin js-mode syntax
+highlighting.")
+    (license license:gpl3+)))
+
 (define-public emacs-restclient
   (let ((commit "07a3888bb36d0e29608142ebe743b4362b800f40")
         (revision "1"))                 ;Guix package revision,
-- 
2.14.2





Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Fri, 20 Oct 2017 12:35:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Fri, 20 Oct 2017 14:34:39 +0200
Hello,

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

> * gnu/packages/emacs.scm (emacs-json-reformat): New variable.

[...]

> +       (modify-phases %standard-phases
> +         (add-before 'install 'check
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (zero? (system* "emacs" "--batch" "-L" "."
> +                             "-L" (string-append
> +                                   (assoc-ref inputs "emacs-undercover")
> +                                   "/share/emacs/site-lisp/guix.d/undercover-"
> +                                   ,(package-version emacs-undercover))
> +                             "-L" (string-append
> +                                   (assoc-ref inputs "emacs-dash")
> +                                   "/share/emacs/site-lisp/guix.d/dash-"
> +                                   ,(package-version emacs-dash))
> +                             "-L" (string-append
> +                                   (assoc-ref inputs "emacs-shut-up")
> +                                   "/share/emacs/site-lisp/guix.d/shut-up-"
> +                                   ,(package-version emacs-shut-up))
> +                             "-l" "test/test-helper.el"
> +                             "-l" "test/json-reformat-test.el"
> +                             "-f" "ert-run-tests-batch-and-exit"))
> +             ;; Fails
> +             ;; json-reformat-test:json-reformat-region-occur-error
> +             ;; json-reformat-test:string-to-string
> +             #t)))))

Did you have a chance to investigate the test failures?  It’s not
confidence-inspiring ;-), so it would be good to at least have a link to
an upstream bug report.

Besides, I wonder: shouldn’t ‘emacs-build-system’ define the
‘EMACSLOADPATH’ env. var. so we don’t have to carry all these -L flags?
Is there any downside?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Fri, 20 Oct 2017 12:42:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 2/3] gnu: Add emacs-json-snatcher.
Date: Fri, 20 Oct 2017 14:41:00 +0200
Oleg Pykhalov <go.wigust <at> gmail.com> skribis:

> * gnu/packages/emacs.scm (emacs-json-snatcher): New variable.

Applied, thanks!




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Fri, 01 Dec 2017 10:24:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Fri, 01 Dec 2017 11:23:03 +0100
Hi Oleg,

Ping!  :-)

ludo <at> gnu.org (Ludovic Courtès) skribis:

> Oleg Pykhalov <go.wigust <at> gmail.com> skribis:
>
>> * gnu/packages/emacs.scm (emacs-json-reformat): New variable.
>
> [...]
>
>> +       (modify-phases %standard-phases
>> +         (add-before 'install 'check
>> +           (lambda* (#:key inputs #:allow-other-keys)
>> +             (zero? (system* "emacs" "--batch" "-L" "."
>> +                             "-L" (string-append
>> +                                   (assoc-ref inputs "emacs-undercover")
>> +                                   "/share/emacs/site-lisp/guix.d/undercover-"
>> +                                   ,(package-version emacs-undercover))
>> +                             "-L" (string-append
>> +                                   (assoc-ref inputs "emacs-dash")
>> +                                   "/share/emacs/site-lisp/guix.d/dash-"
>> +                                   ,(package-version emacs-dash))
>> +                             "-L" (string-append
>> +                                   (assoc-ref inputs "emacs-shut-up")
>> +                                   "/share/emacs/site-lisp/guix.d/shut-up-"
>> +                                   ,(package-version emacs-shut-up))
>> +                             "-l" "test/test-helper.el"
>> +                             "-l" "test/json-reformat-test.el"
>> +                             "-f" "ert-run-tests-batch-and-exit"))
>> +             ;; Fails
>> +             ;; json-reformat-test:json-reformat-region-occur-error
>> +             ;; json-reformat-test:string-to-string
>> +             #t)))))
>
> Did you have a chance to investigate the test failures?  It’s not
> confidence-inspiring ;-), so it would be good to at least have a link to
> an upstream bug report.
>
> Besides, I wonder: shouldn’t ‘emacs-build-system’ define the
> ‘EMACSLOADPATH’ env. var. so we don’t have to carry all these -L flags?
> Is there any downside?
>
> Thanks,
> Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Mon, 11 Dec 2017 23:13:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 12 Dec 2017 02:12:36 +0300
[Message part 1 (text/plain, inline)]
Hello Ludovic,

Apologies for late reply and thank you for review.

ludo <at> gnu.org (Ludovic Courtès) writes:

[...]

>>> +       (modify-phases %standard-phases
>>> +         (add-before 'install 'check
>>> +           (lambda* (#:key inputs #:allow-other-keys)
>>> +             (zero? (system* "emacs" "--batch" "-L" "."
>>> +                             "-L" (string-append
>>> +                                   (assoc-ref inputs "emacs-undercover")
>>> +                                   "/share/emacs/site-lisp/guix.d/undercover-"
>>> +                                   ,(package-version emacs-undercover))
>>> +                             "-L" (string-append
>>> +                                   (assoc-ref inputs "emacs-dash")
>>> +                                   "/share/emacs/site-lisp/guix.d/dash-"
>>> +                                   ,(package-version emacs-dash))
>>> +                             "-L" (string-append
>>> +                                   (assoc-ref inputs "emacs-shut-up")
>>> +                                   "/share/emacs/site-lisp/guix.d/shut-up-"
>>> +                                   ,(package-version emacs-shut-up))
>>> +                             "-l" "test/test-helper.el"
>>> +                             "-l" "test/json-reformat-test.el"
>>> +                             "-f" "ert-run-tests-batch-and-exit"))
>>> +             ;; Fails
>>> +             ;; json-reformat-test:json-reformat-region-occur-error
>>> +             ;; json-reformat-test:string-to-string
>>> +             #t)))))
>>
>> Did you have a chance to investigate the test failures?  It’s not
>> confidence-inspiring ;-), so it would be good to at least have a link to
>> an upstream bug report.

Yes I looked at those tests.  Here is a little review of them.

json-reformat-test:string-to-string basically just calls
a reimplemented in Emacs 25 json-encode-string function.

json-reformat-test:json-reformat-region-occur-error emulates error and
produce a message.  This message is differ from Emacs 24 in symbol '`'.

So, I think those test fails are harmless.  I attach the new patch with
fixing those failing tests.

[0001-gnu-Add-emacs-json-reformat.patch (text/x-patch, inline)]
From d589de21acb02d0fba7aee3b48e5f42d7bd8957e Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Tue, 12 Dec 2017 01:41:08 +0300
Subject: [PATCH] gnu: Add emacs-json-reformat.

* gnu/packages/patches/emacs-json-reformat-fix-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add this.
* gnu/packages/emacs.scm (emacs-json-reformat): New variable.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/emacs.scm                             | 47 ++++++++++++++++++++++
 .../patches/emacs-json-reformat-fix-tests.patch    | 28 +++++++++++++
 3 files changed, 76 insertions(+)
 create mode 100644 gnu/packages/patches/emacs-json-reformat-fix-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 46829756b..ec5ba06d3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -613,6 +613,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/einstein-build.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	\
   %D%/packages/patches/emacs-highlight-stages-add-gexp.patch	\
   %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch	\
   %D%/packages/patches/emacs-source-date-epoch.patch		\
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index fd0305629..1aa139c92 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5914,6 +5914,53 @@ pair of minor modes which suppress all mouse events by intercepting them and
 running a customisable handler command (@code{ignore} by default). ")
     (license license:gpl3+)))
 
+(define-public emacs-json-reformat
+  (package
+    (name "emacs-json-reformat")
+    (version "0.0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/gongo/json-reformat/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "11fbq4scrgr7m0iwnzcrn2g7xvqwm2gf82sa7zy1l0nil7265p28"))
+       (patches (search-patches "emacs-json-reformat-fix-tests.patch"))))
+    (build-system emacs-build-system)
+    (propagated-inputs `(("emacs-undercover" ,emacs-undercover)))
+    (inputs
+     `(("emacs-dash" ,emacs-dash)         ; for tests
+       ("emacs-shut-up" ,emacs-shut-up))) ; for tests
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'check
+           (lambda* (#:key inputs #:allow-other-keys)
+             (zero? (system* "emacs" "--batch" "-L" "."
+                             "-L" (string-append
+                                   (assoc-ref inputs "emacs-undercover")
+                                   "/share/emacs/site-lisp/guix.d/undercover-"
+                                   ,(package-version emacs-undercover))
+                             "-L" (string-append
+                                   (assoc-ref inputs "emacs-dash")
+                                   "/share/emacs/site-lisp/guix.d/dash-"
+                                   ,(package-version emacs-dash))
+                             "-L" (string-append
+                                   (assoc-ref inputs "emacs-shut-up")
+                                   "/share/emacs/site-lisp/guix.d/shut-up-"
+                                   ,(package-version emacs-shut-up))
+                             "-l" "test/test-helper.el"
+                             "-l" "test/json-reformat-test.el"
+                             "-f" "ert-run-tests-batch-and-exit"))
+             #t)))))
+    (home-page "https://github.com/gongo/json-reformat")
+    (synopsis "Reformatting tool for JSON")
+    (description "@code{json-reformat} provides a reformatting tool for
+@url{http://json.org/, JSON}.")
+    (license license:gpl3+)))
+
 (define-public emacs-json-snatcher
   (package
     (name "emacs-json-snatcher")
diff --git a/gnu/packages/patches/emacs-json-reformat-fix-tests.patch b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
new file mode 100644
index 000000000..23a239582
--- /dev/null
+++ b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
@@ -0,0 +1,28 @@
+Copyright © 2017 Oleg Pykhalov <go.wigust <at> gmail.com>
+
+This patch fixes tests for Emacs 25.
+
+diff --git a/test/json-reformat-test.el b/test/json-reformat-test.el
+index 7de3be1..b4a4dde 100644
+--- a/test/json-reformat-test.el
++++ b/test/json-reformat-test.el
+@@ -58,7 +58,7 @@
+ (ert-deftest json-reformat-test:string-to-string ()
+   (should (string= "\"foobar\"" (json-reformat:string-to-string "foobar")))
+   (should (string= "\"fo\\\"o\\nbar\"" (json-reformat:string-to-string "fo\"o\nbar")))
+-  (should (string= "\"\\u2661\"" (json-reformat:string-to-string "\u2661")))
++  (should (string= "\"♡\"" (json-reformat:string-to-string "\u2661")))
+ 
+   (should (string= "\"^(amq\\\\.gen.*|amq\\\\.default)$\"" (json-reformat:string-to-string "^(amq\\.gen.*|amq\\.default)$")))
+   )
+@@ -148,6 +148,6 @@ bar\"" (json-reformat:string-to-string "fo\"o\nbar")))
+ [{ foo : \"bar\" }, { \"foo\" : \"baz\" }]") ;; At 3 (line)
+         (json-reformat-region (point-min) (point-max)))
+       (should (string=
+-               "JSON parse error [Reason] Bad string format: \"doesn't start with '\\\"'!\" [Position] In buffer, line 3 (char 6)"
++               "JSON parse error [Reason] Bad string format: \"doesn't start with \`\\\"'!\" [Position] In buffer, line 3 (char 6)"
+                message-string))
+       )))
+-- 
+2.15.1
+
-- 
2.15.1

[Message part 3 (text/plain, inline)]

The upstream is quite: https://github.com/gongo/json-reformat/issues/33

>> Besides, I wonder: shouldn’t ‘emacs-build-system’ define the
>> ‘EMACSLOADPATH’ env. var. so we don’t have to carry all these -L flags?
>> Is there any downside?

As I see from the documentation¹ EMACSLOADPATH is a list of directories
with *.el files in it.  If we will use it, then it will be almost the
same carring bunch of directories in package recipes, will it?

¹ https://www.gnu.org/software/emacs/manual/html_node/emacs/General-Variables.html

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

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Tue, 12 Dec 2017 09:18:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org, Alex Kost <alezost <at> gmail.com>
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 12 Dec 2017 10:17:08 +0100
Hi Oleg,

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

> ludo <at> gnu.org (Ludovic Courtès) writes:

[...]

>>> Did you have a chance to investigate the test failures?  It’s not
>>> confidence-inspiring ;-), so it would be good to at least have a link to
>>> an upstream bug report.
>
> Yes I looked at those tests.  Here is a little review of them.
>
> json-reformat-test:string-to-string basically just calls
> a reimplemented in Emacs 25 json-encode-string function.
>
> json-reformat-test:json-reformat-region-occur-error emulates error and
> produce a message.  This message is differ from Emacs 24 in symbol '`'.
>
> So, I think those test fails are harmless.  I attach the new patch with
> fixing those failing tests.

Indeed.

> From d589de21acb02d0fba7aee3b48e5f42d7bd8957e Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust <at> gmail.com>
> Date: Tue, 12 Dec 2017 01:41:08 +0300
> Subject: [PATCH] gnu: Add emacs-json-reformat.
>
> * gnu/packages/patches/emacs-json-reformat-fix-tests.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add this.
> * gnu/packages/emacs.scm (emacs-json-reformat): New variable.

[...]

> diff --git a/gnu/packages/patches/emacs-json-reformat-fix-tests.patch b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
> new file mode 100644
> index 000000000..23a239582
> --- /dev/null
> +++ b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
> @@ -0,0 +1,28 @@
> +Copyright © 2017 Oleg Pykhalov <go.wigust <at> gmail.com>
> +
> +This patch fixes tests for Emacs 25.

Please mention <https://github.com/gongo/json-reformat/issues/33> here.

OK with these changes!

> >> Besides, I wonder: shouldn’t ‘emacs-build-system’ define the
> >> ‘EMACSLOADPATH’ env. var. so we don’t have to carry all these -L flags?
> >> Is there any downside?
> 
> As I see from the documentation¹ EMACSLOADPATH is a list of directories
> with *.el files in it.  If we will use it, then it will be almost the
> same carring bunch of directories in package recipes, will it?

If ‘emacs-build-system’ sets ‘EMACSLOADPATH’ automatically, then
individual package definitions won’t need those -L flags.  Dunno if
there are good reasons not to do so.  Maybe Alex has an opinion?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Tue, 12 Dec 2017 17:24:02 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 12 Dec 2017 20:23:49 +0300
Ludovic Courtès (2017-12-12 10:17 +0100) wrote:

> Oleg Pykhalov <go.wigust <at> gmail.com> skribis:
>
>> ludo <at> gnu.org (Ludovic Courtès) writes:
>>
>>> Besides, I wonder: shouldn’t ‘emacs-build-system’ define the
>>> ‘EMACSLOADPATH’ env. var. so we don’t have to carry all these -L flags?
>>> Is there any downside?
>>
>> As I see from the documentation¹ EMACSLOADPATH is a list of directories
>> with *.el files in it.  If we will use it, then it will be almost the
>> same carring bunch of directories in package recipes, will it?
>
> If ‘emacs-build-system’ sets ‘EMACSLOADPATH’ automatically, then
> individual package definitions won’t need those -L flags.  Dunno if
> there are good reasons not to do so.  Maybe Alex has an opinion?

I would rather ask Federico who wrote ‘emacs-build-system’ :)

Yeah, maybe ‘emacs-build-system’ could benefit from using EMACSLOADPATH,
I don't know, someone should probably give it a try ;-)

BTW, Oleg, did you try to use 'ert-runner' instead of running emacs for
tests manually?  Perhaps, it will work; look at commit
8505d34829b99744a36d72dd583768f1e49210a6 for example.

-- 
Alex




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Wed, 13 Dec 2017 04:56:01 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Alex Kost <alezost <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Wed, 13 Dec 2017 07:55:22 +0300
[Message part 1 (text/plain, inline)]
Hello Alex and Ludovic,

Alex Kost <alezost <at> gmail.com> writes:

[...]

>> If ‘emacs-build-system’ sets ‘EMACSLOADPATH’ automatically, then
>> individual package definitions won’t need those -L flags.  Dunno if
>> there are good reasons not to do so.  Maybe Alex has an opinion?
>
> I would rather ask Federico who wrote ‘emacs-build-system’ :)

Do you mean Federico Beffa <beffa <at> fbengineering.ch>?  He is quite in
Guix git repository for 9 months as I see.  Is it a good idea to CC him?

> Yeah, maybe ‘emacs-build-system’ could benefit from using EMACSLOADPATH,
> I don't know, someone should probably give it a try ;-)

I succeeded to implement this, but the patch needs some more love.  The
biggest issue is how to get an Emacs version in setup-environment.

You could test it on emacs-git-messenger or emacs-json-reformat.

[Message part 2 (text/x-patch, inline)]
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index bd0d2e026..269038744 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -183,6 +183,10 @@ store in '.el' files."
   "Check if NAME correspond to the name of an Emacs package."
   (string-prefix? "emacs-" name))
 
+(define (string-drop-emacs x)
+  "Drops `emacs-' from a string."
+  (string-drop x 6))
+
 (define (emacs-inputs inputs)
   "Retrieve the list of Emacs packages from INPUTS."
   (filter (match-lambda
@@ -222,6 +226,38 @@ second hyphen.  This corresponds to 'name-version' as used in ELPA packages."
             strip-store-file-name)
    store-dir))
 
+;; Copied from haskell-build-system.scm
+(define (package-name-version store-dir)
+  "Given a store directory STORE-DIR return 'name-version' of the package."
+  (let* ((base (basename store-dir)))
+    (string-drop base (+ 1 (string-index base #\-)))))
+
+(define* (setup-environment #:key inputs outputs #:allow-other-keys)
+  "Export the variable EMACSLOADPATH, which are based on INPUTS and OUTPUTS,
+respectively."
+  (let ((out (assoc-ref outputs "out")))
+    ;; EMACSLOADPATH is where Emacs looks for the source code of the build's
+    ;; dependencies.
+    (set-path-environment-variable
+     "EMACSLOADPATH"
+     ;; XXX Matching "." hints that we could do
+     ;; something simpler here...
+     (list ".")
+     (cons (let ((store-item (cdr (assoc "emacs" (emacs-inputs inputs)))))
+             ;; TODO: Get a version from inputs
+             (string-append store-item "/share/emacs/25.3/lisp"))
+           (map
+            (lambda (foobar)
+              (let ((store-item (cdr foobar)))
+                (string-append store-item
+                               %install-suffix "/"
+                               (string-drop-emacs
+                                (package-name-version store-item)))))
+            (alist-delete "emacs"
+                          (alist-delete "source"
+                                        (emacs-inputs inputs))))))
+    #t))
+
 (define %standard-phases
   (modify-phases gnu:%standard-phases
     (replace 'unpack unpack)
@@ -229,6 +265,7 @@ second hyphen.  This corresponds to 'name-version' as used in ELPA packages."
     (delete 'check)
     (delete 'install)
     (replace 'build build)
+    (add-before 'build 'setup-environment setup-environment)
     (add-before 'build 'install install)
     (add-after 'install 'make-autoloads make-autoloads)
     (add-after 'make-autoloads 'patch-el-files patch-el-files)
[Message part 3 (text/plain, inline)]
> BTW, Oleg, did you try to use 'ert-runner' instead of running emacs for
> tests manually?  Perhaps, it will work; look at commit
> 8505d34829b99744a36d72dd583768f1e49210a6 for example.

Nope, but I will.  Thank you for notice this!

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

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Fri, 15 Dec 2017 09:37:01 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Alex Kost <alezost <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Fri, 15 Dec 2017 12:36:28 +0300
[0001-emacs-build-system-Add-EMACSLOADPATH.patch (text/x-patch, inline)]
From adda59022a61dfcf2add1d9f01d02df4be90a0f1 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Wed, 13 Dec 2017 08:10:21 +0300
Subject: [PATCH] emacs-build-system: Add EMACSLOADPATH.

* guix/build/emacs-build-system.scm: Add EMACSLOADPATH.
---
 guix/build/emacs-build-system.scm | 47 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index bd0d2e026..06479bf6b 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2015 Federico Beffa <beffa <at> fbengineering.ch>
 ;;; Copyright © 2016 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2016 Alex Kost <alezost <at> gmail.com>
+;;; Copyright © 2017 Oleg Pykhalov <go.wigust <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -183,6 +184,10 @@ store in '.el' files."
   "Check if NAME correspond to the name of an Emacs package."
   (string-prefix? "emacs-" name))
 
+(define (string-drop-emacs value)
+  "Drops `emacs-' from a string."
+  (string-drop value 6))
+
 (define (emacs-inputs inputs)
   "Retrieve the list of Emacs packages from INPUTS."
   (filter (match-lambda
@@ -222,6 +227,47 @@ second hyphen.  This corresponds to 'name-version' as used in ELPA packages."
             strip-store-file-name)
    store-dir))
 
+(define (store-directory->package-name store-dir)
+  "Extract package name from STORE-DIR."
+  (let-values (((name _) ((compose package-name->name+version
+                                   strip-store-file-name)
+                          store-dir)))
+    name))
+
+(define (store-directory->package-version store-dir)
+  "Extract package version from STORE-DIR."
+  (let-values (((_ version) ((compose package-name->name+version
+                                      strip-store-file-name)
+                             store-dir)))
+    version))
+
+(define* (setup-environment #:key inputs #:allow-other-keys)
+  "Export the variable EMACSLOADPATH, which are based on INPUTS respectively."
+  (let* ((filtered-inputs (emacs-inputs inputs))
+         (emacs-input-dir (cdr (assoc "emacs" filtered-inputs)))
+         (inputs-dirs (cdr filtered-inputs)))
+    ;; EMACSLOADPATH is where Emacs looks for the source code of the build's
+    ;; dependencies.
+    (setenv "EMACSLOADPATH"
+            (string-append emacs-input-dir "/share/emacs/"
+                           (store-directory->package-version emacs-input-dir)
+                           "/lisp"))
+    (for-each
+     (lambda (input)
+       (let ((store-item (cdr input)))
+         (setenv "EMACSLOADPATH"
+                 (string-append
+                  (or (getenv "EMACSLOADPATH") "")
+                  ":" store-item %install-suffix "/"
+                  ((compose string-drop-emacs store-directory->package-name)
+                   store-item)))))
+     ((compose (lambda (inputs) (alist-delete "emacs" inputs))
+               (lambda (inputs) (alist-delete "source" inputs)))
+      (delete-duplicates inputs-dirs)))
+    (format #t "environment variable EMACSLOADPATH set to `~a'~%"
+            (getenv "EMACSLOADPATH"))
+    #t))
+
 (define %standard-phases
   (modify-phases gnu:%standard-phases
     (replace 'unpack unpack)
@@ -229,6 +275,7 @@ second hyphen.  This corresponds to 'name-version' as used in ELPA packages."
     (delete 'check)
     (delete 'install)
     (replace 'build build)
+    (add-before 'build 'setup-environment setup-environment)
     (add-before 'build 'install install)
     (add-after 'install 'make-autoloads make-autoloads)
     (add-after 'make-autoloads 'patch-el-files patch-el-files)
-- 
2.15.1

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

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Fri, 15 Dec 2017 14:03:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: Alex Kost <alezost <at> gmail.com>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Fri, 15 Dec 2017 15:02:07 +0100
Hi Oleg,

I think it would have been better to open a separate issue for this.
Here are some superficial comments.  I hope someone more knowledgeable
about Emacs can comment.

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

> From adda59022a61dfcf2add1d9f01d02df4be90a0f1 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust <at> gmail.com>
> Date: Wed, 13 Dec 2017 08:10:21 +0300
> Subject: [PATCH] emacs-build-system: Add EMACSLOADPATH.
>
> * guix/build/emacs-build-system.scm: Add EMACSLOADPATH.

Please see ‘C-x v l’ in that file for the syntax of commit logs.  :-)

> +(define (store-directory->package-name store-dir)
> +  "Extract package name from STORE-DIR."
> +  (let-values (((name _) ((compose package-name->name+version
> +                                   strip-store-file-name)
> +                          store-dir)))
> +    name))

It’s enough to write it like this:

  (define store-directory->package-name
    (compose package-name->name+version
             strip-store-file-name))

Guile does automatic “multiple-value truncation”, which means that the
second value that the procedure returns can be ignored by the caller.

> +(define (store-directory->package-version store-dir)
> +  "Extract package version from STORE-DIR."
> +  (let-values (((_ version) ((compose package-name->name+version
> +                                      strip-store-file-name)
> +                             store-dir)))
> +    version))

Likewise.

> +(define* (setup-environment #:key inputs #:allow-other-keys)
> +  "Export the variable EMACSLOADPATH, which are based on INPUTS respectively."
> +  (let* ((filtered-inputs (emacs-inputs inputs))
> +         (emacs-input-dir (cdr (assoc "emacs" filtered-inputs)))
> +         (inputs-dirs (cdr filtered-inputs)))

Nitpick: Please see the guidelines mentioned in
<https://www.gnu.org/software/guix/manual/html_node/Formatting-Code.html>
on how to choose identifiers.  I’d write:

  (let* ((inputs (emacs-inputs inputs))
         (emacs  (assoc-ref inputs "emacs")))
    …)

‘inputs-dirs’ is unneeded AIUI (see below).

> +    ;; EMACSLOADPATH is where Emacs looks for the source code of the build's
> +    ;; dependencies.
> +    (setenv "EMACSLOADPATH"
> +            (string-append emacs-input-dir "/share/emacs/"
> +                           (store-directory->package-version emacs-input-dir)
> +                           "/lisp"))
> +    (for-each
> +     (lambda (input)
> +       (let ((store-item (cdr input)))

Rather:

  (for-each (match-lambda
              ((name . input)
               …))
            …)

> +         (setenv "EMACSLOADPATH"
> +                 (string-append
> +                  (or (getenv "EMACSLOADPATH") "")
> +                  ":" store-item %install-suffix "/"
> +                  ((compose string-drop-emacs store-directory->package-name)
> +                   store-item)))))

Rather:

  (string-drop-emacs (store-directory->package-name item))

IMO ‘compose’ makes things less readable in this case.

> +     ((compose (lambda (inputs) (alist-delete "emacs" inputs))
> +               (lambda (inputs) (alist-delete "source" inputs)))
> +      (delete-duplicates inputs-dirs)))

Rather:

  (fold alist-delete inputs '("emacs" "source"))

Did you try rebuilding Emacs packages, and to simplify those that
explicitly pass -L flags?

Thanks a lot for working on it!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Fri, 15 Dec 2017 20:36:01 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Fri, 15 Dec 2017 23:35:01 +0300
Oleg Pykhalov (2017-12-13 07:55 +0300) wrote:

> Hello Alex and Ludovic,
>
> Alex Kost <alezost <at> gmail.com> writes:
>
> [...]
>
>>> If ‘emacs-build-system’ sets ‘EMACSLOADPATH’ automatically, then
>>> individual package definitions won’t need those -L flags.  Dunno if
>>> there are good reasons not to do so.  Maybe Alex has an opinion?
>>
>> I would rather ask Federico who wrote ‘emacs-build-system’ :)
>
> Do you mean Federico Beffa <beffa <at> fbengineering.ch>?  He is quite in
> Guix git repository for 9 months as I see.  Is it a good idea to CC him?

Yeah, I meant this Federico.  I'm not sure if it is a good idea...,
probably..., I don't know :-)

-- 
Alex




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Fri, 15 Dec 2017 20:36:02 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Fri, 15 Dec 2017 23:35:17 +0300
Hello, I have only one addition to the Ludovic's comments.

Oleg Pykhalov (2017-12-15 12:36 +0300) wrote:

[...]
> +(define* (setup-environment #:key inputs #:allow-other-keys)
> +  "Export the variable EMACSLOADPATH, which are based on INPUTS respectively."
> +  (let* ((filtered-inputs (emacs-inputs inputs))
> +         (emacs-input-dir (cdr (assoc "emacs" filtered-inputs)))
> +         (inputs-dirs (cdr filtered-inputs)))
> +    ;; EMACSLOADPATH is where Emacs looks for the source code of the build's
> +    ;; dependencies.
> +    (setenv "EMACSLOADPATH"
> +            (string-append emacs-input-dir "/share/emacs/"
> +                           (store-directory->package-version emacs-input-dir)
> +                           "/lisp"))
> +    (for-each
> +     (lambda (input)
> +       (let ((store-item (cdr input)))
> +         (setenv "EMACSLOADPATH"
> +                 (string-append
> +                  (or (getenv "EMACSLOADPATH") "")
> +                  ":" store-item %install-suffix "/"
> +                  ((compose string-drop-emacs store-directory->package-name)
> +                   store-item)))))
> +     ((compose (lambda (inputs) (alist-delete "emacs" inputs))
> +               (lambda (inputs) (alist-delete "source" inputs)))

"emacs" and "source" may not be the only inputs that should be deleted.
For example, 'emacs-exwm-x' package also has "xhost" and "dbus" inputs.
And your 'string-drop-emacs' will fail on these names, right?

Since there is 'emacs-package?' function in this module, perhaps it
would be better to use it instead (to add only emacs packages to
EMACSLOADPATH), WDYT?

P.S.  Actually, I didn't test your patch, so maybe I just didn't
understand the code properly :-)

-- 
Alex




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Tue, 19 Dec 2017 10:49:01 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Alex Kost <alezost <at> gmail.com>, bug-guix <at> gnu.org, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 19 Dec 2017 13:46:56 +0300
[Message part 1 (text/plain, inline)]
Hello Ludovic,

Thank you for refactoring notes!

ludo <at> gnu.org (Ludovic Courtès) writes:

> I think it would have been better to open a separate issue for this.
> Here are some superficial comments.  I hope someone more knowledgeable
> about Emacs can comment.

OK, I CC bug-guix <at> gnu.org in this message.

Previos discussion: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28832#17

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

[...]

> Please see ‘C-x v l’ in that file for the syntax of commit logs.  :-)

Oh, nice tip.  Thanks!

[...]

> Did you try rebuilding Emacs packages, and to simplify those that
> explicitly pass -L flags?

I tried it on emacs-json-reformat which wants many -L flags and
succeeded build a manifest with following packages and patch:

  emacs-aggressive-indent emacs-company emacs-company-quickhelp
  emacs-debbugs emacs-elfeed emacs-erc-hl-nicks emacs-default-encrypt
  emacs-god-mode emacs-ggtags emacs-git-gutter emacs-gitpatch emacs-guix
  emacs-helm emacs-helm-make emacs-helm-projectile
  emacs-highlight-stages emacs-ivy emacs-markdown-mode
  emacs-multiple-cursors emacs-nix-mode emacs-org emacs-projectile
  emacs-rainbow-delimiters emacs-rainbow-mode emacs-slime
  emacs-smartparens emacs-transmission emacs-transpose-frame
  emacs-use-package emacs-w3m emacs-which-key emacs-yasnippet
  emacs-yasnippet-snippets flycheck geiser magit

[0001-emacs-build-system-Handle-EMACSLOADPATH-environment-.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Tue, 19 Dec 2017 10:50:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Tue, 19 Dec 2017 11:08:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Alex Kost <alezost <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 19 Dec 2017 14:07:05 +0300
[Message part 1 (text/plain, inline)]
Hello Alex,

Alex Kost <alezost <at> gmail.com> writes:

[...]

> "emacs" and "source" may not be the only inputs that should be deleted.
> For example, 'emacs-exwm-x' package also has "xhost" and "dbus" inputs.
> And your 'string-drop-emacs' will fail on these names, right?
>
> Since there is 'emacs-package?' function in this module, perhaps it
> would be better to use it instead (to add only emacs packages to
> EMACSLOADPATH), WDYT?

Yes, this is why I used 'emacs-inputs'.  It evaluates 'emacs-package?'
as I see.  So we peek only "/gnu/store/…-emacs-" packages.

[...]

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

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Tue, 19 Dec 2017 20:58:01 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 19 Dec 2017 23:57:33 +0300
Oleg Pykhalov (2017-12-19 13:46 +0300) wrote:

[...]
> +  (for-each (match-lambda
> +              ((name . input)
> +               (setenv "EMACSLOADPATH"
> +                       (string-append
> +                        (or (getenv "EMACSLOADPATH") "")
> +                        ":" input %install-suffix "/"
> +                        ((compose (lambda (name version)
> +                                    (string-append
> +                                     (string-drop name
> +                                                  (string-length "emacs-"))

I would move this code into its own 'string-drop-emacs' function (as you
did in the previous patch) and I would make it more robust: there is a
problem with this code: (string-drop "geiser" 6) does not return what
you mean, and (string-drop "dash" 6) errors!  I think we shouldn't rely
on the assumption that all emacs inputs have "emacs-" prefix, so I think
this procedure should check whether the input name begins with "emacs-"
before trying to remove this substring.

> +                                     "-" version))
> +                                  name+version)
> +                         input)))))
> +            (fold alist-delete (emacs-inputs inputs) '("emacs" "source")))

Since you already take only emacs inputs, is it really needed to remove
"emacs" and "source"?  I mean emacs inputs do not contain "emacs" and
"source" anyway, right?

-- 
Alex




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Wed, 20 Dec 2017 03:28:01 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Alex Kost <alezost <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Wed, 20 Dec 2017 06:26:54 +0300
[Message part 1 (text/plain, inline)]
Alex Kost <alezost <at> gmail.com> writes:

> and I would make it more robust: there is a
> problem with this code: (string-drop "geiser" 6) does not return what
> you mean

Yes, because "geiser" differs from most of Emacs packages:

    ls /gnu/store/7rl2k8ismmyq9ic6ha6vzv38a3hrrni2-emacs-dash-2.13.0/share/emacs/site-lisp/guix.d/dash-2.13.0/
    dash-autoloads.el  dash.el  dash.elc  dash-functional.el  dash-functional.elc

    ls /gnu/store/7lh77fmapmjjv3kj2q69dy58kjniw9am-geiser-0.9/share/emacs/site-lisp/
    geiser-autodoc.el    geiser-chibi.elc	…

Maybe we just need to fix "geiser"?

> , and (string-drop "dash" 6) errors!

Do you really mean emacs-dash or dash?  For me both succeeded.

As I see emacs-dash is OK, except "emacs-minimal" in EMACSLOADPATH.
Here is a log-file with DEBUG-INPUTS:
[vggdk813p8c82h7bjgwm5ghrl6r42a-emacs-dash-2.13.0.drv.bz2 (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
> I think we shouldn't rely on the assumption that all emacs inputs have
> "emacs-" prefix

Then, how to determine that a package is Emacs package?

> , so I think
> this procedure should check whether the input name begins with "emacs-"
> before trying to remove this substring.
>> +                                     "-" version))
>> +                                  name+version)
>> +                         input)))))
>> +            (fold alist-delete (emacs-inputs inputs) '("emacs" "source")))
>
> Since you already take only emacs inputs, is it really needed to remove
> "emacs" and "source"?  I mean emacs inputs do not contain "emacs" and
> "source" anyway, right?

emacs inputs contain "emacs-minimal" and "source".  So we actually need
to remove "emacs-minimal" instead "emacs".

    (emacs-inputs '(("emacs" . "/gnu/store/g1ldcr600kmdf2n1gsphk04hm30jr4bn-emacs-25.3")
                    ("emacs-minimal" . "/gnu/store/p4smq1mw13lmpkdbs59d7w827hy7mvgy-emacs-minimal-25.3")
                    ("emacs-dash" . "/gnu/store/dn7mygbi0pm985lz6qc64fsaz9f8zmfi-emacs-dash-2.13.0")
                    ("emacs-shut-up" . "/gnu/store/k0zddbwfwpdgj1ih2ypl50n09dfxhq1f-emacs-shut-up-0.3.2")
                    ("emacs-undercover" . "/gnu/store/ypcyxb3wpqlnf962k8ygp5csr6cmi6w3-emacs-undercover-0.6.0")
                    ("source" . "/gnu/store/gyxjrmhk4xqd8r78blxb92f9xc1z92fr-emacs-pos-tip-0.4.6.tar.gz")))

    (("emacs-minimal" . "/gnu/store/p4smq1mw13lmpkdbs59d7w827hy7mvgy-emacs-minimal-25.3")
     ("emacs-dash" . "/gnu/store/dn7mygbi0pm985lz6qc64fsaz9f8zmfi-emacs-dash-2.13.0")
     ("emacs-shut-up" . "/gnu/store/k0zddbwfwpdgj1ih2ypl50n09dfxhq1f-emacs-shut-up-0.3.2")
     ("emacs-undercover" . "/gnu/store/ypcyxb3wpqlnf962k8ygp5csr6cmi6w3-emacs-undercover-0.6.0")
     ("source" . "/gnu/store/gyxjrmhk4xqd8r78blxb92f9xc1z92fr-emacs-pos-tip-0.4.6.tar.gz"))

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

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Wed, 20 Dec 2017 22:11:02 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Thu, 21 Dec 2017 01:10:30 +0300
Oleg Pykhalov (2017-12-20 06:26 +0300) wrote:

> Alex Kost <alezost <at> gmail.com> writes:
>
>> and I would make it more robust: there is a
>> problem with this code: (string-drop "geiser" 6) does not return what
>> you mean
>
> Yes, because "geiser" differs from most of Emacs packages:
>
>     ls
> /gnu/store/7rl2k8ismmyq9ic6ha6vzv38a3hrrni2-emacs-dash-2.13.0/share/emacs/site-lisp/guix.d/dash-2.13.0/
>     dash-autoloads.el  dash.el  dash.elc  dash-functional.el  dash-functional.elc
>
>     ls /gnu/store/7lh77fmapmjjv3kj2q69dy58kjniw9am-geiser-0.9/share/emacs/site-lisp/
>     geiser-autodoc.el    geiser-chibi.elc	…
>
> Maybe we just need to fix "geiser"?

Sorry, I don't understand what you mean.  What is wrong with geiser and
why/how should it be fixed?

Also do other non-"emacs-" packages (magit, emms) have the same problem?

>> , and (string-drop "dash" 6) errors!
>
> Do you really mean emacs-dash or dash?  For me both succeeded.

I meant just "dash" name.

> As I see emacs-dash is OK, except "emacs-minimal" in EMACSLOADPATH.
> Here is a log-file with DEBUG-INPUTS:

No-no, I didn't mean that the build process of 'emacs-dash' would fail,
I meant that your code uses 'string-drop' and it may fail:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (string-drop "dash" 6)
ERROR: In procedure string-drop:
Value out of range 0 to 4: 6

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> 
--8<---------------cut here---------------end--------------->8---

All I wanted to say is that emacs inputs do not necessarily have
"emacs-" prefix.  For example, 'emacs-direnv' and 'emacs-ag' packages
have "dash" input, but not "emacs-dash".

But now I see that it's not a problem: I mistakenly thought that the
names are taken from the input names, but now I see they are extracted
from the store file names, so my above concern is not relevant :-)

>> I think we shouldn't rely on the assumption that all emacs inputs have
>> "emacs-" prefix
>
> Then, how to determine that a package is Emacs package?

I don't know :-)  'emacs-inputs' is probably the best way.

>> , so I think
>> this procedure should check whether the input name begins with "emacs-"
>> before trying to remove this substring.
>>> +                                     "-" version))
>>> +                                  name+version)
>>> +                         input)))))
>>> +            (fold alist-delete (emacs-inputs inputs) '("emacs" "source")))
>>
>> Since you already take only emacs inputs, is it really needed to remove
>> "emacs" and "source"?  I mean emacs inputs do not contain "emacs" and
>> "source" anyway, right?
>
> emacs inputs contain "emacs-minimal" and "source".
> So we actually need to remove "emacs-minimal" instead "emacs".

or maybe both? since some packages uses 'emacs' instead of
'emacs-minimal' (emacs-auctex, emacs-exwm, etc.).

-- 
Alex




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Thu, 21 Dec 2017 05:36:01 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Alex Kost <alezost <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Thu, 21 Dec 2017 07:48:27 +0300
[Message part 1 (text/plain, inline)]
Hello Alex,

Alex Kost <alezost <at> gmail.com> writes:

> Oleg Pykhalov (2017-12-20 06:26 +0300) wrote:

>> Yes, because "geiser" differs from most of Emacs packages:
>>
>>     ls
>> /gnu/store/7rl2k8ismmyq9ic6ha6vzv38a3hrrni2-emacs-dash-2.13.0/share/emacs/site-lisp/guix.d/dash-2.13.0/
>>     dash-autoloads.el  dash.el  dash.elc  dash-functional.el  dash-functional.elc
>>
>>     ls /gnu/store/7lh77fmapmjjv3kj2q69dy58kjniw9am-geiser-0.9/share/emacs/site-lisp/
>>     geiser-autodoc.el    geiser-chibi.elc	…
>>
>> Maybe we just need to fix "geiser"?
>
> Sorry, I don't understand what you mean.  What is wrong with geiser and
> why/how should it be fixed?

Elisp files of Geiser are in different place than others Emacs
packages.  There is no 'guix.d/geiser-0.9/'.

(for-each (match-lambda …) …) in 'setup-environment' will failed.

Either we need to handle this case specific for Geiser or just
change where it need to store Elisp files in 'geiser' package recipe.

> Also do other non-"emacs-" packages (magit, emms) have the same problem?

Hm,

    /gnu/store/k9zrrzpdw0mld0lqyackba3kwbw41ipr-emacs-emms-4.3/share/emacs/site-lisp/
    /gnu/store/zihybmvkccjb310fsxc2sad5j0w5vdi1-magit-2.11.0/share/emacs/stie-lisp/

it seems that it will be easier to handle a case without
'guix.d/PACKAGE-VERSION/'.

But I don't see a way to determine is magit an Emacs package, because
there is no "emacs-" prefix in "/gnu/store/…-magit-2.11.0".

'emacs-inputs' will not help.  See below.

>>> I think we shouldn't rely on the assumption that all emacs inputs have
>>> "emacs-" prefix
>>
>> Then, how to determine that a package is Emacs package?
>
> I don't know :-)  'emacs-inputs' is probably the best way.

No :-), it only relies on "emacs-" prefix in store.

emacs-inputs -> emacs-package? -> (string-prefix? "emacs-" name)

>> emacs inputs contain "emacs-minimal" and "source".
>> So we actually need to remove "emacs-minimal" instead "emacs".
>
> or maybe both? since some packages uses 'emacs' instead of
> 'emacs-minimal' (emacs-auctex, emacs-exwm, etc.).

Not both, because 'emacs-inputs' removes all inputs without "emacs-"
prefix, so 'emacs' too.

(emacs-inputs '(("emacs" . "/gnu/store/g1ldcr600kmdf2n1gsphk04hm30jr4bn-emacs-25.3")
                ("emacs-minimal" . "/gnu/store/p4smq1mw13lmpkdbs59d7w827hy7mvgy-emacs-minimal-25.3")))
$3 = (("emacs-minimal" . "/gnu/store/p4smq1mw13lmpkdbs59d7w827hy7mvgy-emacs-minimal-25.3"))

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

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Fri, 22 Dec 2017 20:21:01 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Fri, 22 Dec 2017 23:20:40 +0300
Oleg Pykhalov (2017-12-21 07:48 +0300) wrote:

> Hello Alex,
>
> Alex Kost <alezost <at> gmail.com> writes:
>
>> Oleg Pykhalov (2017-12-20 06:26 +0300) wrote:
[...]
>>> Maybe we just need to fix "geiser"?
>>
>> Sorry, I don't understand what you mean.  What is wrong with geiser and
>> why/how should it be fixed?
>
> Elisp files of Geiser are in different place than others Emacs
> packages.  There is no 'guix.d/geiser-0.9/'.

Oh, now I see what you mean.

> (for-each (match-lambda …) …) in 'setup-environment' will failed.
>
> Either we need to handle this case specific for Geiser or just
> change where it need to store Elisp files in 'geiser' package recipe.

It is not a specific Geiser case: installing *.el files in
"share/emacs/site-lisp/" is a common practice.  Actually, it is the
default place where automake wants to install elisp files (using
AM_PATH_LISPDIR macro), so whenever a package uses gnu-build-system,
most likely it will install elisp files to the site-lisp directory.  For
example, the following packages do this: bbdb, gettext, emms, magit,
emacs-wget, emacs-w3m, emacs-mmm-mode,...

>> Also do other non-"emacs-" packages (magit, emms) have the same problem?
>
> Hm,
>
>     /gnu/store/k9zrrzpdw0mld0lqyackba3kwbw41ipr-emacs-emms-4.3/share/emacs/site-lisp/
>     /gnu/store/zihybmvkccjb310fsxc2sad5j0w5vdi1-magit-2.11.0/share/emacs/stie-lisp/
>
> it seems that it will be easier to handle a case without
> 'guix.d/PACKAGE-VERSION/'.

I also think so, for example, 'emacs-inputs-el-directories' procedure
simply adds "/share/emacs/site-lisp" along with the "guix.d/..." directory.

[...]
>>>> I think we shouldn't rely on the assumption that all emacs inputs have
>>>> "emacs-" prefix
>>>
>>> Then, how to determine that a package is Emacs package?
>>
>> I don't know :-)  'emacs-inputs' is probably the best way.
>
> No :-), it only relies on "emacs-" prefix in store.
> emacs-inputs -> emacs-package? -> (string-prefix? "emacs-" name)

Yeah, I understand this.  I meant this is the best way we have at our
disposal.  I also don't know how to determine emacs packages without
"emacs-" prefix (well, maybe by looking for *.el files inside the
package store dir, not sure if it's suitable though).

>>> emacs inputs contain "emacs-minimal" and "source".
>>> So we actually need to remove "emacs-minimal" instead "emacs".
>>
>> or maybe both? since some packages uses 'emacs' instead of
>> 'emacs-minimal' (emacs-auctex, emacs-exwm, etc.).
>
> Not both, because 'emacs-inputs' removes all inputs without "emacs-"
> prefix, so 'emacs' too.

Oh right, sorry.

So to clarify the current situation, we have 2 problems:

1. 'emacs-package?' defines emacs package simply by checking "emacs-"
prefix, so it doesn't find such packages as magit or geiser.  This
problem does not relate directly to your patch; rather it is the problem
of the current 'emacs-build-system': if some emacs package depends on
'magit' or 'geiser' (currently there are no such packages),
emacs-build-system will not compile *.el files (because it will not find
'magit'/'geiser' needed for compilation).

2. Your patch handles only "/share/emacs/site-lisp/guix.d/<foo>/" but
not "/share/emacs/site-lisp/".

-- 
Alex




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Thu, 11 Jan 2018 21:47:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org, Alex Kost <alezost <at> gmail.com>
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Thu, 11 Jan 2018 22:46:29 +0100
Hi Oleg,

ludo <at> gnu.org (Ludovic Courtès) skribis:

> Oleg Pykhalov <go.wigust <at> gmail.com> skribis:
>
>> ludo <at> gnu.org (Ludovic Courtès) writes:

[...]

>> From d589de21acb02d0fba7aee3b48e5f42d7bd8957e Mon Sep 17 00:00:00 2001
>> From: Oleg Pykhalov <go.wigust <at> gmail.com>
>> Date: Tue, 12 Dec 2017 01:41:08 +0300
>> Subject: [PATCH] gnu: Add emacs-json-reformat.
>>
>> * gnu/packages/patches/emacs-json-reformat-fix-tests.patch: New file.
>> * gnu/local.mk (dist_patch_DATA): Add this.
>> * gnu/packages/emacs.scm (emacs-json-reformat): New variable.
>
> [...]
>
>> diff --git a/gnu/packages/patches/emacs-json-reformat-fix-tests.patch b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
>> new file mode 100644
>> index 000000000..23a239582
>> --- /dev/null
>> +++ b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
>> @@ -0,0 +1,28 @@
>> +Copyright © 2017 Oleg Pykhalov <go.wigust <at> gmail.com>
>> +
>> +This patch fixes tests for Emacs 25.
>
> Please mention <https://github.com/gongo/json-reformat/issues/33> here.
>
> OK with these changes!

We went on discussing other things and forgot about the patch.  :-)
Could you commit it with these changes, Oleg?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Mon, 15 Jan 2018 12:02:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 28832 <at> debbugs.gnu.org, 28832-done <at> debbugs.gnu.org,
 Alex Kost <alezost <at> gmail.com>
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Mon, 15 Jan 2018 15:01:01 +0300
[Message part 1 (text/plain, inline)]
Hello Ludovic,

ludo <at> gnu.org (Ludovic Courtès) writes:

[...]

>>> From d589de21acb02d0fba7aee3b48e5f42d7bd8957e Mon Sep 17 00:00:00 2001
>>> From: Oleg Pykhalov <go.wigust <at> gmail.com>
>>> Date: Tue, 12 Dec 2017 01:41:08 +0300
>>> Subject: [PATCH] gnu: Add emacs-json-reformat.
>>>
>>> * gnu/packages/patches/emacs-json-reformat-fix-tests.patch: New file.
>>> * gnu/local.mk (dist_patch_DATA): Add this.
>>> * gnu/packages/emacs.scm (emacs-json-reformat): New variable.
>>
>> [...]
>>
>>> diff --git a/gnu/packages/patches/emacs-json-reformat-fix-tests.patch b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
>>> new file mode 100644
>>> index 000000000..23a239582
>>> --- /dev/null
>>> +++ b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
>>> @@ -0,0 +1,28 @@
>>> +Copyright © 2017 Oleg Pykhalov <go.wigust <at> gmail.com>
>>> +
>>> +This patch fixes tests for Emacs 25.
>>
>> Please mention <https://github.com/gongo/json-reformat/issues/33> here.
>>
>> OK with these changes!
>
> We went on discussing other things and forgot about the patch.  :-)
> Could you commit it with these changes, Oleg?

I thought we suspend this until automation of "-L" flags.
Seems like a similar discussion[1] gets stuck too.
Pushed as b0912e9fdbffab15d9a754b2922778cfbd1fac2a

Also pushed emacs-json-mode as dd72837dff128dbb1258826fe39467d1ef000ac1

I'll close current bug report.

Footnotes: 
[1]  https://lists.nongnu.org/archive/html/guix-patches/2017-12/msg00640.html

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

Reply sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
You have taken responsibility. (Mon, 15 Jan 2018 12:02:02 GMT) Full text and rfc822 format available.

Notification sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
bug acknowledged by developer. (Mon, 15 Jan 2018 12:02:03 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Mon, 15 Jan 2018 13:34:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 28832 <at> debbugs.gnu.org, 28832-done <at> debbugs.gnu.org,
 Alex Kost <alezost <at> gmail.com>
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Mon, 15 Jan 2018 14:33:22 +0100
Hi Oleg,

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

> ludo <at> gnu.org (Ludovic Courtès) writes:
>
> [...]
>
>>>> From d589de21acb02d0fba7aee3b48e5f42d7bd8957e Mon Sep 17 00:00:00 2001
>>>> From: Oleg Pykhalov <go.wigust <at> gmail.com>
>>>> Date: Tue, 12 Dec 2017 01:41:08 +0300
>>>> Subject: [PATCH] gnu: Add emacs-json-reformat.
>>>>
>>>> * gnu/packages/patches/emacs-json-reformat-fix-tests.patch: New file.
>>>> * gnu/local.mk (dist_patch_DATA): Add this.
>>>> * gnu/packages/emacs.scm (emacs-json-reformat): New variable.
>>>
>>> [...]
>>>
>>>> diff --git a/gnu/packages/patches/emacs-json-reformat-fix-tests.patch b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
>>>> new file mode 100644
>>>> index 000000000..23a239582
>>>> --- /dev/null
>>>> +++ b/gnu/packages/patches/emacs-json-reformat-fix-tests.patch
>>>> @@ -0,0 +1,28 @@
>>>> +Copyright © 2017 Oleg Pykhalov <go.wigust <at> gmail.com>
>>>> +
>>>> +This patch fixes tests for Emacs 25.
>>>
>>> Please mention <https://github.com/gongo/json-reformat/issues/33> here.
>>>
>>> OK with these changes!
>>
>> We went on discussing other things and forgot about the patch.  :-)
>> Could you commit it with these changes, Oleg?
>
> I thought we suspend this until automation of "-L" flags.

No no, the “OK with these changes” above really means you can go ahead.
:-)

The “-L” discussion is about an improvement we should make, but it
should not block this patch.

> Seems like a similar discussion[1] gets stuck too.
> Pushed as b0912e9fdbffab15d9a754b2922778cfbd1fac2a

Yeah, though I don’t think you should wait for Alex or anyone else to
make a decision: if you have an idea on how to improve this, based on
these discussions, then you’re probably in a good position to do it and
everyone will be happy.  ;-)

> Also pushed emacs-json-mode as dd72837dff128dbb1258826fe39467d1ef000ac1

Great, thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Mon, 15 Jan 2018 13:34:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#28832; Package guix-patches. (Tue, 16 Jan 2018 17:33:02 GMT) Full text and rfc822 format available.

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

From: Alex Kost <alezost <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>, 28832 <at> debbugs.gnu.org
Subject: Re: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat.
Date: Tue, 16 Jan 2018 20:32:25 +0300
Ludovic Courtès (2018-01-15 14:33 +0100) wrote:

> Oleg Pykhalov <go.wigust <at> gmail.com> skribis:
[...]
>> I thought we suspend this until automation of "-L" flags.
>
> No no, the “OK with these changes” above really means you can go ahead.
> :-)
>
> The “-L” discussion is about an improvement we should make, but it
> should not block this patch.
>
>> Seems like a similar discussion[1] gets stuck too.
>> Pushed as b0912e9fdbffab15d9a754b2922778cfbd1fac2a
>
> Yeah, though I don’t think you should wait for Alex or anyone else to
> make a decision: if you have an idea on how to improve this, based on
> these discussions, then you’re probably in a good position to do it and
> everyone will be happy.  ;-)

I didn't think someone waits for me.  My last message was:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28832#71

and I wasn't going to write anything else until a reply.  To make it
clear: I don't mind any decision you make, I participated in this
discussion just because I was CC-ed.  Please, go on with whatever seems
appropriate to you.

-- 
Alex




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

This bug report was last modified 6 years and 44 days ago.

Previous Next


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