emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ob-clojure-literate don't enable minor mode by default.
@ 2018-05-03  2:26 stardiviner
  2018-05-03 19:54 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: stardiviner @ 2018-05-03  2:26 UTC (permalink / raw)
  To: org-mode


[-- Attachment #1.1: Type: text/plain, Size: 55 bytes --]

Hi, Nicolas, can you merge this minor update? thanks.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-ob-clojure-literate.el-Don-t-enable-ob-clojure-liter.patch --]
[-- Type: text/x-patch, Size: 2229 bytes --]

From 14cad029e92b1e35b1255e4b7faa3f0442bce334 Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
Date: Thu, 3 May 2018 10:20:41 +0800
Subject: [PATCH] ob-clojure-literate.el: Don't enable ob-clojure-literate-mode
 by default.

* contrib/lisp/ob-clojure-literate.el (ob-clojure-literate-auto-jackin):
Handle the case that detect cider-jack-in is executed but not connected,
and ob-clojure-literate-mode is enabled already.

* contrib/lisp/ob-clojure-literate.el (ob-clojure-literate-mode): Don't
  enable ob-clojure-literate-mode by default.
---
 contrib/lisp/ob-clojure-literate.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/ob-clojure-literate.el b/contrib/lisp/ob-clojure-literate.el
index e702582d9..19eceba52 100644
--- a/contrib/lisp/ob-clojure-literate.el
+++ b/contrib/lisp/ob-clojure-literate.el
@@ -67,6 +67,7 @@ If it is a directory, `ob-clojure-literate' will try to create Clojure project a
 	  ;; get global value instead of buffer local.
 	  (default-value 'cider-connections)))
 
+;;; allow not "ob-clojure" project session name.
 (defun ob-clojure-literate-set-session ()
   "Set session name for buffer local."
   ;; if default session is the only one in connections list.
@@ -124,7 +125,8 @@ If it is a directory, `ob-clojure-literate' will try to create Clojure project a
                   (if (not (null ob-clojure-literate-session))
 		      (seq-contains cider-connections (get-buffer ob-clojure-literate-session))))
              cider-connections
-             (not (null ob-clojure-literate-session)))
+	     (ob-clojure-literate-any-connection-p)
+	     )
       ;; return back to original file.
       (if (not (and (= (length (ob-clojure-literate-get-session-list)) 1)
                     (member ob-clojure-literate-default-session (ob-clojure-literate-get-session-list))))
@@ -334,7 +336,7 @@ reset `RESULT' to `nil'."
 (define-minor-mode ob-clojure-literate-mode
   "A minor mode to toggle `ob-clojure-literate'."
   :require 'ob-clojure-literate
-  :init-value t
+  :init-value nil
   :lighter " clj-lp"
   :group 'ob-clojure-literate
   :keymap ob-clojure-literate-mode-map
-- 
2.17.0


[-- Attachment #1.3: 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 related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ob-clojure-literate don't enable minor mode by default.
  2018-05-03  2:26 [PATCH] ob-clojure-literate don't enable minor mode by default stardiviner
@ 2018-05-03 19:54 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-05-03 19:54 UTC (permalink / raw)
  To: stardiviner; +Cc: org-mode

Hello,

stardiviner <numbchild@gmail.com> writes:

> Hi, Nicolas, can you merge this minor update? thanks.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-05-03 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03  2:26 [PATCH] ob-clojure-literate don't enable minor mode by default stardiviner
2018-05-03 19:54 ` Nicolas Goaziou

Code repositories for project(s) associated with this public 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).