X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;h=38c6e74738c618e7bb7bce929d1d693c27c5db7c;hb=3189e2389e5e52ec4a17bb8aa0aa81437fca89b5;hp=b73f0f04145b7dad410fd1259721c1c3c216e046;hpb=4d1f00e10fd2cd84eb7ed18d154f93307bdb867b;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index b73f0f0..38c6e74 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -147,6 +147,12 @@ Check out [[http://tapoueh.org/emacs/el-get.html][el-get]]. (add-hook 'prog-mode-hook 'hl-line-mode) (add-hook 'text-mode-hook 'hl-line-mode) (add-hook 'dired-mode-hook 'hl-line-mode) + + ;; only highlight selected window + (setq hl-line-sticky-flag nil) + + (setq-default fill-column 120) + (add-hook 'text-mode-hook 'turn-on-auto-fill) #+END_SRC ** Smart Comments @@ -966,8 +972,7 @@ All captured file which need next actions are stored in =refile.org=, *** Agenda Setup Setting agenda files and the agenda view #+BEGIN_SRC emacs-lisp :tangle yes :results silent - (setq org-agenda-files (quote ("~/org/gtd.org" - "~/org/work.org"))) + (setq org-agenda-files (quote ("~/org/gtd.org"))) ;; only show today's tasks in agenda view ;; (setq org-agenda-span 'day) @@ -982,6 +987,18 @@ Setting agenda files and the agenda view (setq org-agenda-show-all-dates t) #+END_SRC +** Org mobile +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (with-eval-after-load "org" + (require 'org-mobile) + ;; Set to the location of your Org files on your local system + ;; (setq org-directory "~/org") + ;; Set to the name of the file where new notes will be stored + (setq org-mobile-inbox-for-pull "~/org/flagged.org") + ;; Set to /MobileOrg. + (setq org-mobile-directory "~/Dropbox/Apps/MobileOrg")) +#+END_SRC + ** Export PDF Install MacTex-basic [[http://www.tug.org/mactex/morepackages.html][MacTex-basic]] and some tex packages #+BEGIN_SRC sh @@ -1123,7 +1140,6 @@ extend org-mode's easy templates, refer to [[http://coldnew.github.io/coldnew-em *** variable-pitch-mode and fixed-pitch-mode [[https://yoo2080.wordpress.com/2013/05/30/monospace-font-in-tables-and-source-code-blocks-in-org-mode-proportional-font-in-other-parts/][monospace font in tables and source code blocks in org-mode, proportional font in other parts]] #+BEGIN_SRC emacs-lisp :tangle yes :results silent - ;; check if the fonts are available (unless (find-font (font-spec :name "Ubuntu Mono")) (warn "Font not found Ubuntu Mono")) (unless (find-font (font-spec :name "Source Code Pro")) @@ -1140,7 +1156,7 @@ extend org-mode's easy templates, refer to [[http://coldnew.github.io/coldnew-em (with-eval-after-load "org" (mapc (lambda (face) (set-face-attribute face nil :inherit 'fixed-pitch)) - (list 'org-code 'org-block 'org-block-background)) + (list 'org-code 'org-block 'org-block-background 'org-block-begin-line 'org-block-end-line)) (set-face-attribute 'org-table nil :family "Ubuntu Mono" :height 140) ;; org-special-keyword inherited from font-lock-keywork originally; as org is changed to variable-pitch, it cause ;; the font in special-keywords are not monospace @@ -1237,17 +1253,9 @@ set default eshell history folder ** Eshell erase buffer #+BEGIN_SRC emacs-lisp :tangle yes :results silent - (defun sd/eshell-clear-buffer () - "Clear eshell buffer" - (interactive) - (let ((inhibit-read-only t) - (current-point (- (point-max) (point)))) - (beginning-of-line) - (delete-region (point-min) (point)) - (goto-char (- (point-max) current-point)))) + (require 'utilities) - - (add-hook 'eshell-mode-hook (lambda () + (add-hook 'eshell-mode-hook (lambda () (local-set-key (kbd "C-l") 'sd/eshell-clear-buffer))) #+END_SRC @@ -2958,20 +2966,7 @@ Most use =C-o C-o= to switch buffers; =C-o x, v= to split window; =C-o o= to del #+BEGIN_SRC emacs-lisp :tangle yes :results silent (winner-mode 1) - (defun sd/delete-current-window () - (interactive) - (if (> (length (window-list)) 1) - (delete-window) - (message "Only one Windows now!"))) - - (defun sd/toggle-max-windows () - "Set maximize current if there are multiple windows, if only - one window, window undo" - (interactive) - (if (equal (length (window-list)) 1) - (winner-undo) - (delete-other-windows))) - + (require 'utilities) (defhydra sd/hydra-window (:color red :columns nil) "C-o" ;; windows switch @@ -3481,12 +3476,7 @@ stolen from [[https://github.com/mariolong/emacs.d/blob/f6a061594ef1b5d1f4750e9d Refer [[https://github.com/fnwiya/dotfiles/blob/c9ca79f1b22c919d9f4c3a0f944ba8281255a594/setup/.emacs.d/loader-init/_90-kill-region-or-backward-kill-word.el][kill-region-or-backward-kill-word]] #+BEGIN_SRC emacs-lisp :tangle yes :results silent - (defun sd/kill-region-or-backward-kill-word () - (interactive) - (if (region-active-p) - (kill-region (point) (mark)) - (backward-kill-word 1))) - + (require 'utilities) (global-set-key (kbd "C-w") 'sd/kill-region-or-backward-kill-word) #+END_SRC @@ -3519,16 +3509,6 @@ Refer [[https://github.com/fnwiya/dotfiles/blob/c9ca79f1b22c919d9f4c3a0f944ba828 (define-key perspeen-mode-map (kbd "s-t") 'perspeen-tab-create-tab)) #+END_SRC -* TODO todolist -** Rucket -** player video on iphone for -** SICP -** music searcher -search music on some music web site - - - -** Need separate the Key-bindings and package-initialization * Note ** Check if emacs is in terminal of graphic mode Use =display-graphic-p= instead of =window-system=