whitespace and hippe-expand
authorJoerg Jaspert <joerg@ganneff.de>
Tue, 19 Mar 2013 15:12:46 +0000 (16:12 +0100)
committerJoerg Jaspert <joerg@ganneff.de>
Tue, 19 Mar 2013 15:12:46 +0000 (16:12 +0100)
.emacs.d/config/emacs.org

index 6df1fe8..dbfbf9b 100644 (file)
@@ -56,7 +56,7 @@ Copyright © 2001-2012 Sacha Chua (sacha@sachachua.com).
 
 Please feel free to reuse content under a [[http://creativecommons.org/licenses/by-nc-sa/3.0/][Creative Commons —
 Attribution-NonCommercial-ShareAlike Unported — CC BY-NC-SA]] license
-unless otherwise noted. 
+unless otherwise noted.
 #+END_QUOTE
 ----------
 
@@ -74,12 +74,12 @@ Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3
 or any later version published by the Free Software Foundation;
 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
-  
+
 Code in this document is free software: you can redistribute it
 and/or modify it under the terms of the GNU General Public
 License as published by the Free Software Foundation, either
 version 3 of the License, or (at your option) any later version.
-  
+
 This code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -135,7 +135,7 @@ them first.
   #+BEGIN_SRC emacs-lisp
     (defvar safe-load-error-list ""
             "*List of files that reported errors when loaded via safe-load")
-    
+
     (defun safe-load (file &optional noerror nomessage nosuffix)
       "Load a file.  If error on load, report back, wait for
        a key stroke then continue on"
@@ -147,7 +147,7 @@ them first.
            (message "****** [Return to continue] Error loading %s" safe-load-error-list )
             (sleep-for 1)
            nil))))
-    
+
     (defun safe-load-check ()
      "Check for any previous safe-load loading errors.  (safe-load.el)"
       (interactive)
@@ -400,7 +400,7 @@ Basic settings for emacs integrated shell, using zsh
      (add-to-list 'eshell-command-completions-alist
                   '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'"))
      (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color)))
-  
+
 
 #+END_SRC
 *** Global keyboard changes not directly related to a mode
@@ -439,23 +439,23 @@ Make the % key jump to the matching {}[]() if on another, like vi, see [[id:b6e6
 #+END_SRC
 
 Instead of the default "mark-defun" I want a more readline-like setting.
-#+begin_src emacs-lisp 
+#+begin_src emacs-lisp
 (global-set-key (kbd "C-M-h") 'backward-kill-word)
 #+end_src
 
 Align whatever with a regexp.
-#+begin_src emacs-lisp 
+#+begin_src emacs-lisp
 (global-set-key (kbd "C-x \\") 'align-regexp)
 #+end_src
 
 Font size changes
-#+begin_src emacs-lisp 
+#+begin_src emacs-lisp
 (global-set-key (kbd "C-+") 'text-scale-increase)
 (global-set-key (kbd "C--") 'text-scale-decrease)
 #+end_src
 
 Regexes are too useful, so use the regex search by default.
-#+begin_src emacs-lisp 
+#+begin_src emacs-lisp
 (global-set-key (kbd "C-s") 'isearch-forward-regexp)
 (global-set-key (kbd "\C-r") 'isearch-backward-regexp)
 (global-set-key (kbd "C-M-s") 'isearch-forward)
@@ -1146,19 +1146,19 @@ much more like reading and editing of code using its major mode.
 #+BEGIN_SRC emacs-lisp
   (setq org-src-fontify-natively t)
   (setq org-src-tab-acts-natively t)
-  
+
   ; For tag searches ignore tasks with scheduled and deadline dates
   (setq org-agenda-tags-todo-honor-ignore-options t)
-  
+
   ;;** org capture replaces remember mode
   (setq org-directory "~/org")
   (setq org-default-notes-file "~/org/refile.org")
-  
+
   ;; I use C-M-r to start capture mode
   (global-set-key (kbd "C-M-r") 'org-capture)
   ;; I use C-c r to start capture mode when using SSH from my Android phone
   (global-set-key (kbd "C-c r") 'org-capture)
-  
+
   ;; Capture templates for: TODO tasks, Notes, appointments, phone calls, and org-protocol
   ;; see http://orgmode.org/manual/Template-elements.html
   (setq org-capture-templates
@@ -1198,117 +1198,117 @@ much more like reading and editing of code using its major mode.
                 ("h" "Habit" entry (file "~/org/refile.org")
                  "* NEXT %?\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\nAdded: %U\nSCHEDULED: %t .+1d/3d\n")
                 )))
-  
+
   ; Targets include this file and any file contributing to the agenda - up to 9 levels deep
   (setq org-refile-targets (quote ((nil :maxlevel . 9)
                                    (org-agenda-files :maxlevel . 9))))
-  
+
   ; Use full outline paths for refile targets - we file directly with IDO
   (setq org-refile-use-outline-path t)
-  
+
   ; Targets complete directly with IDO
   (setq org-outline-path-complete-in-steps nil)
-  
+
   ; Allow refile to create parent tasks with confirmation
   (setq org-refile-allow-creating-parent-nodes (quote confirm))
-  
+
   ; Use IDO for both buffer and file completion and ido-everywhere to t
   (setq org-completion-use-ido t)
   (setq org-completion-use-iswitchb nil)
-  
+
   ;;;; Refile settings
   (setq org-refile-target-verify-function 'bh/verify-refile-target)
-  
+
   ;; Do not dim blocked tasks
   (setq org-agenda-dim-blocked-tasks nil)
   ;; Compact the block agenda view
   (setq org-agenda-compact-blocks t)
-  
-  
+
+
   ;; disable the default org-mode stuck projects agenda view
   (setq org-stuck-projects (quote ("" nil nil "")))
-  
+
   ; force showing the next headline.
   (setq org-show-entry-below (quote ((default))))
-  
+
   (setq org-show-following-heading t)
   (setq org-show-hierarchy-above t)
   (setq org-show-siblings (quote ((default))))
-  
+
   (setq org-special-ctrl-a/e 'reversed)
   (setq org-special-ctrl-k t)
   (setq org-yank-adjusted-subtrees t)
-  
-  
+
+
   ;; Always hilight the current agenda line
   (add-hook 'org-agenda-mode-hook
             '(lambda () (hl-line-mode 1))
             'append)
-  
+
   ;; Keep tasks with dates on the global todo lists
   (setq org-agenda-todo-ignore-with-date nil)
-  
+
   ;; Keep tasks with deadlines on the global todo lists
   (setq org-agenda-todo-ignore-deadlines nil)
-  
+
   ;; Keep tasks with scheduled dates on the global todo lists
   (setq org-agenda-todo-ignore-scheduled nil)
-  
+
   ;; Keep tasks with timestamps on the global todo lists
   (setq org-agenda-todo-ignore-timestamp nil)
-  
+
   ;; Remove completed deadline tasks from the agenda view
   (setq org-agenda-skip-deadline-if-done t)
-  
+
   ;; Remove completed scheduled tasks from the agenda view
   (setq org-agenda-skip-scheduled-if-done t)
-  
+
   ;; Remove completed items from search results
   (setq org-agenda-skip-timestamp-if-done t)
-  
+
   ;; Include agenda archive files when searching for things
   (setq org-agenda-text-search-extra-files (quote (agenda-archives)))
-  
+
   ;; Show all future entries for repeating tasks
   (setq org-agenda-repeating-timestamp-show-all t)
-  
+
   ;; Show all agenda dates - even if they are empty
   (setq org-agenda-show-all-dates t)
-  
+
   ;; Sorting order for tasks on the agenda
   (setq org-agenda-sorting-strategy
         (quote ((agenda habit-down time-up user-defined-up priority-down effort-up category-keep)
                 (todo category-up priority-down effort-up)
                 (tags category-up priority-down effort-up)
                 (search category-up))))
-  
+
   ;; Start the weekly agenda on Monday
   (setq org-agenda-start-on-weekday 1)
-  
+
   ;; Enable display of the time grid so we can see the marker for the current time
   (setq org-agenda-time-grid (quote ((daily today remove-match)
                                      #("----------------" 0 16 (org-heading t))
                                      (0800 1000 1200 1400 1500 1700 1900 2100))))
-  
+
   ;; Display tags farther right
   (setq org-agenda-tags-column -102)
-  
+
   ; position the habit graph on the agenda to the right of the default
   (setq org-habit-graph-column 50)
-  
+
   ; turn habits back on
   (run-at-time "06:00" 86400 '(lambda () (setq org-habit-show-habits t)))
-  
+
   ;;
   ;; Agenda sorting functions
   ;;
   (setq org-agenda-cmp-user-defined 'bh/agenda-sort)
-  
-  
+
+
   (setq org-deadline-warning-days 30)
-  
+
   (setq org-table-export-default-format "orgtbl-to-csv")
-  
+
   ;; Custom agenda command definitions
   (setq org-agenda-custom-commands
         (quote (("N" "Notes" tags "NOTE"
@@ -1390,60 +1390,60 @@ much more like reading and editing of code using its major mode.
                  ((org-agenda-overriding-header "Tasks to Archive")
                   (org-agenda-skip-function 'bh/skip-non-archivable-tasks)
                   (org-tags-match-list-sublevels nil))))))
-  
+
   (setq org-archive-mark-done nil)
   (setq org-archive-location "%s_archive::* Archived Tasks")
-  
+
   (setq org-startup-folded 'content)
-  
+
   (global-set-key (kbd "<f9> p") 'bh/phone-call)
-  
+
   (setq org-remove-highlights-with-change nil)
-  
+
   (setq org-list-demote-modify-bullet (quote (("+" . "-")
       ("*" . "-")
       ("1." . "-")
       ("1)" . "-"))))
-  
+
   (setq org-agenda-persistent-filter t)
-  
-  
+
+
   (add-hook 'org-clock-out-hook 'bh/remove-empty-drawer-on-clock-out 'append)
   (add-hook 'org-insert-heading-hook 'bh/insert-heading-inactive-timestamp 'append)
-  
+
   (add-hook 'org-agenda-mode-hook
             '(lambda () (org-defkey org-agenda-mode-map "W" 'bh/widen))
             'append)
-  
+
   (add-hook 'org-agenda-mode-hook
             '(lambda () (org-defkey org-agenda-mode-map "F" 'bh/restrict-to-file-or-follow))
             'append)
-  
+
   (add-hook 'org-agenda-mode-hook
             '(lambda () (org-defkey org-agenda-mode-map "N" 'bh/narrow-to-subtree))
             'append)
-  
+
   (add-hook 'org-agenda-mode-hook
             '(lambda () (org-defkey org-agenda-mode-map "U" 'bh/narrow-up-one-level))
             'append)
-  
+
   (add-hook 'org-agenda-mode-hook
             '(lambda () (org-defkey org-agenda-mode-map "P" 'bh/narrow-to-project))
             'append)
-  
+
   ; Rebuild the reminders everytime the agenda is displayed
   (add-hook 'org-finalize-agenda-hook 'bh/org-agenda-to-appt 'append)
-  
+
   ; This is at the end of my .emacs - so appointments are set up when Emacs starts
   (bh/org-agenda-to-appt)
-  
+
   ; Activate appointments so we get notifications
   (appt-activate t)
-  
+
   ; If we leave Emacs running overnight - reset the appointments one minute after midnight
   (run-at-time "24:01" nil 'bh/org-agenda-to-appt)
-  
-  
+
+
   ;;
   ;; Resume clocking task when emacs is restarted
   (org-clock-persistence-insinuate)
@@ -1470,35 +1470,35 @@ much more like reading and editing of code using its major mode.
   (setq org-clock-auto-clock-resolution (quote when-no-clock-is-running))
   ;; Include current clocking task in clock reports
   (setq org-clock-report-include-clocking-task t)
-  
+
   ; use discrete minute intervals (no rounding) increments
   (setq org-time-stamp-rounding-minutes (quote (1 1)))
-  
+
   (setq bh/keep-clock-running nil)
-  
+
   (setq org-agenda-clock-consistency-checks
         (quote (:max-duration "4:00"
                 :min-duration 0
                 :max-gap 0
                 :gap-ok-around ("4:00"))))
-  
+
   ;; Agenda clock report parameters
   (setq org-agenda-clockreport-parameter-plist
         (quote (:link t :maxlevel 5 :fileskip0 t :compact t :narrow 80)))
-  
+
   ; Set default column view headings: Task Effort Clock_Summary
   (setq org-columns-default-format "%80ITEM(Task) %10Effort(Effort){:} %10CLOCKSUM")
-  
+
   ; global Effort estimate values
   ; global STYLE property values for completion
   (setq org-global-properties (quote (("Effort_ALL" . "0:15 0:30 0:45 1:00 2:00 3:00 4:00 5:00 6:00 0:00")
                                       ("STYLE_ALL" . "habit"))))
-  
+
   ;; Agenda log mode items to display (closed and state changes by default)
   (setq org-agenda-log-mode-items (quote (state)))
-  
+
   (add-hook 'org-clock-out-hook 'bh/clock-out-maybe 'append)
-  
+
   ;;; define categories that should be excluded
   (setq org-export-exclude-category (list "google" "google"))
   (setq org-icalendar-use-scheduled '(todo-start event-if-todo))
@@ -1536,14 +1536,14 @@ much more like reading and editing of code using its major mode.
       )
 #+END_SRC
 #+BEGIN_SRC emacs-lisp
-  (setq org-latex-to-pdf-process 
+  (setq org-latex-to-pdf-process
         '("xelatex -interaction nonstopmode %f"
           "xelatex -interaction nonstopmode %f")) ;; for multiple passes
   #+END_SRC
 #+BEGIN_SRC emacs-lisp
   (require 'org-latex)
   (setq org-export-latex-listings 'minted)
-  
+
   ;; Originally taken from Bruno Tavernier: http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432
   ;; but adapted to use latexmk 4.20 or higher.
   (defun my-auto-tex-cmd ()
@@ -1560,9 +1560,9 @@ much more like reading and editing of code using its major mode.
         (setq texcmd "latexmk -pdflatex='xelatex -shell-escape' -pdf -quiet %f"))
     ;; LaTeX compilation command
     (setq org-latex-to-pdf-process (list texcmd)))
-  
+
   (add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-cmd)
-  
+
   ;; Specify default packages to be included in every tex file, whether pdflatex or xelatex
   (setq org-export-latex-packages-alist
         '(("" "graphicx" t)
@@ -1570,7 +1570,7 @@ much more like reading and editing of code using its major mode.
           ("" "float" nil)
           ("" "minted" nil)
           ))
-  
+
   (defun my-auto-tex-parameters ()
         "Automatically select the tex packages to include."
         ;; default packages for ordinary latex or pdflatex export
@@ -1586,7 +1586,7 @@ much more like reading and editing of code using its major mode.
                 (""     "latexsym"  t)
                 (""     "amssymb"   t)
                 (""     "hyperref"  nil)))
-  
+
         ;; Packages to include when xelatex is used
         (if (string-match "LATEX_CMD: xelatex" (buffer-string))
             (setq org-export-latex-default-packages-alist
@@ -1599,7 +1599,7 @@ much more like reading and editing of code using its major mode.
                     ("" "soul" t)
                     ("xetex" "hyperref" nil)
                     )))
-  
+
         (if (string-match "LATEX_CMD: xelatex" (buffer-string))
             (setq org-export-latex-classes
                   (cons '("scrartcl"
@@ -1610,7 +1610,7 @@ much more like reading and editing of code using its major mode.
                           ("\\paragraph{%s}" . "\\paragraph*{%s}")
                           ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                         org-export-latex-classes))))
-  
+
   (add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-parameters)
 #+END_SRC
 #+BEGIN_SRC emacs-lisp
@@ -1702,7 +1702,7 @@ I took the following from [[http://www.emacswiki.org/emacs/EasyPG][EmacsWiki: Ea
 #+BEGIN_SRC emacs-lisp
   (require 'message)
   (setq message-kill-buffer-on-exit t)
-  
+
 #+END_SRC
 ** gnus
 Most of my gnus config is in an own file, [[file:gnus.org][gnus.org]], here I only have
@@ -1734,6 +1734,20 @@ what I want every emacs to know.
 #+END_SRC
 ** w3m
 
+** hippie-exp
+#+BEGIN_SRC emacs-lisp
+  (require 'hippie-exp)
+  (setq hippie-expand-try-functions-list '(try-expand-dabbrev 
+                                           try-expand-dabbrev-all-buffers 
+                                           try-expand-dabbrev-from-kill 
+                                           try-complete-file-name-partially 
+                                           try-complete-file-name 
+                                           try-expand-all-abbrevs try-expand-list
+                                           try-expand-line 
+                                           try-complete-lisp-symbol-partially 
+                                           try-complete-lisp-symbol))
+  (global-set-key (kbd "M-/") 'hippie-expand)
+#+END_SRC
 
 * Customized variables
 :PROPERTIES: