unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28010] [PATCH] gnu: Add emacs-engine-mode.
@ 2017-08-08 10:14 Oleg Pykhalov
  2017-08-10  9:38 ` Arun Isaac
  0 siblings, 1 reply; 7+ messages in thread
From: Oleg Pykhalov @ 2017-08-08 10:14 UTC (permalink / raw)
  To: 28010

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: [PATCH] gnu: Add emacs-engine-mode. --]
[-- Type: text/x-patch, Size: 2066 bytes --]

From 74039e61a71cae09fa0ae0f4a2debcdddb8f6118 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Tue, 8 Aug 2017 13:00:18 +0300
Subject: [PATCH] gnu: Add emacs-engine-mode.

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

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 3821d18d4..427f3fc3e 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5272,3 +5272,34 @@ user easy handle git-format patch without exit Emacs.
 commit message for the current line.  This uses the git-blame tool
 internally.")
     (license license:gpl3+)))
+
+(define-public emacs-engine-mode
+  (package
+    (name "emacs-engine-mode")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/hrs/engine-mode/archive/"
+                                  "v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1vm4p7pcp1vnwwxvps1bhm7i7hkabqqxl898knxf2hqvxys76684"))))
+    (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'documents
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (documents (string-append out "/share/doc")))
+               (for-each (lambda (file)
+                           (install-file file documents))
+                         '("README.md" "doc/demo.gif")))
+             #t)))))
+    (synopsis "Minor mode for defining and querying search engines")
+    (description "@code{engine-mode} is a global minor mode for Emacs.  It
+enables you to easily define search engines, bind them to keybindings, and
+query them from the comfort of your editor.")
+    (home-page "https://github.com/hrs/engine-mode")
+    (license license:gpl3+)))
-- 
2.14.0


[-- Attachment #2: Type: text/plain, Size: 817 bytes --]


Hello Guix, this is a config (inspired by Spacemacs) which I use to get
“M-x engine/search-wikipedia” like searches.

(use-package engine-mode
  :init
  (progn
    (setq search-engine-alist
	  '((duck-duck-go
	     :name "Duck Duck Go"
	     :url "https://duckduckgo.com/?q=%s")
	    (wikipedia
	     :name "Wikipedia"
	     :url "http://www.wikipedia.org/search-redirect.php?language=en&go=Go&search=%s")))
    (dolist (engine search-engine-alist)
      (let ((func (intern (format "engine/search-%S" (car engine)))))
	(autoload func "engine-mode" nil 'interactive))))
  :config
  (progn
    (engine-mode t)
    (dolist (engine search-engine-alist)
      (let* ((cur-engine (car engine))
	     (engine-url (plist-get (cdr engine) :url)))
	(eval `(defengine ,cur-engine ,engine-url))))))

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

* [bug#28010] [PATCH] gnu: Add emacs-engine-mode.
  2017-08-08 10:14 [bug#28010] [PATCH] gnu: Add emacs-engine-mode Oleg Pykhalov
@ 2017-08-10  9:38 ` Arun Isaac
  2017-08-10 11:09   ` Oleg Pykhalov
  0 siblings, 1 reply; 7+ messages in thread
From: Arun Isaac @ 2017-08-10  9:38 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28010


Thanks for the patch!

> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'documents
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (documents (string-append out "/share/doc")))
> +               (for-each (lambda (file)
> +                           (install-file file documents))
> +                         '("README.md" "doc/demo.gif")))
> +             #t)))))

I think we shouldn't install documentation. A markdown README, IMHO, is
not much of a documentation. No other package does this. WDYT?

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

* [bug#28010] [PATCH] gnu: Add emacs-engine-mode.
  2017-08-10  9:38 ` Arun Isaac
@ 2017-08-10 11:09   ` Oleg Pykhalov
  2017-08-10 12:07     ` Arun Isaac
  0 siblings, 1 reply; 7+ messages in thread
From: Oleg Pykhalov @ 2017-08-10 11:09 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28010

Hello Arun,

Thanks for review!

Arun Isaac <arunisaac@systemreboot.net> writes:

> Thanks for the patch!
>
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'install 'documents
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let* ((out (assoc-ref outputs "out"))
>> +                    (documents (string-append out "/share/doc")))
>> +               (for-each (lambda (file)
>> +                           (install-file file documents))
>> +                         '("README.md" "doc/demo.gif")))
>> +             #t)))))
>
> I think we shouldn't install documentation. A markdown README, IMHO, is
> not much of a documentation. No other package does this. WDYT?

Personally, I usually read README, even if it's not presented in
package, but on home-page, because it helps me to configure quickly.
So, maybe we could have them or convert them in “info” or something?

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

* [bug#28010] [PATCH] gnu: Add emacs-engine-mode.
  2017-08-10 11:09   ` Oleg Pykhalov
@ 2017-08-10 12:07     ` Arun Isaac
  2017-08-10 14:08       ` Oleg Pykhalov
  0 siblings, 1 reply; 7+ messages in thread
From: Arun Isaac @ 2017-08-10 12:07 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28010


>> I think we shouldn't install documentation. A markdown README, IMHO, is
>> not much of a documentation. No other package does this. WDYT?
>
> Personally, I usually read README, even if it's not presented in
> package, but on home-page, because it helps me to configure quickly.

Yes, I do read the README too, but only from the project's website.

> So, maybe we could have them or convert them in “info” or something?

That would be nice! But, how do we do that? My guess is that we'll have
to contact upstream, and ask them to create "an info file". Is there
some other way?

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

* [bug#28010] [PATCH] gnu: Add emacs-engine-mode.
  2017-08-10 12:07     ` Arun Isaac
@ 2017-08-10 14:08       ` Oleg Pykhalov
  2017-08-10 16:33         ` Arun Isaac
  2017-08-10 17:08         ` bug#28010: " Arun Isaac
  0 siblings, 2 replies; 7+ messages in thread
From: Oleg Pykhalov @ 2017-08-10 14:08 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 28010

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

Arun Isaac <arunisaac@systemreboot.net> writes:

>>> I think we shouldn't install documentation. A markdown README, IMHO, is
>>> not much of a documentation. No other package does this. WDYT?

By the way while I tried to find a way to convert Markdown to texinfo or
info I found “/gnu/store/…-markdown-1.0.1/share/doc/README”.

Also gives many of README
--8<---------------cut here---------------start------------->8---
find /gnu/store -name README
--8<---------------cut here---------------end--------------->8---

>> Personally, I usually read README, even if it's not presented in
>> package, but on home-page, because it helps me to configure quickly.
>
> Yes, I do read the README too, but only from the project's website.
>
>> So, maybe we could have them or convert them in “info” or something?
>
> That would be nice! But, how do we do that? My guess is that we'll have
> to contact upstream, and ask them to create "an info file". Is there
> some other way?

I don't think it will be possible to contact every maintainer (for other
packages).  And I didn't find a tool to convert, too.  As I understand
it preferably needs to be written in Guile or C.  There are famous
things like Pandoc which will pull all Haskell or whatever language.
Obvios over powered for Emacs packages.

So, if you don't think it's proper for Guix, then here is a patch
without README.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-engine-mode.patch --]
[-- Type: text/x-patch, Size: 1585 bytes --]

From 30262df6eb0abfd6f16e408b71c0cb7ecac29356 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Tue, 8 Aug 2017 13:00:18 +0300
Subject: [PATCH] gnu: Add emacs-engine-mode.

* gnu/packages/emacs.scm (emacs-engine-mode): 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 3821d18d4..228b64103 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -5272,3 +5272,23 @@ user easy handle git-format patch without exit Emacs.
 commit message for the current line.  This uses the git-blame tool
 internally.")
     (license license:gpl3+)))
+
+(define-public emacs-engine-mode
+  (package
+    (name "emacs-engine-mode")
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/hrs/engine-mode/archive/"
+                                  "v" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1vm4p7pcp1vnwwxvps1bhm7i7hkabqqxl898knxf2hqvxys76684"))))
+    (build-system emacs-build-system)
+    (synopsis "Minor mode for defining and querying search engines")
+    (description "@code{engine-mode} is a global minor mode for Emacs.  It
+enables you to easily define search engines, bind them to keybindings, and
+query them from the comfort of your editor.")
+    (home-page "https://github.com/hrs/engine-mode")
+    (license license:gpl3+)))
-- 
2.14.0


[-- Attachment #3: Type: text/plain, Size: 9 bytes --]


Thanks!

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

* [bug#28010] [PATCH] gnu: Add emacs-engine-mode.
  2017-08-10 14:08       ` Oleg Pykhalov
@ 2017-08-10 16:33         ` Arun Isaac
  2017-08-10 17:08         ` bug#28010: " Arun Isaac
  1 sibling, 0 replies; 7+ messages in thread
From: Arun Isaac @ 2017-08-10 16:33 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28010


Oleg Pykhalov writes:

> So, if you don't think it's proper for Guix, then here is a patch
> without README.

I really don't know if it is appropriate or not for Guix. If I remember
correctly, this issue came up with reference to font-build-system, but
there was no consensus, and the decision was postponed. But considering
that no other *emacs package* installs README.md, I'll apply the patch
without the doc-install for now.

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

* bug#28010: [PATCH] gnu: Add emacs-engine-mode.
  2017-08-10 14:08       ` Oleg Pykhalov
  2017-08-10 16:33         ` Arun Isaac
@ 2017-08-10 17:08         ` Arun Isaac
  1 sibling, 0 replies; 7+ messages in thread
From: Arun Isaac @ 2017-08-10 17:08 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 28010-done


Pushed, thanks!

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

end of thread, other threads:[~2017-08-10 17:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08 10:14 [bug#28010] [PATCH] gnu: Add emacs-engine-mode Oleg Pykhalov
2017-08-10  9:38 ` Arun Isaac
2017-08-10 11:09   ` Oleg Pykhalov
2017-08-10 12:07     ` Arun Isaac
2017-08-10 14:08       ` Oleg Pykhalov
2017-08-10 16:33         ` Arun Isaac
2017-08-10 17:08         ` bug#28010: " Arun Isaac

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