X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;h=fb0e3780403107a650e704acd6b03c0d0a40124a;hb=3b1cbb1e77020f84f07811dbd30a8afed2076225;hp=37b75c5d4ae3c29dd1314a1fef52f396da0fc423;hpb=3d3aa028bd5f10501aaa930b91ab3da56f9b9238;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index 37b75c5..fb0e378 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -1336,11 +1336,13 @@ Refer [[https://github.com/abo-abo/hydra/blob/master/hydra-examples.el][hydra-ex (windmove-down)) "horz" :exit t) ("o" delete-other-windows "one" :exit t) + ("C-o" delete-other-windows "one" :exit t) ("a" ace-window "ace") ("s" ace-swap-window "swap") ("d" ace-delete-window "ace-one" :exit t) ("i" ace-maximize-window "ace-one" :exit t) - ("b" ido-switch-buffer "buf") + ("b" ido-switch-buffer "buf" :exit t) + ("C-b" ido-switch-buffer "buf" :exit t) ;; ("m" headlong-bookmark-jump "bmk") ("q" nil "cancel") ("u" (progn (winner-undo) (setq this-command 'winner-undo)) "undo") @@ -1682,16 +1684,15 @@ In Lisp Mode, =M-o= is defined, but I use this for global hydra window. So here bindings in =lispy-mode-map= after loaded. see [[http://stackoverflow.com/questions/298048/how-to-handle-conflicting-keybindings][here]] #+BEGIN_SRC emacs-lisp :tangle yes :results silent - (use-package lispy :ensure t :init (eval-after-load 'lispy - '(progn - (define-key lispy-mode-map (kbd "M-o") nil))) + `(progn + (define-key lispy-mode-map (kbd "M-o") nil) + (define-key lispy-mode-map (kbd "C-d") nil))) :config (add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1)))) - #+END_SRC *** Perl @@ -1887,6 +1888,7 @@ company mode #+END_SRC * Gnus +** Gmail setting Refer [[https://www.emacswiki.org/emacs/GnusGmail][GnusGmail]] #+BEGIN_SRC emacs-lisp :tangle yes :results silent (setq user-mail-address "seudut@gmail.com" @@ -1919,6 +1921,42 @@ and == with the password #+END_EXAMPLE Then Run =M-x gnus= + +** 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))))) +#+END_SRC + #+BEGIN_SRC emacs-lisp :tangle yes :results silent (setq gnus-fetch-old-headers 't) @@ -1926,13 +1964,47 @@ Then Run =M-x gnus= (setq gnus-extract-address-components 'mail-extract-address-components) - - (setq gnus-summary-line-format "%U%R%z%I%(%[%-20,20f%]%) %s%-67= %11&user-date;\n") + ;; summary buffer + (setq gnus-summary-line-format "%U%R%z%I%(%[%-20,20f%]%) %s%-80= %11&user-date;\n") (setq gnus-user-date-format-alist '(((gnus-seconds-today) . "%H:%M") ((+ 86400 (gnus-seconds-today)) . "%a %H:%M") (604800 . "%a, %b %-d") (15778476 . "%b %-d") (t . "%Y-%m-%d"))) + + (setq gnus-thread-sort-functions '((not gnus-thread-sort-by-number))) + (setq gnus-unread-mark ?\.) + (setq gnus-use-correct-string-widths t) + + ;; thread + (setq gnus-thread-hide-subtree t) + + + +#+END_SRC + +** Windows layout +See [[https://www.emacswiki.org/emacs/GnusWindowLayout][GnusWindowLayout]] +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (gnus-add-configuration + '(summary + (horizontal 1.0 + (vertical 35 + (group 1.0)) + (vertical 1.0 + (summary 1.0 poine))))) + + (gnus-add-configuration + '(article + (horizontal 1.0 + (vertical 35 + (group 1.0)) + (vertical 1.0 + (summary 0.50 point) + (article 1.0))))) + + ;; (add-hook 'gnus-group-mode-map (lambda () + ;; (gnus-group-select-group "INBOX"))) #+END_SRC * key