all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#30333] [PATCH] gnu: Add emacs-scratch-el.
@ 2018-02-03 10:47 Oleg Pykhalov
  2018-02-13 23:00 ` Marius Bakke
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Pykhalov @ 2018-02-03 10:47 UTC (permalink / raw)
  To: 30333

* gnu/packages/emacs.scm (emacs-scratch-el): New public variable.
---
 gnu/packages/emacs.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 9523f14da..69d18b060 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -6940,3 +6940,41 @@ navigation with the grails mode.")
 @code{org-tree-slide-mode} to enter the slideshow mode, and then @kbd{C->} and
 @kbd{C-<} to jump to the next and previous slide.")
       (license license:gpl3+))))
+
+(define-public emacs-scratch-el
+  (let ((commit "2cdf2b841ce7a0987093f65b0cc431947549f897")
+        (revision "1"))
+    (package
+      (name "emacs-scratch-el")
+      (version (string-append "1.2" revision "."
+                              (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/ieure/scratch-el.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "0wscsndynjmnliajqaz28r1ww81j8wh84zwaaswx51abhwgl0idf"))))
+      (build-system emacs-build-system)
+      (native-inputs
+       `(("texinfo" ,texinfo)))
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'install-doc
+             (lambda* (#:key outputs #:allow-other-keys)
+               (unless (invoke "makeinfo" "scratch.texi")
+                 (error "makeinfo failed"))
+               (install-file "scratch.info"
+                             (string-append (assoc-ref outputs "out")
+                                            "/share/info")))))))
+      (home-page "https://github.com/ieure/scratch-el/")
+      (synopsis "Create scratch buffers with the same mode current buffer")
+      (description "Scratch is an extension to Emacs that enables one to create
+scratch buffers that are in the same mode as the current buffer.  This is
+notably useful when working on code in some language; you may grab code into a
+scratch buffer, and, by virtue of this extension, do so using the Emacs
+formatting rules for that language.")
+      (license license:bsd-2))))
-- 
2.15.1

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

* [bug#30333] [PATCH] gnu: Add emacs-scratch-el.
  2018-02-03 10:47 [bug#30333] [PATCH] gnu: Add emacs-scratch-el Oleg Pykhalov
@ 2018-02-13 23:00 ` Marius Bakke
  2018-02-14 13:00   ` bug#30333: " Oleg Pykhalov
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2018-02-13 23:00 UTC (permalink / raw)
  To: Oleg Pykhalov, 30333

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

Oleg Pykhalov <go.wigust@gmail.com> writes:

> * gnu/packages/emacs.scm (emacs-scratch-el): New public variable.

[...]

> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
> index 9523f14da..69d18b060 100644
> --- a/gnu/packages/emacs.scm
> +++ b/gnu/packages/emacs.scm
> @@ -6940,3 +6940,41 @@ navigation with the grails mode.")
>  @code{org-tree-slide-mode} to enter the slideshow mode, and then @kbd{C->} and
>  @kbd{C-<} to jump to the next and previous slide.")
>        (license license:gpl3+))))
> +
> +(define-public emacs-scratch-el
> +  (let ((commit "2cdf2b841ce7a0987093f65b0cc431947549f897")
> +        (revision "1"))
> +    (package
> +      (name "emacs-scratch-el")
> +      (version (string-append "1.2" revision "."
> +                              (string-take commit 7)))

You can use (git-version "1.2" revision commit) here.

(by the way, where does 1.2 come from?)

> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/ieure/scratch-el.git")
> +                      (commit commit)))
> +                (file-name (string-append name "-" version "-checkout"))

Similarly, prefer (git-file-name ...).

> +                (sha256
> +                 (base32
> +                  "0wscsndynjmnliajqaz28r1ww81j8wh84zwaaswx51abhwgl0idf"))))
> +      (build-system emacs-build-system)
> +      (native-inputs
> +       `(("texinfo" ,texinfo)))
> +      (arguments
> +       '(#:phases
> +         (modify-phases %standard-phases
> +           (add-after 'install 'install-doc
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               (unless (invoke "makeinfo" "scratch.texi")
> +                 (error "makeinfo failed"))
> +               (install-file "scratch.info"
> +                             (string-append (assoc-ref outputs "out")
> +                                            "/share/info")))))))

(install-file ...) has an unspecified return value, so return #t here.

> +      (home-page "https://github.com/ieure/scratch-el/")
> +      (synopsis "Create scratch buffers with the same mode current buffer")

s/same mode/same mode as/

Other than that LGTM.

> +      (description "Scratch is an extension to Emacs that enables one to create
> +scratch buffers that are in the same mode as the current buffer.  This is
> +notably useful when working on code in some language; you may grab code into a
> +scratch buffer, and, by virtue of this extension, do so using the Emacs
> +formatting rules for that language.")
> +      (license license:bsd-2))))
> -- 
> 2.15.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#30333: [PATCH] gnu: Add emacs-scratch-el.
  2018-02-13 23:00 ` Marius Bakke
@ 2018-02-14 13:00   ` Oleg Pykhalov
  0 siblings, 0 replies; 3+ messages in thread
From: Oleg Pykhalov @ 2018-02-14 13:00 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 30333, 30333-done

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

Marius Bakke <mbakke@fastmail.com> writes:

> Oleg Pykhalov <go.wigust@gmail.com> writes:
>
>> * gnu/packages/emacs.scm (emacs-scratch-el): New public variable.
>
> [...]
>
>> diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
>> index 9523f14da..69d18b060 100644
>> --- a/gnu/packages/emacs.scm
>> +++ b/gnu/packages/emacs.scm
>> @@ -6940,3 +6940,41 @@ navigation with the grails mode.")
>>  @code{org-tree-slide-mode} to enter the slideshow mode, and then @kbd{C->} and
>>  @kbd{C-<} to jump to the next and previous slide.")
>>        (license license:gpl3+))))
>> +
>> +(define-public emacs-scratch-el
>> +  (let ((commit "2cdf2b841ce7a0987093f65b0cc431947549f897")
>> +        (revision "1"))
>> +    (package
>> +      (name "emacs-scratch-el")
>> +      (version (string-append "1.2" revision "."
>> +                              (string-take commit 7)))
>
> You can use (git-version "1.2" revision commit) here.

OK.

> (by the way, where does 1.2 come from?)

https://github.com/ieure/scratch-el/blob/master/scratch.el#L4

>> +      (source (origin
>> +                (method git-fetch)
>> +                (uri (git-reference
>> +                      (url "https://github.com/ieure/scratch-el.git")
>> +                      (commit commit)))
>> +                (file-name (string-append name "-" version "-checkout"))
>
> Similarly, prefer (git-file-name ...).

OK.

>> +                (sha256
>> +                 (base32
>> +                  "0wscsndynjmnliajqaz28r1ww81j8wh84zwaaswx51abhwgl0idf"))))
>> +      (build-system emacs-build-system)
>> +      (native-inputs
>> +       `(("texinfo" ,texinfo)))
>> +      (arguments
>> +       '(#:phases
>> +         (modify-phases %standard-phases
>> +           (add-after 'install 'install-doc
>> +             (lambda* (#:key outputs #:allow-other-keys)
>> +               (unless (invoke "makeinfo" "scratch.texi")
>> +                 (error "makeinfo failed"))
>> +               (install-file "scratch.info"
>> +                             (string-append (assoc-ref outputs "out")
>> +                                            "/share/info")))))))
>
> (install-file ...) has an unspecified return value, so return #t here.

OK.

>> +      (home-page "https://github.com/ieure/scratch-el/")
>> +      (synopsis "Create scratch buffers with the same mode current buffer")
>
> s/same mode/same mode as/

OK.

> Other than that LGTM.

Pushed as ac07b94ab53fb13bb56ea876a5143985e6dfaf11

I'll close the bug report.

Thanks,
Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2018-02-14 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-03 10:47 [bug#30333] [PATCH] gnu: Add emacs-scratch-el Oleg Pykhalov
2018-02-13 23:00 ` Marius Bakke
2018-02-14 13:00   ` bug#30333: " Oleg Pykhalov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.