Skip to content

Commit

Permalink
Confluence wiki plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jngbng committed Nov 10, 2013
1 parent ec1d128 commit 4a8a8df
Show file tree
Hide file tree
Showing 33 changed files with 12,352 additions and 187 deletions.
5 changes: 5 additions & 0 deletions .bash_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if [ $(uname) = "Darwin" ];
then
#alias emacs='open -a Emacs --args'
alias ec='/Applications/Emacs.app/Contents/MacOS/bin/emacsclient'
else
alias ec='emacsclient'
fi

alias gl="git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
Expand Down Expand Up @@ -46,3 +48,6 @@ alias clj='java -jar ~/.m2/clojure.jar'


alias linode='ssh [email protected]'


alias rehide='killall plasma-desktop && plasma-desktop > /dev/null 2>&1'
203 changes: 161 additions & 42 deletions .emacs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(when (>= emacs-major-version 24)
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("elpa" . "http://elpa.gnu.org/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages") t)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
)

;; (normal-top-level-add-subdirs-to-load-path)
Expand All @@ -17,8 +16,8 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Node-js mode
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-to-list 'load-path "~/.emacs.d/site-lisp/nodejs-mode/")
(require 'nodejs-mode)
;(add-to-list 'load-path "~/.emacs.d/site-lisp/nodejs-mode/")
;(require 'nodejs-mode)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -39,41 +38,41 @@
(setq inferior-lisp-program "/usr/local/bin/sbcl")
(add-to-list 'load-path "~/.emacs.d/site-lisp/slime/")
(add-to-list 'load-path "~/.emacs.d/site-lisp/slime/contrib")
(require 'slime)
(slime-setup)



(require 'slime-js)
(add-hook 'js2-mode-hook
(lambda ()
(slime-js-minor-mode 1)))

(add-hook 'css-mode-hook
(lambda ()
(define-key css-mode-map "\M-\C-x" 'slime-js-refresh-css)
(define-key css-mode-map "\C-c\C-r" 'slime-js-embed-css)))

;(eval-after-load 'auto-complete
;(require 'slime)
;(slime-setup)
;
;
;
;(require 'slime-js)
;(add-hook 'js2-mode-hook
; (lambda ()
; (slime-js-minor-mode 1)))
;
;(add-hook 'css-mode-hook
; (lambda ()
; (define-key css-mode-map "\M-\C-x" 'slime-js-refresh-css)
; (define-key css-mode-map "\C-c\C-r" 'slime-js-embed-css)))
;
;;(eval-after-load 'auto-complete
;; '(progn
;; (add-to-list 'ac-modes 'slime-repl-mode)
;; (add-to-list 'ac-modes 'js2-mode)
;; (add-to-list 'ac-modes 'js-mode)
;; (add-hook 'slime-mode-hook 'set-up-slime-ac)
;; (add-hook 'slime-repl-mode-hook 'set-up-slime-ac)))
;
;(eval-after-load 'slime
; '(progn
; (add-to-list 'ac-modes 'slime-repl-mode)
; (add-to-list 'ac-modes 'js2-mode)
; (add-to-list 'ac-modes 'js-mode)
; (add-hook 'slime-mode-hook 'set-up-slime-ac)
; (add-hook 'slime-repl-mode-hook 'set-up-slime-ac)))

(eval-after-load 'slime
'(progn
; (require 'slime-fuzzy)
; (require 'auto-complete)
; (require 'ac-slime)
; (slime-fuzzy-init)
(setq slime-protocol-version 'ignore
; slime-net-coding-system 'utf-8-unix
; slime-complete-symbol*-fancy t
; slime-complete-symbol-function 'slime-fuzzy-complete-symbol
)
(slime-setup '(slime-repl slime-js slime-asdf))))
;; (require 'slime-fuzzy)
;; (require 'auto-complete)
;; (require 'ac-slime)
;; (slime-fuzzy-init)
; (setq slime-protocol-version 'ignore
;; slime-net-coding-system 'utf-8-unix
;; slime-complete-symbol*-fancy t
;; slime-complete-symbol-function 'slime-fuzzy-complete-symbol
; )
; (slime-setup '(slime-repl slime-js slime-asdf))))

;;========================================
;; start the emacsserver that listens to emacsclient
Expand Down Expand Up @@ -237,7 +236,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ocp-indent
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(load-file "/Users/bongya/.opam/4.00.1/share/typerex/ocp-indent/ocp-indent.el")
(load-file "~/.opam/4.00.1/share/typerex/ocp-indent/ocp-indent.el")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Shell pop
Expand Down Expand Up @@ -421,14 +420,14 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(inhibit-startup-screen t)
'(scroll-bar-mode nil)
'(show-paren-mode t)
'(speedbar-show-unknown-files t)
'(sr-speedbar-auto-refresh t)
'(sr-speedbar-right-side nil)
'(tool-bar-mode nil))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Shell toggle
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -470,7 +469,34 @@
;; '(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 113 :width normal :foundry "xos4" :family "Terminus")))))


(add-to-list 'default-frame-alist '(font . "Terminus"))
(add-to-list 'default-frame-alist '(font . "Monospace"))
(if (eq system-type 'gnu/linux)
(progn
(set-fontset-font
"fontset-default"
'korean-ksc5601
'("Naver Dictionary" . "unicode-bmp")
)
;;;; 유니코드 한글영역
;(set-fontset-font
; "fontset-default"
; '(#x1100 . #xffdc)
; '("Naver Dictionary" . "unicode-bmp"))
;;;;유니코드 사용자 영역
;(set-fontset-font
; "fontset-default"
; '(#xe0bc . #xf66e)
; '("Naver Dictionary" . "unicode-bmp"))
;(set-fontset-font
; "fontset-default"
; 'kana
; '("Dejavu Sans" . "unicode-bmp"))
;(set-fontset-font
; "fontset-default"
; 'han
; '("Dejavu Sans" . "unicode-bmp"))
))


; set nu -> linum-mode
; (load-library "setnu.el")
Expand Down Expand Up @@ -568,3 +594,96 @@
(setq-default buffer-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)



(require 'smart-compile)

(require 'cl) ; for lexical-let

(defun do-execute (exe)
;; (with-current-buffer "*eshell*"
;; (goto-char (point-max))
;; (insert exe)
;; (eshell-send-input))
;; (switch-to-buffer-other-window "*eshell*")
;; (with-selected-window (get-buffer-window "*eshell*" t)
;; (goto-char (point-max)))
(with-selected-window (next-window)
(pop-to-buffer "*eshell*")
(goto-char (point-max))
(insert exe)
(eshell-send-input))
)

(defun save-compile-execute ()
(interactive)
(lexical-let ((exe (smart-compile-string "./%n"))
finish-callback)
;; when compilation is done, execute the program
;; and remove the callback from
;; compilation-finish-functions
(setq finish-callback
(lambda (buf msg)
(do-execute exe)
(setq compilation-finish-functions
(delq finish-callback compilation-finish-functions))))
(push finish-callback compilation-finish-functions))
(smart-compile 1))



(defvar my-keys-minor-mode-map (make-keymap) "my-keys-minor-mode keymap.")

(define-key my-keys-minor-mode-map (kbd "C-c C-c") 'smart-compile)
(define-key my-keys-minor-mode-map (kbd "C-c C-r") 'save-compile-execute)

(define-minor-mode my-keys-minor-mode
"A minor mode so that my key settings override annoying major modes."
t " my-keys" 'my-keys-minor-mode-map)

(my-keys-minor-mode 1)

(defun my-minibuffer-setup-hook ()
(my-keys-minor-mode 0))

(add-hook 'minibuffer-setup-hook 'my-minibuffer-setup-hook)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Confluence
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(add-to-list 'load-path "~/.emacs.d/site-lisp/confluence-1.6/")

;; assuming confluence.el and xml-rpc.el are in your load path
(require 'confluence)

;; note, all customization must be in *one* custom-set-variables block

(custom-set-variables
'(confluence-url "http://slp-info.sec.samsung.net/confluence/rpc/xmlrpc")
'(confluence-default-space-alist (list (cons confluence-url "BROWSER")))
'(confluence-save-credentials t)
'(confluence-xml-convert-to-wiki-on-load t)
)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; confluence editing support (with longlines mode)

(autoload 'confluence-get-page "confluence" nil t)

(eval-after-load "confluence"
'(progn
(add-hook 'confluence-mode-hook '(lambda () (local-set-key "\C-j" 'confluence-newline-and-indent)))))

;; keybindings (change to suit)

;; open confluence page
(global-set-key "\C-xwf" 'confluence-get-page)

;; setup confluence mode
(add-hook 'confluence-mode-hook
'(lambda ()
(local-set-key "\C-xw" confluence-prefix-map)))
Loading

0 comments on commit 4a8a8df

Please sign in to comment.