From: stardiviner <numbchild@gmail.com>
To: org-mode <emacs-orgmode@gnu.org>
Subject: [PATCH] ob-clojure-literate don't enable minor mode by default.
Date: Thu, 03 May 2018 10:26:28 +0800 [thread overview]
Message-ID: <87efito4ob.fsf@gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2018-05-03 2:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 2:26 stardiviner [this message]
2018-05-03 19:54 ` [PATCH] ob-clojure-literate don't enable minor mode by default Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efito4ob.fsf@gmail.com \
--to=numbchild@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).