emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ob-clojure-literate remove dependency on dash
@ 2018-04-15 13:29 stardiviner
  2018-04-16 10:09 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: stardiviner @ 2018-04-15 13:29 UTC (permalink / raw)
  To: org-mode


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0001-ob-clojure-literate.el-remove-dash-dependence.patch --]
[-- Type: text/x-patch, Size: 3300 bytes --]

From 0edc3d8f2b6fe4a99e11286efe7eb49dc3596cbe Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
Date: Sun, 15 Apr 2018 19:40:12 +0800
Subject: [PATCH] * ob-clojure-literate.el: remove dash dependence.

---
 contrib/lisp/ob-clojure-literate.el | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/contrib/lisp/ob-clojure-literate.el b/contrib/lisp/ob-clojure-literate.el
index 5dec2ad9b..15b0e3745 100644
--- a/contrib/lisp/ob-clojure-literate.el
+++ b/contrib/lisp/ob-clojure-literate.el
@@ -21,7 +21,6 @@
 \f
 (require 'ob-clojure)
 (require 'cider)
-(require 'dash)
 
 (defgroup ob-clojure-literate nil
   "Clojure's Org-mode Literate Programming."
@@ -63,17 +62,17 @@ If it is a directory, `ob-clojure-literate' will try to create Clojure project a
 
 (defun ob-clojure-literate-get-session-list ()
   "Return a list of available started CIDER REPL sessions list."
-  (-map 'buffer-name
-	;; for multiple connections case.
-	;; get global value instead of buffer local.
-	(default-value 'cider-connections)
-	))
+  (mapcar 'buffer-name
+	  ;; for multiple connections case.
+	  ;; get global value instead of buffer local.
+	  (default-value 'cider-connections)
+	  ))
 
 (defun ob-clojure-literate-set-session ()
   "Set session name for buffer local."
   ;; if default session is the only one in connections list.
   (if (and (= (length (ob-clojure-literate-get-session-list)) 1)
-           (-contains-p (ob-clojure-literate-get-session-list) ob-clojure-literate-default-session))
+           (member ob-clojure-literate-default-session (ob-clojure-literate-get-session-list)))
       (setq-local ob-clojure-literate-session ob-clojure-literate-default-session)
     ;; if have any connections, choose one from them.
     (if (ob-clojure-literate-any-connection-p)
@@ -129,7 +128,7 @@ If it is a directory, `ob-clojure-literate' will try to create Clojure project a
              (not (null ob-clojure-literate-session)))
       ;; return back to original file.
       (if (not (and (= (length (ob-clojure-literate-get-session-list)) 1)
-                    (-contains-p (ob-clojure-literate-get-session-list) ob-clojure-literate-default-session)))
+                    (member ob-clojure-literate-default-session (ob-clojure-literate-get-session-list))))
           (save-window-excursion
             (find-file (expand-file-name (concat ob-clojure-literate-project-location "ob-clojure/src/ob_clojure/core.clj")))
             (with-current-buffer "core.clj"
@@ -149,7 +148,7 @@ If it is a directory, `ob-clojure-literate' will try to create Clojure project a
     ;; Empty all CIDER connections to avoid `cider-current-connection' return any connection.
     ;; FIXME: when try to enable, `cider-connections' is local and nil.
     ;; (if (and (= (length (ob-clojure-literate-get-session-list)) 1)
-    ;;          (-contains-p (ob-clojure-literate-get-session-list) ob-clojure-literate-default-session)))
+    ;;          (member ob-clojure-literate-default-session (ob-clojure-literate-get-session-list))))
     ;; (unless (local-variable-if-set-p 'cider-connections)
     ;;   (make-local-variable 'cider-connections))
     ;; (setq-local cider-connections '())
-- 
2.17.0


[-- Attachment #1.2: Type: text/plain, Size: 202 bytes --]


-- 
[ stardiviner ] don't need to convince with trends.
       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      

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

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

* Re: [PATCH] ob-clojure-literate remove dependency on dash
  2018-04-15 13:29 [PATCH] ob-clojure-literate remove dependency on dash stardiviner
@ 2018-04-16 10:09 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-04-16 10:09 UTC (permalink / raw)
  To: stardiviner; +Cc: org-mode

Hello,

stardiviner <numbchild@gmail.com> writes:

> From 0edc3d8f2b6fe4a99e11286efe7eb49dc3596cbe Mon Sep 17 00:00:00 2001
> From: stardiviner <numbchild@gmail.com>
> Date: Sun, 15 Apr 2018 19:40:12 +0800
> Subject: [PATCH] * ob-clojure-literate.el: remove dash dependence.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-04-16 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-15 13:29 [PATCH] ob-clojure-literate remove dependency on dash stardiviner
2018-04-16 10:09 ` Nicolas Goaziou

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).