emacs - disable debug to workaround the hydra completion issue
[dotfiles.git] / emacs.d / config.org
index ce73187..b36f660 100644 (file)
@@ -25,9 +25,7 @@ Set system PATH and emacs exec path
 Set the emacs load path
 
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
-  (add-to-list 'load-path "~/.emacs.d/elisp")
-
+  ;; (add-to-list 'load-path "~/.emacs.d/elisp")
 #+END_SRC
 
 ** Package Initialization
@@ -53,7 +51,7 @@ Disable scroll bar, tool-bar and menu-bar
   (tool-bar-mode 0)
   (menu-bar-mode 1)
 
-  (setq debug-on-error t)
+  ;; (setq debug-on-error t)
   (setq inhibit-startup-message t)
 
   (defalias 'yes-or-no-p 'y-or-n-p)
@@ -1305,6 +1303,9 @@ and Defined keys, using vi keybindings, Refer abo-abo's setting [[https://github
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   (use-package magit
     :ensure t
+    :init
+    ;; don't ask me to confirm the unsaved change 
+    (setq magit-save-repository-buffers nil)
     :commands magit-status magit-blame
     :config
     (dolist (map (list magit-status-mode-map
@@ -1502,6 +1503,7 @@ Refer [[https://github.com/abo-abo/hydra/blob/master/hydra-examples.el][hydra-ex
     ("'" mode-line-other-buffer "last buffer" :exit t)
     ("C-'" mode-line-other-buffer "last buffer" :exit t)
     ("m" man "man" :exit t)
+    ("d" dired-jump "dired" :exit t)
     ("q" nil "quit")
     ("f" nil "quit"))
 
@@ -1732,14 +1734,6 @@ Play Go in Emacs, gnugo xpm refert [[https://github.com/okanotor/dotemacs/blob/f
 
 #+END_SRC
 
-** dired
-=C-o= is defined as a global key for window operation, here unset it in dired mode
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-  (add-hook 'dired-mode-hook (lambda ()
-                               (local-unset-key (kbd "C-o"))
-                               (local-set-key (kbd "o") 'dired-display-file)))
-#+END_SRC
-
 ** Info plus
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   (el-get-bundle info+
@@ -1780,6 +1774,46 @@ Color for Man-mode
 #+END_SRC
 
 ** TODO swiper to occur
+
+** TODO UTF8
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  ;; (set-language-environment "UTF-8")
+  ;; (set-default-coding-systems 'utf-8)
+#+END_SRC
+
+** Demo It
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  ;; (el-get-bundle howardabrams/demo-it)
+
+  ;; (use-package org-tree-slide
+  ;;   :ensure t)
+
+  ;; (use-package yasnippet
+  ;;   :ensure t)
+#+END_SRC
+
+* dired
+=C-o= is defined as a global key for window operation, here unset it in dired mode
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  (add-hook 'dired-mode-hook (lambda ()
+                               (local-unset-key (kbd "C-o"))
+                               (local-set-key (kbd "o") 'dired-display-file)))
+
+  (define-key dired-mode-map (kbd "DEL") (lambda () (interactive) (find-alternate-file "..")))
+#+END_SRC
+
+Dired+
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  (use-package dired+
+    :ensure t
+    :init
+    (setq diredp-hide-details-initially-flag nil)
+    :config
+    (define-key dired-mode-map (kbd "j") 'diredp-next-line)
+    (define-key dired-mode-map (kbd "k") 'diredp-previous-line)
+    (define-key dired-mode-map (kbd "g") 'dired-goto-file))
+#+END_SRC
+
 * Programming
 
 ** Languages