unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#32614] [PATCH] emacs-irony-mode
@ 2018-09-02 19:16 Tim Gesthuizen
  2018-09-03 21:36 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Gesthuizen @ 2018-09-02 19:16 UTC (permalink / raw)
  To: 32614

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

Hi,

The attached patch adds emacs-irony-mode.
It is also packaged in MELPA so it is definitely free software.
If there are problems with the description or synopsis just let me know
and I will change the patch accordingly.

Best regards,
Tim Gesthuizen

[-- Attachment #2: 0001-gnu-Add-emacs-irony-mode.patch --]
[-- Type: text/x-patch, Size: 3603 bytes --]

From 6975ba9e4b005c77f00d7f2187b5d8047f15ba07 Mon Sep 17 00:00:00 2001
From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
Date: Thu, 30 Aug 2018 17:39:57 +0200
Subject: [PATCH] gnu: Add emacs-irony-mode

---
 gnu/packages/emacs.scm | 49 ++++++++++++++++++++++++++++++++++++------
 1 file changed, 43 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 08554280c..1ef5ebde5 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -63,6 +63,7 @@
   #:use-module (guix monads)
   #:use-module (guix store)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system trivial)
@@ -84,6 +85,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages lesstif)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages version-control)
@@ -2724,6 +2726,41 @@ front-ends.  Company comes with many back-ends, e.g. @code{company-elisp}.
 These are distributed in separate files and can be used individually.")
     (license license:gpl3+)))
 
+(define-public emacs-irony-mode
+  (package
+    (name "emacs-irony-mode")
+    (version "1.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/Sarcasm/irony-mode/archive/v"
+                                  version ".tar.gz"))
+              (sha256 (base32 "1f68zi0glkg2aly66s07rx3w0b0hdi1znxan02h6dbabaadylk99"))))
+    (build-system emacs-build-system)
+    (arguments '())
+    (propagated-inputs
+     `(("emacs-irony-mode-server" ,emacs-irony-mode-server)))
+    (home-page "https://github.com/Sarcasm/irony-mode")
+    (synopsis "Clang autocompletion and syntax checking integration for GNU Emacs")
+    (description "Provides clang assisted syntax checking and autocompletion
+ for C,C++ and ObjC.")
+    (license license:gpl3)))
+
+(define-public emacs-irony-mode-server
+  (package (inherit emacs-irony-mode)
+    (name "emacs-irony-mode-server")
+    (propagated-inputs
+     `(("clang" ,clang)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (invoke "cmake"
+                       "server"
+                       (string-append "-DCMAKE_INSTALL_PREFIX=" out))))))))
+    (build-system cmake-build-system)))
+
 (define-public emacs-company-quickhelp
   (package
     (name "emacs-company-quickhelp")
@@ -8048,13 +8085,13 @@ Anzu.zim.")
     (name "emacs-emmet-mode")
     (version "1.0.8")
     (source (origin
-	      (method url-fetch)
-	      (uri (string-append "https://github.com/smihica/emmet-mode"
-				  "/archive/" version ".tar.gz"))
+              (method url-fetch)
+              (uri (string-append "https://github.com/smihica/emmet-mode"
+                                  "/archive/" version ".tar.gz"))
               (file-name (string-append name "-" version ".tar.gz"))
-	      (sha256
-	       (base32
-		"0g3p22yabfcp98cfv9dgl9il2m2pd53isq2q11vb3s7qyn31f7zj"))))
+              (sha256
+               (base32
+                "0g3p22yabfcp98cfv9dgl9il2m2pd53isq2q11vb3s7qyn31f7zj"))))
     (build-system emacs-build-system)
     (home-page "https://github.com/smihica/emmet-mode")
     (synopsis "Unofficial Emmet's support for Emacs")
-- 
2.18.0


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

* [bug#32614] [PATCH] emacs-irony-mode
  2018-09-02 19:16 [bug#32614] [PATCH] emacs-irony-mode Tim Gesthuizen
@ 2018-09-03 21:36 ` Ludovic Courtès
  2018-09-04 18:31   ` Tim Gesthuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2018-09-03 21:36 UTC (permalink / raw)
  To: Tim Gesthuizen; +Cc: 32614

Hello Tim,

Tim Gesthuizen <tim.gesthuizen@yahoo.de> skribis:

> The attached patch adds emacs-irony-mode.
> It is also packaged in MELPA so it is definitely free software.
> If there are problems with the description or synopsis just let me know
> and I will change the patch accordingly.

Thanks for the patch!  I have some suggestions and comments below, but
overall it LGTM:

> From 6975ba9e4b005c77f00d7f2187b5d8047f15ba07 Mon Sep 17 00:00:00 2001
> From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
> Date: Thu, 30 Aug 2018 17:39:57 +0200
> Subject: [PATCH] gnu: Add emacs-irony-mode
>
> ---
>  gnu/packages/emacs.scm | 49 ++++++++++++++++++++++++++++++++++++------

Please run ‘git log gnu/packages/emacs.scm’ to see our conventions for
commit logs, or see
<https://www.gnu.org/prep/standards/html_node/Change-Logs.html>.  (We can
always fix it up for you though, it’s no big deal.)

> +    (home-page "https://github.com/Sarcasm/irony-mode")
> +    (synopsis "Clang autocompletion and syntax checking integration for GNU Emacs")

It’s a bit long.  Perhaps: “Code completion and syntax checks for Emacs”?

> +    (description "Provides clang assisted syntax checking and autocompletion
> + for C,C++ and ObjC.")

Please make a full sentence, as per
<https://www.gnu.org/software/guix/manual/en/html_node/Synopses-and-Descriptions.html>.

> +    (license license:gpl3)))

Isn’t it ‘gpl3+’, meaning “version 3 or any later version, at your
option”?

> +(define-public emacs-irony-mode-server
> +  (package (inherit emacs-irony-mode)
> +    (name "emacs-irony-mode-server")
> +    (propagated-inputs
> +     `(("clang" ,clang)))

Instead of propagating Clang, which clutters the user’s profile, do you
think we could patch the .el files such that they refer to ‘clang’ by
its absolute file name?  See ‘emacs-emms’ for an example of that.

> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'configure
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out")))
> +               (invoke "cmake"
> +                       "server"
> +                       (string-append "-DCMAKE_INSTALL_PREFIX=" out))))))))

Please return #t at the end of the phase.

>      (source (origin
> -	      (method url-fetch)
> -	      (uri (string-append "https://github.com/smihica/emmet-mode"
> -				  "/archive/" version ".tar.gz"))
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/smihica/emmet-mode"
> +                                  "/archive/" version ".tar.gz"))
>                (file-name (string-append name "-" version ".tar.gz"))
> -	      (sha256
> -	       (base32
> -		"0g3p22yabfcp98cfv9dgl9il2m2pd53isq2q11vb3s7qyn31f7zj"))))
> +              (sha256
> +               (base32
> +                "0g3p22yabfcp98cfv9dgl9il2m2pd53isq2q11vb3s7qyn31f7zj"))))

This change is unnecessary and unrelated; could you remove it?

Could you send an updated patch?

Thank you!

Ludo’.

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

* [bug#32614] [PATCH] emacs-irony-mode
  2018-09-03 21:36 ` Ludovic Courtès
@ 2018-09-04 18:31   ` Tim Gesthuizen
  2018-09-11 15:06     ` bug#32614: " Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Gesthuizen @ 2018-09-04 18:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32614


[-- Attachment #1.1.1: Type: text/plain, Size: 3753 bytes --]

On 03.09.2018 23:36, Ludovic Courtès wrote:
> Hello Tim,
> 
> Tim Gesthuizen <tim.gesthuizen@yahoo.de> skribis:
> 
>> The attached patch adds emacs-irony-mode.
>> It is also packaged in MELPA so it is definitely free software.
>> If there are problems with the description or synopsis just let me know
>> and I will change the patch accordingly.
> 
> Thanks for the patch!  I have some suggestions and comments below, but
> overall it LGTM:
> 
>> From 6975ba9e4b005c77f00d7f2187b5d8047f15ba07 Mon Sep 17 00:00:00 2001
>> From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
>> Date: Thu, 30 Aug 2018 17:39:57 +0200
>> Subject: [PATCH] gnu: Add emacs-irony-mode
>>
>> ---
>>  gnu/packages/emacs.scm | 49 ++++++++++++++++++++++++++++++++++++------
> 
> Please run ‘git log gnu/packages/emacs.scm’ to see our conventions for
> commit logs, or see
> <https://www.gnu.org/prep/standards/html_node/Change-Logs.html>.  (We can
> always fix it up for you though, it’s no big deal.)
> 
>> +    (home-page "https://github.com/Sarcasm/irony-mode")
>> +    (synopsis "Clang autocompletion and syntax checking integration for GNU Emacs")
> 
> It’s a bit long.  Perhaps: “Code completion and syntax checks for Emacs”?
> 
>> +    (description "Provides clang assisted syntax checking and autocompletion
>> + for C,C++ and ObjC.")
> 
> Please make a full sentence, as per
> <https://www.gnu.org/software/guix/manual/en/html_node/Synopses-and-Descriptions.html>.
> 
>> +    (license license:gpl3)))
> 
> Isn’t it ‘gpl3+’, meaning “version 3 or any later version, at your
> option”?
> 
>> +(define-public emacs-irony-mode-server
>> +  (package (inherit emacs-irony-mode)
>> +    (name "emacs-irony-mode-server")
>> +    (propagated-inputs
>> +     `(("clang" ,clang)))
> 
> Instead of propagating Clang, which clutters the user’s profile, do you
> think we could patch the .el files such that they refer to ‘clang’ by
> its absolute file name?  See ‘emacs-emms’ for an example of that.
> 
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (replace 'configure
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let ((out (assoc-ref outputs "out")))
>> +               (invoke "cmake"
>> +                       "server"
>> +                       (string-append "-DCMAKE_INSTALL_PREFIX=" out))))))))
> 
> Please return #t at the end of the phase.
> 
>>      (source (origin
>> -	      (method url-fetch)
>> -	      (uri (string-append "https://github.com/smihica/emmet-mode"
>> -				  "/archive/" version ".tar.gz"))
>> +              (method url-fetch)
>> +              (uri (string-append "https://github.com/smihica/emmet-mode"
>> +                                  "/archive/" version ".tar.gz"))
>>                (file-name (string-append name "-" version ".tar.gz"))
>> -	      (sha256
>> -	       (base32
>> -		"0g3p22yabfcp98cfv9dgl9il2m2pd53isq2q11vb3s7qyn31f7zj"))))
>> +              (sha256
>> +               (base32
>> +                "0g3p22yabfcp98cfv9dgl9il2m2pd53isq2q11vb3s7qyn31f7zj"))))
> 
> This change is unnecessary and unrelated; could you remove it?
> 
> Could you send an updated patch?
> 
> Thank you!
> 
> Ludo’.
> 

Thank you for your suggestions.
Changed patch accordingly.
clang is used via libclang from emacs-irony-mode-server which is linked
dynamically. Because of this I could just set the propagated-input to a
normal input. It is linked automatically to the version in /gnu/store.
Because of some weird  problems I had today with building guix from git
I could not verify the patch.
Please check that it is working before pushing it.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-gnu-Add-emacs-irony-mode.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-emacs-irony-mode.patch", Size: 3209 bytes --]

From 25fdd949db264836f47abcad13f3e8594262b300 Mon Sep 17 00:00:00 2001
From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
Date: Thu, 30 Aug 2018 17:39:57 +0200
Subject: [PATCH] gnu: Add emacs-irony-mode.

* gnu/packages/emacs.scm (emacs-irony-mode): New variable.
* gnu/packages/emacs.scm (emacs-irony-mode-server): New variable.
---
 gnu/packages/emacs.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 8f0c564f8..3404937dc 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -63,6 +63,7 @@
   #:use-module (guix monads)
   #:use-module (guix store)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system trivial)
@@ -84,6 +85,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages lesstif)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages version-control)
@@ -2724,6 +2726,45 @@ front-ends.  Company comes with many back-ends, e.g. @code{company-elisp}.
 These are distributed in separate files and can be used individually.")
     (license license:gpl3+)))
 
+(define-public emacs-irony-mode
+  (package
+    (name "emacs-irony-mode")
+    (version "1.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/Sarcasm/irony-mode/archive/v"
+                                  version ".tar.gz"))
+              (sha256 (base32 "1f68zi0glkg2aly66s07rx3w0b0hdi1znxan02h6dbabaadylk99"))))
+    (build-system emacs-build-system)
+    (arguments '())
+    (propagated-inputs
+     `(("emacs-irony-mode-server" ,emacs-irony-mode-server)))
+    (home-page "https://github.com/Sarcasm/irony-mode")
+    (synopsis "C/C++/ObjC Code completion and syntax checks for Emacs")
+    (description "Provides @code{clang} assisted syntax checking and
+autocompletion for C,C++ and ObjC in GNU Emacs.  Using @code{libclang} it can
+provide syntax checking and autocompletion on compiler level which is very
+resistent against false positives.  It also integrates well with other
+packages like @code{eldoc-mode} and especially @code{company-mode} as
+described on the homepage.")
+    (license license:gpl3+)))
+
+(define-public emacs-irony-mode-server
+  (package (inherit emacs-irony-mode)
+    (name "emacs-irony-mode-server")
+    (inputs
+     `(("clang" ,clang)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (invoke "cmake"
+                       "server"
+                       (string-append "-DCMAKE_INSTALL_PREFIX=" out)) #t))))))
+    (build-system cmake-build-system)))
+
 (define-public emacs-company-quickhelp
   (package
     (name "emacs-company-quickhelp")
-- 
2.18.0


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#32614: [PATCH] emacs-irony-mode
  2018-09-04 18:31   ` Tim Gesthuizen
@ 2018-09-11 15:06     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2018-09-11 15:06 UTC (permalink / raw)
  To: Tim Gesthuizen; +Cc: 32614-done

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

Hi Tim,

Tim Gesthuizen <tim.gesthuizen@yahoo.de> skribis:

> clang is used via libclang from emacs-irony-mode-server which is linked
> dynamically. Because of this I could just set the propagated-input to a
> normal input. It is linked automatically to the version in /gnu/store.
> Because of some weird  problems I had today with building guix from git
> I could not verify the patch.
> Please check that it is working before pushing it.

I checked that it built fine.  I tried actually using it from:

  ./pre-inst-env guix environment --ad-hoc --pure \
     emacs emacs-irony-mode coreutils -- emacs -Q

However, I don’t really know how it’s supposed to be used and didn’t
want to spend too much time investigating.

> From 25fdd949db264836f47abcad13f3e8594262b300 Mon Sep 17 00:00:00 2001
> From: Tim Gesthuizen <tim.gesthuizen@yahoo.de>
> Date: Thu, 30 Aug 2018 17:39:57 +0200
> Subject: [PATCH] gnu: Add emacs-irony-mode.
>
> * gnu/packages/emacs.scm (emacs-irony-mode): New variable.
> * gnu/packages/emacs.scm (emacs-irony-mode-server): New variable.

Applied with the changes below.

Please let me know if anything is amiss.

Thank you, and apologies for the delay!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2343 bytes --]

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 57691b299..47c7685e9 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -2736,19 +2736,21 @@ These are distributed in separate files and can be used individually.")
   (package
     (name "emacs-irony-mode")
     (version "1.2.0")
+    (home-page "https://github.com/Sarcasm/irony-mode")
     (source (origin
               (method url-fetch)
-              (uri (string-append "https://github.com/Sarcasm/irony-mode/archive/v"
-                                  version ".tar.gz"))
-              (sha256 (base32 "1f68zi0glkg2aly66s07rx3w0b0hdi1znxan02h6dbabaadylk99"))))
+              (uri (string-append home-page "/archive/v" version ".tar.gz"))
+              (sha256
+               (base32
+                "1f68zi0glkg2aly66s07rx3w0b0hdi1znxan02h6dbabaadylk99"))
+              (file-name (string-append name "-" version ".tar.gz"))))
     (build-system emacs-build-system)
     (arguments '())
     (propagated-inputs
      `(("emacs-irony-mode-server" ,emacs-irony-mode-server)))
-    (home-page "https://github.com/Sarcasm/irony-mode")
     (synopsis "C/C++/ObjC Code completion and syntax checks for Emacs")
-    (description "Provides @code{clang} assisted syntax checking and
-autocompletion for C,C++ and ObjC in GNU Emacs.  Using @code{libclang} it can
+    (description "Irony-mode provides Clang-assisted syntax checking and
+completion for C, C++, and ObjC in GNU Emacs.  Using @code{libclang} it can
 provide syntax checking and autocompletion on compiler level which is very
 resistent against false positives.  It also integrates well with other
 packages like @code{eldoc-mode} and especially @code{company-mode} as
@@ -2760,6 +2762,7 @@ described on the homepage.")
     (name "emacs-irony-mode-server")
     (inputs
      `(("clang" ,clang)))
+    (propagated-inputs '())
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -2769,7 +2772,8 @@ described on the homepage.")
                (invoke "cmake"
                        "server"
                        (string-append "-DCMAKE_INSTALL_PREFIX=" out)) #t))))))
-    (build-system cmake-build-system)))
+    (build-system cmake-build-system)
+    (synopsis "Server for the Emacs @dfn{irony mode}")))
 
 (define-public emacs-company-quickhelp
   (package

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

end of thread, other threads:[~2018-09-11 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-02 19:16 [bug#32614] [PATCH] emacs-irony-mode Tim Gesthuizen
2018-09-03 21:36 ` Ludovic Courtès
2018-09-04 18:31   ` Tim Gesthuizen
2018-09-11 15:06     ` bug#32614: " Ludovic Courtès

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