[PATCH 0/2] Update YASnippet, add snippet collection

  • Done
  • quality assurance status badge
Details
2 participants
  • Kyle Meyer
  • Ludovic Courtès
Owner
unassigned
Submitted by
Kyle Meyer
Severity
normal

Debbugs page

Kyle Meyer wrote 8 years ago
(address . guix-patches@gnu.org)(name . Kyle Meyer)(address . kyle@kyleam.com)
20170722225441.23024-1-kyle@kyleam.com
gnu: emacs-yasnippet: Upgrade to 0.12.0.
gnu: Add emacs-yasnippet-snippets.

gnu/packages/emacs.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 58 insertions(+), 2 deletions(-)

--
2.13.3
Kyle Meyer wrote 8 years ago
[PATCH 1/2] gnu: emacs-yasnippet: Upgrade to 0.12.0.
(address . 27793@debbugs.gnu.org)(name . Kyle Meyer)(address . kyle@kyleam.com)
20170722225703.23137-1-kyle@kyleam.com
* gnu/packages/emacs.scm (emacs-yasnippet): Upgrade to 0.12.0.
[source]: Remove an uninstalled directory from yas-snippet-dirs.
---
gnu/packages/emacs.scm | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 43de13057..c7b921480 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4160,7 +4160,7 @@ mode-line.")
(define-public emacs-yasnippet
(package
(name "emacs-yasnippet")
- (version "0.11.0")
+ (version "0.12.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/joaotavora/yasnippet/"
@@ -4168,7 +4168,18 @@ mode-line.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "15di6mkkf09b7qddpsrm0qln02hji3sx8blya5jxssi9wxxx9iq5"))))
+ "1yqiprighgqz1hsslph50cy09xxqabc06jffrnjcsdf6nj70xlkc"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; YASnippet expects a "snippets" subdirectory in the same
+ ;; directory as yasnippet.el, but we don't install it
+ ;; because it's a git submodule pointing to an external
+ ;; repository. Adjust `yas-snippet-dirs' to prevent
+ ;; warnings about a missing directory.
+ (substitute* "yasnippet.el"
+ (("^ +'yas-installed-snippets-dir\\)\\)\n")
+ "))\n"))))))
(build-system emacs-build-system)
(home-page "https://github.com/joaotavora/yasnippet")
(synopsis "Yet another snippet extension for Emacs")
--
2.13.3
Kyle Meyer wrote 8 years ago
[PATCH 2/2] gnu: Add emacs-yasnippet-snippets.
(address . 27793@debbugs.gnu.org)(name . Kyle Meyer)(address . kyle@kyleam.com)
20170722225703.23137-2-kyle@kyleam.com
* gnu/packages/emacs.scm (emacs-yasnippet-snippets): New variable.
---
gnu/packages/emacs.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index c7b921480..5f5b6fc2e 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4188,6 +4188,51 @@ mode-line.")
abbreviation and automatically expand it into function templates.")
(license license:gpl3+)))
+(define-public emacs-yasnippet-snippets
+ (let ((commit "885050d34737e2fb36a3e7759d60c09347bd4ce0")
+ (revision "1"))
+ (package
+ (name "emacs-yasnippet-snippets")
+ (version (string-append "1-" revision "." (string-take commit 8)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/AndreaCrotti/yasnippet-snippets")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1m935zgglw0iakzrixld5rcjz3wnj84f8wy2mvc3pggjri9l0qr9"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((ice-9 ftw)
+ (ice-9 regex)
+ (guix build utils))
+ #:builder
+ (begin
+ (use-modules (ice-9 ftw)
+ (ice-9 regex)
+ (guix build utils))
+ (with-directory-excursion (assoc-ref %build-inputs "source")
+ (for-each (lambda (dir)
+ (copy-recursively
+ dir
+ (string-append %output
+ "/share/emacs/yasnippet-snippets/"
+ dir)))
+ (scandir "." (lambda (fname)
+ (and (string-match "-mode$" fname)
+ (directory-exists? fname)))))))))
+ (home-page "https://github.com/AndreaCrotti/yasnippet-snippets")
+ (synopsis "Collection of YASnippet snippets for many languages")
+ (description
+ "Provides Andrea Crotti's collection of YASnippet snippets. After installation,
+the snippets will be in \"~/.guix-profile/share/emacs/yasnippet-snippets/\".
+To make YASnippet aware of these snippets, add the above directory to
+@code{yas-snippet-dirs}.")
+ (license license:expat))))
+
(define-public emacs-memoize
(package
(name "emacs-memoize")
--
2.13.3
Ludovic Courtès wrote 8 years ago
Re: [bug#27793] [PATCH 0/2] Update YASnippet, add snippet collection
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 27793-done@debbugs.gnu.org)
87fudbo1gt.fsf@gnu.org
Kyle Meyer <kyle@kyleam.com> skribis:

Toggle quote (6 lines)
> gnu: emacs-yasnippet: Upgrade to 0.12.0.
> gnu: Add emacs-yasnippet-snippets.
>
> gnu/packages/emacs.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 58 insertions(+), 2 deletions(-)

Applied both, thank you!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 27793@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 27793
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help