:ensure paradox
)
#+END_SRC
+* Disable custom-vars
+#+BEGIN_SRC emacs-lisp
+ ;; Set the custom file to /dev/null and don't bother to load it
+ (setq custom-file "/dev/null")
+#+END_SRC
* Misc functions
** with-library
#+BEGIN_SRC emacs-lisp
#+END_SRC
** Snippets
-
*** Yasnippet
#+BEGIN_SRC emacs-lisp
(use-package yasnippet
(define-key yas-minor-mode-map (kbd "<tab>") nil)
(define-key yas-minor-mode-map (kbd "TAB") nil)
(define-key yas-minor-mode-map (kbd "<backtab>") 'yas-expand)
- ))
+ (setq yas-snippet-dirs '("~/lib/emacs_el/snippets/"
+ "~/lib/emacs_el/yasnippet-snippets/snippets/"))
+ (add-to-list 'hippie-expand-try-functions-list
+ 'yas-hippie-try-expand)
+ )
+ )
+#+END_SRC
+*** Auto-YASnippet
+#+BEGIN_SRC emacs-lisp
+ (use-package auto-yasnippet
+ :bind (("H-w" . aya-create)
+ ("H-y" . aya-expand)
+ )
+ )
#+END_SRC
-
** Helm Flx
[[https://github.com/PythonNut/helm-flx][helm-flx]] implements intelligent helm fuzzy sorting, provided by [[https://github.com/lewang/flx][flx]].
)
#+END_SRC
-** Org
-#+BEGIN_SRC emacs-lisp
- (require 'org-mode-configuration)
-#+END_SRC
*** Org-Gcal
#+BEGIN_SRC emacs-lisp
(use-package calfw
#+BEGIN_SRC emacs-lisp
(use-package ess
:ensure t
- :config (require 'ess_configuration))
+ :config
+ (defun ess-change-directory (path)
+ "Set the current working directory to PATH for both *R* and Emacs."
+ (interactive "DDirectory to change to: ")
+
+ (when (file-exists-p path)
+ (ess-command (concat "setwd(\"" path "\")\n"))
+ ;; use file-name-as-directory to ensure it has trailing /
+ (setq default-directory (file-name-as-directory path))))
+ (add-hook 'ess-mode-hook 'flyspell-prog-mode)
+ ;; outlining support for ess modes
+ (add-hook
+ 'ess-mode-hook
+ '(lambda ()
+ (outline-minor-mode)
+ (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function\\)")
+ (defun outline-level ()
+ (cond ((looking-at "^##### ") 1)
+ ((looking-at "^#### ") 2)
+ ((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3)
+ (t 1000)))
+ ))
+ (add-hook 'ess-mode-hook
+ '(lambda ()
+ (local-set-key (kbd "C-c C-R")
+ 'dla/ess-region-remote-eval)))
+
+ ;; Don't restore history or save workspace image
+ '(inferior-R-args "--no-restore-history --no-save")
+ )
#+END_SRC
** Rainbowmode