* Basic Settings
** Setting loading Path
-
Set system PATH and emacs exec path
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(setenv "PATH" (concat (getenv "PATH")
":" "/usr/local/bin"
":" "/Library/TeX/texbin"))
(setq exec-path (append exec-path '("/usr/local/bin")))
(setq exec-path (append exec-path '("/Library/TeX/texbin/")))
-
#+END_SRC
Set the emacs load path
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
;; (add-to-list 'load-path "~/.emacs.d/elisp")
#+END_SRC
** Package Initialization
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(require 'package)
(setq package-archives '(("mepla" . "http://melpa.milkbox.net/packages/")
("org" . "http://orgmode.org/elpa/")))
(package-initialize)
-
#+END_SRC
** General Setting
#+END_SRC
* Package Management Tools
-
** Use-package
Using [[https://github.com/jwiegley/use-package][use-package]] to manage emacs packages
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
#+END_SRC
* Mode-line
-
** clean mode line
clean mode line, Refer to [[https://www.masteringemacs.org/article/hiding-replacing-modeline-strings][Marstering Emacs]], some greek character see [[http://xahlee.info/math/math_unicode_greek.html][math_unicode_greek]]
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(latex . t)
(java . t)
(ruby . t)
+ (lua . t)
(lisp . t)
(scheme . t)
(sh . t)
(unless
(file-exists-p org-ditaa-jar-path)
(error "seudut: ditaa.jar not found at %s " org-ditaa-jar-path))
+
+ ;; Lua support
+ (use-package ob-lua
+ :ensure t)
#+END_SRC
** Org-bullets
#+END_SRC
-** others
+** Org structure template
extend org-mode's easy templates, refer to [[http://coldnew.github.io/coldnew-emacs/#orgheadline94][Extend org-modes' esay templates]]
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(add-to-list 'org-structure-template-alist
'("E" "#+BEGIN_SRC emacs-lisp :tangle yes :results silent\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist
- '("S" "#+BEGIN_SRC sh\n?\n#+END_SRC"))
+ '("S" "#+BEGIN_SRC sh :results output replace\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist
'("p" "#+BEGIN_SRC plantuml :file uml.png \n?\n#+END_SRC"))
-
+ (add-to-list 'org-structure-template-alist
+ '("P" "#+BEGIN_SRC perl \n?\n#+END_SRC"))
#+END_SRC
* Magit
(exec-path-from-shell-initialize))
#+END_SRC
-** TODO smart display
* Misc Settings
** [[https://github.com/abo-abo/hydra][Hydra]]
#+END_SRC
** Multi-term
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(use-package multi-term
:ensure t)
-
#+END_SRC
** ace-link
-
[[https://github.com/abo-abo/ace-link][ace-link]] is a package written by [[https://github.com/abo-abo][Oleh Krehel]]. It is convenient to jump to link in help mode, info-mode, etc
Type =o= to go to the link
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(use-package ace-link
:ensure t
:init
(ace-link-setup-default))
-
#+END_SRC
** Smart Parens
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(use-package smartparens
:ensure t
:config
(progn
(require 'smartparens-config)
(add-hook 'prog-mode-hook 'smartparens-mode)))
-
#+END_SRC
** Ace-Windows
-
[[https://github.com/abo-abo/ace-window][ace-window]]
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(use-package ace-window
:ensure t
:defer t
- ; :init
- ; (global-set-key (kbd "M-o") 'ace-window)
+ ; :init
+ ; (global-set-key (kbd "M-o") 'ace-window)
:config
(setq aw-keys '(?a ?s ?d ?f ?j ?k ?l)))
-
#+END_SRC
** Which key
-
[[https://github.com/justbur/emacs-which-key][which-key]] show the key bindings
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
(use-package which-key
:ensure t
:config
(which-key-mode))
-
#+END_SRC
** View only for some directory
(require 'info+))
#+END_SRC
-** TODO bookmark
-
-** TODO Calendar
** advice info
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(defun sd/info-mode ()
(sd/delete-current-window))
#+END_SRC
-** TODO Man mode
-Color for Man-mode
-
** Demo It
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
;; (el-get-bundle howardabrams/demo-it)
(add-hook 'help-mode-hook 'sd/help-mode-hook)
#+END_SRC
+** goto-last-change
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (use-package goto-last-change
+ :ensure t)
+#+END_SRC
+
+** Ag
+install =ag=, =the-silver-searcher= by homebrew on mac
+#+BEGIN_SRC sh
+brew install the-silver-searcher
+#+END_SRC
+
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (use-package ag
+ :ensure t)
+#+END_SRC
+
* Dired
** Dired bindings
=C-o= is defined as a global key for window operation, here unset it in dired mode
(add-hook 'c-mode-hook 'google-set-c-style))
#+END_SRC
+** Lua
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (use-package lua-mode
+ :ensure t)
+#+END_SRC
+
* Compile
Set the environments vairables in compilation mode
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
#+END_SRC
* Gnu Plot
+Install =gnuplot= on Mac
+#+BEGIN_SRC sh
+ brew install gnuplot --with-qt
+#+END_SRC
+
To fix some issue that =toolbar-make-button-list= is void, see the [[https://github.com/bruceravel/gnuplot-mode/issues/31][issue]], here I set some variable as =nil=
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(use-package gnuplot
;; buffer / windows switch
("o" sd/toggle-max-windows "one" :exit t)
("C-k" sd/delete-current-window "del" :exit t)
- ("D" (lambda ()
+ ("C-d" (lambda ()
(interactive)
(kill-buffer)
(sd/delete-current-window))
- vision
- mission
-* TODO jump last change point
-
* TODO todolist
** rucket
** player video on iphone for
** SICP
+** music searcher
+search music on some music web site