** General Setting
*** scroll bar, tool-bar and menu-bar
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (scroll-bar-mode 0)
- (tool-bar-mode 0)
-
- (if window-system
- (menu-bar-mode 1)
+ (if (display-graphic-p)
+ (progn
+ (scroll-bar-mode 0)
+ (tool-bar-mode 0)
+ (menu-bar-mode 1))
(menu-bar-mode 0))
(setq debug-on-error t)
#+END_SRC
** Org Blog
-Refer to [[http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html][org-publish-html-tutorial]], and [[https://ogbe.net/blog/blogging_with_org.html][blogging_with_org]]
+Fetch dependencies file, which is not in this repository.
+#+BEGIN_SRC perl :results silent :tangle yes
+ print `curl https://raw.githubusercontent.com/seudut/blog/master/my-publish.el -o ./elisp/my-publish.el`;
+#+END_SRC
+
+Load
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (require 'ox-publish)
-
- (setq org-publish-project-alist
- `(
- ("org-notes"
- :base-directory "~/Private/blog/"
- :base-extension "org"
- :publishing-directory "~/Private/publish_html"
- :recursive t
- :publishing-function org-html-publish-to-html
- :headline-levels 4
- :section-numbers nil
- :auto-preamble t
- :auto-sitemap t ;Generate sitmap.org automagicaly...
- :sitemap-filename "sitemap.org" ;... call it sitemap.org (it's the default )...
- :sitemap-title "Sitemap"
-
- :html-table-of-contents nil
- :html-postamble nil ;dont export creator auto validation info in html postamble div
- :html-link-home "/"
- :html-head "<link rel='stylesheet' href='./css/worg.css' />"
- :html-head-include-default-style nil
- :html-head-include-scripts nil)
- ("org-static"
- :base-directory "~/Private/blog/"
- :base-extension "css\\|js\\|png\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
- :publishing-directory "~/Private/publish_html"
- :recursive t
- :publishing-function org-publish-attachment
- :table-of-contents nil)
- ("org" :components ("org-notes" "org-static"))))
+ (add-to-list 'load-path "~/.emacs.d/elisp")
+
+ (when (file-exists-p "~/.emacs.d/elisp/my-publish.el")
+ (require 'my-publish)
+ (blog-setup-project-alist "~/Private/blog/"))
#+END_SRC
+
+Refer to [[http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html][org-publish-html-tutorial]], and [[https://ogbe.net/blog/blogging_with_org.html][blogging_with_org]]
+
* Magit
[[https://github.com/magit/magit][Magit]] is a very cool git interface on Emacs.
and Defined keys, using vi keybindings, Refer abo-abo's setting [[https://github.com/abo-abo/oremacs/blob/c5cafdcebc88afe9e73cc8bd40c49b70675509c7/modes/ora-nextmagit.el][here]]
** Group buffer
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (use-package gnus
- :init
- (setq gnus-permanently-visible-groups "\.*")
- :config
- (cond (window-system
- (setq custom-background-mode 'light)
- (defface my-group-face-1
- '((t (:foreground "Red" :bold t))) "First group face")
- (defface my-group-face-2
- '((t (:foreground "DarkSeaGreen4" :bold t)))
- "Second group face")
- (defface my-group-face-3
- '((t (:foreground "Green4" :bold t))) "Third group face")
- (defface my-group-face-4
- '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
- (defface my-group-face-5
- '((t (:foreground "Blue" :bold t))) "Fifth group face")))
- (setq gnus-group-highlight
- '(((> unread 200) . my-group-face-1)
- ((and (< level 3) (zerop unread)) . my-group-face-2)
- ((< level 3) . my-group-face-3)
- ((zerop unread) . my-group-face-4)
- (t . my-group-face-5))))
-
-
- ;; key-
- (add-hook 'gnus-group-mode-hook (lambda ()
- (define-key gnus-group-mode-map "k" 'gnus-group-prev-group)
- (define-key gnus-group-mode-map "j" 'gnus-group-next-group)
- (define-key gnus-group-mode-map "g" 'gnus-group-jump-to-group)
- (define-key gnus-group-mode-map "v" (lambda () (interactive) (gnus-group-select-group t)))))
+ ;; (use-package gnus
+ ;; :init
+ ;; (setq gnus-permanently-visible-groups "\.*")
+ ;; :config
+ ;; (cond (window-system
+ ;; (setq custom-background-mode 'light)
+ ;; (defface my-group-face-1
+ ;; '((t (:foreground "Red" :bold t))) "First group face")
+ ;; (defface my-group-face-2
+ ;; '((t (:foreground "DarkSeaGreen4" :bold t)))
+ ;; "Second group face")
+ ;; (defface my-group-face-3
+ ;; '((t (:foreground "Green4" :bold t))) "Third group face")
+ ;; (defface my-group-face-4
+ ;; '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
+ ;; (defface my-group-face-5
+ ;; '((t (:foreground "Blue" :bold t))) "Fifth group face")))
+ ;; (setq gnus-group-highlight
+ ;; '(((> unread 200) . my-group-face-1)
+ ;; ((and (< level 3) (zerop unread)) . my-group-face-2)
+ ;; ((< level 3) . my-group-face-3)
+ ;; ((zerop unread) . my-group-face-4)
+ ;; (t . my-group-face-5))))
+
+
+ ;; ;; key-
+ ;; (add-hook 'gnus-group-mode-hook (lambda ()
+ ;; (define-key gnus-group-mode-map "k" 'gnus-group-prev-group)
+ ;; (define-key gnus-group-mode-map "j" 'gnus-group-next-group)
+ ;; (define-key gnus-group-mode-map "g" 'gnus-group-jump-to-group)
+ ;; (define-key gnus-group-mode-map "v" (lambda () (interactive) (gnus-group-select-group t)))))
#+END_SRC
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(add-hook 'ediff-suspend-hook 'ediff-toggle-wide-display))
#+END_SRC
+* Modes
+** Yaml-mode
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (use-package yaml-mode
+ :ensure t
+ :init
+ (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)))
+#+END_SRC
* Entertainment
** GnuGo
Play Go in Emacs, gnugo xpm refert [[https://github.com/okanotor/dotemacs/blob/f95b774cb292d1169748bc0a62ba647bbd8c0652/etc/my-inits/my-inits-gnugo.el][to here]]. start at image display mode and grid mode
(global-set-key (kbd "C-w") 'sd/kill-region-or-backward-kill-word)
#+END_SRC
+
* Developing
** perspeen
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- (el-get-bundle seudut/perspeen
- :features perspeen
- (setq perspeen-use-tab t)
+ (use-package perspeen
+ :ensure t
+ :init
+ (setq perspeen-use-tab nil)
+ :config
(perspeen-mode))
;; super-i to switch to ith workspace
(define-key perspeen-mode-map (kbd "s-t") 'perspeen-tab-create-tab)
(define-key perspeen-mode-map (kbd "s-t") 'perspeen-tab-create-tab))
#+END_SRC
+
* TODO todolist
** Rucket
** player video on iphone for