emacs - eshell-here
authorPeng Li <seudut@gmail.com>
Wed, 15 Jun 2016 15:46:00 +0000 (23:46 +0800)
committerPeng Li <seudut@gmail.com>
Wed, 15 Jun 2016 15:46:00 +0000 (23:46 +0800)
emacs.d_2/config.org
emacs.d_2/init.el

index 58e13b4..6883926 100644 (file)
@@ -816,28 +816,27 @@ Quickly start eshll in split window below, refer [[http://www.howardism.org/Tech
                        (file-name-directory (buffer-file-name))
                      default-directory))
            (height (/ (window-total-height) 3))
-           (name   (car (last (split-string parent "/" t)))))
+           (name   (car (last (split-string parent "/" t))))
+           (eshell-name (concat "*eshell: " name "*")))
       (split-window-vertically (- height))
       (other-window 1)
-      (if (get-buffer (concat "*eshell: " name "*"))
+      (if (get-buffer eshell-name)
           (progn
             (message "buffer exist")
-            (switch-to-buffer (concat "*eshell: " name "*")))
+            (switch-to-buffer eshell-name))
         (progn
           (eshell "new")
-          (rename-buffer (concat "*eshell: " name "*"))
+          (rename-buffer eshell-name)
 
           (insert (concat "ls"))
           (eshell-send-input)))))
 
-  ;; (global-set-key (kbd "M-`") (lambda ()
-  ;;                               (interactive)
-  ;;                               (if (buffer-name))))
+  (global-set-key (kbd "M-`") (lambda ()
+                                (interactive)
+                                (eshell-here)))
 
 #+END_SRC
 
-
-
 * Misc Settings
 
 ** [[https://github.com/abo-abo/hydra][Hydra]]
index afa4644..7eb439d 100644 (file)
@@ -1,9 +1,3 @@
-;;; init.el --- Where all the magic begins
-;;
-;; This file loads Org-mode and then loads the rest of our Emacs initialization from Emacs lisp
-;; embedded in literate Org-mode files.
-
-;; Load up Org Mode and (now included) Org Babel for elisp embedded in Org Mode files
 
 ;; Added by Package.el.  This must come before configurations of
 ;; installed packages.  Don't delete this line.  If you don't want it,
 ;; You may delete these explanatory comments.
 (package-initialize)
 
-(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
-
-(let* ((org-dir (expand-file-name
-                 "lisp" (expand-file-name
-                         "org" (expand-file-name
-                                "src" dotfiles-dir))))
-       (org-contrib-dir (expand-file-name
-                         "lisp" (expand-file-name
-                                 "contrib" (expand-file-name
-                                            ".." org-dir))))
-       (load-path (append (list org-dir org-contrib-dir)
-                          (or load-path nil))))
-  ;; load up Org-mode and Org-babel
-  (require 'org-install)
-  (require 'ob-tangle))
-
-;; load up all literate org-mode files in this directory
-(mapc #'org-babel-load-file (directory-files dotfiles-dir t "\\.org$"))
-
-;;; init.el ends here
+(org-babel-load-file "~/.emacs.d/config.org")
 (custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
- '(package-selected-packages (quote (use-package))))
+ '(package-selected-packages
+   (quote
+    (counsel slime ido-exit-target undo-tree gnugo emms which-key ido-ubiquitous persp-projectile projectile company company-mode lispy worf use-package smex smartparens smart-comment org-bullets org multi-term magit linum-relative ido-vertical-mode flx-ido el-get color-theme-sanityinc-tomorrow color-theme color-identifiers-mode ace-window))))
 (custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
- )
+ '(mode-line-buffer-id ((t (:foreground "black" :bold t))))
+ '(org-block ((t (:background "#000000"))))
+ '(org-block-background ((t (:background "#000000"))))
+ '(org-block-begin-line ((t (:foreground "#008ED1" :background "#002E41"))))
+ '(org-block-end-line ((t (:foreground "#008ED1" :background "#002E41"))))
+ '(which-func ((t (:foreground "green")))))