From 854626d634eec3787dfe0050e9944d1a84c5f152 Mon Sep 17 00:00:00 2001 From: Daniel Wu Date: Sun, 16 Nov 2014 20:38:09 -0500 Subject: [PATCH 1/9] bring join-line back to default 'J' --- README.md | 13 +++++-------- spacemacs/keybindings.el | 7 ++----- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b8cb94dca710..ce6a52d6213d 100644 --- a/README.md +++ b/README.md @@ -1222,21 +1222,18 @@ Key Binding | Description #### Line formatting -`Spacemacs` replaces the default `J` Vi key binding (join current line with next -line) by a slightly more frequent action which is to `go to the line below point -and indent it`. - -Join lines can still be performed with ` j k` +`Spacemacs` performs `go to the line below point and indent it` with ` j k`. +You may repeat this operation with `evil-repeat` if you need to indent many lines. Line formatting commands start with `j`: Key Binding | Description ------------------|------------------------------------------------------------ -`J` | go to next line and indent it using auto-indent rules -` j j` | same as `J` but will split the current line at point +`J` | join the current line with the next line +` j j` | same as ` j k` but will split the current line at point ` J` | split a quoted string or s-expression in place ` j J` | split a quoted string or s-expression and auto-indent -` j k` | join the current line with the next line +` j k` | go to next line and indent it using auto-indent rules Used together these key bindings are very powerful to quickly reformat the code. diff --git a/spacemacs/keybindings.el b/spacemacs/keybindings.el index a4c615bd0491..cf32cb9a1653 100644 --- a/spacemacs/keybindings.el +++ b/spacemacs/keybindings.el @@ -78,16 +78,13 @@ (setq count (1- count))))) "ik" 'evil-insert-line-above) ;; format --------------------------------------------------------------------- -;; replace J (no leader) key binding for a more frequent action: -;; go and indent line below the point +;; j k key binding for a frequent action: go and indent line below the point ;; J split the current line at point and indent it -;; evil-join can still be perfomed with j k -(define-key evil-normal-state-map "J" (lambda () (interactive) (join-line 1) (sp-newline))) (evil-leader/set-key "J" 'sp-split-sexp "jJ" (lambda () (interactive) (sp-split-sexp 1) (sp-newline)) "jj" 'sp-newline - "jk" 'evil-join) + "jk" (lambda () (interactive) (join-line 1) (sp-newline))) ;; navigation ----------------------------------------------------------------- (evil-leader/set-key "jh" (lambda () (interactive) (push-mark (point)) (evil-beginning-of-line)) From 3eb64009599e839679325aa88cdcde8a564f815c Mon Sep 17 00:00:00 2001 From: Daniel Wu Date: Sun, 16 Nov 2014 21:30:48 -0500 Subject: [PATCH 2/9] added an optional parameter to allow indent many lines --- spacemacs/funcs.el | 12 ++++++++++-- spacemacs/keybindings.el | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/spacemacs/funcs.el b/spacemacs/funcs.el index e0f03294cb8e..f63ac27200c2 100644 --- a/spacemacs/funcs.el +++ b/spacemacs/funcs.el @@ -67,6 +67,14 @@ the current state and point position." (save-excursion (evil-save-state (evil-open-above count)))) +(defun evil-goto-next-line-and-indent (&optional count) + (interactive "p") + (let ((counter (or count 1))) + (while (> counter 0) + (join-line 1) + (sp-newline) + (setq counter (1- counter))))) + ;; from magnars (defun eval-and-replace () "Replace the preceding sexp with its value." @@ -459,7 +467,7 @@ Adapted from `flyspell-correct-word-before-point'." "Default")) :must-match t :alistp t) - + poss word cursor-location start end opoint))) (ispell-pdict-save t))))) @@ -531,7 +539,7 @@ kill internal buffers too." " Fill the line with CHAR up to the given COLUMN" (interactive "cFill with char: \nnUp to column: " char column) - + ) (defun toggle-fullscreen () diff --git a/spacemacs/keybindings.el b/spacemacs/keybindings.el index cf32cb9a1653..dfcf479fe02d 100644 --- a/spacemacs/keybindings.el +++ b/spacemacs/keybindings.el @@ -84,7 +84,7 @@ "J" 'sp-split-sexp "jJ" (lambda () (interactive) (sp-split-sexp 1) (sp-newline)) "jj" 'sp-newline - "jk" (lambda () (interactive) (join-line 1) (sp-newline))) + "jk" 'evil-goto-next-line-and-indent) ;; navigation ----------------------------------------------------------------- (evil-leader/set-key "jh" (lambda () (interactive) (push-mark (point)) (evil-beginning-of-line)) From 668b9f88f921f0b1bb4b6e1ab5e2f320c7b9d092 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 16 Nov 2014 22:36:07 -0500 Subject: [PATCH 3/9] Move contribsys package.el initialization in a function --- core/contribsys.el | 32 +++++++++++++++++--------------- init.el | 3 ++- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/core/contribsys.el b/core/contribsys.el index 0fdf73c3607e..23d7387bd395 100644 --- a/core/contribsys.el +++ b/core/contribsys.el @@ -1,19 +1,4 @@ ;; Spacemacs Contribution System -(require 'package) -(setq package-archives '(("ELPA" . "http://tromey.com/elpa/") - ("gnu" . "http://elpa.gnu.org/packages/") - ("melpa" . "http://melpa.org/packages/"))) -(package-initialize) -(setq warning-minimum-level :error) - -;; Emacs 24.3 and above ships with python.el but in some Emacs 24.3.1 packages -;; for Ubuntu, python.el seems to be missing. -;; This hack adds marmalade repository for this case only. -(unless (or (package-installed-p 'python) (version< emacs-version "24.3")) - (add-to-list 'package-archives - '("marmalade" . "http://marmalade-repo.org/packages/"))) - -(load (concat spacemacs-core-directory "ht.el")) (defconst spacemacs-dotspacemacs-version "1.0" "Minimum Version exepected for ~/.spacemacs file.") @@ -78,6 +63,23 @@ NOT USED FOR NOW :-)" (defvar dotspacemacs-excluded-packages '() "A list of packages and/or extensions that will not be install and loaded.") +(defun contribsys/package.el-initialize () + "Initialize package.el" + (require 'package) + (unless package--initialized + (load (concat spacemacs-core-directory "ht.el")) + (setq package-archives '(("ELPA" . "http://tromey.com/elpa/") + ("gnu" . "http://elpa.gnu.org/packages/") + ("melpa" . "http://melpa.org/packages/"))) + (package-initialize) + ;; Emacs 24.3 and above ships with python.el but in some Emacs 24.3.1 packages + ;; for Ubuntu, python.el seems to be missing. + ;; This hack adds marmalade repository for this case only. + (unless (or (package-installed-p 'python) (version< emacs-version "24.3")) + (add-to-list 'package-archives + '("marmalade" . "http://marmalade-repo.org/packages/"))) + (setq warning-minimum-level :error))) + (defun contribsys/dotfile-location () "Return the absolute path to the spacemacs dotfile." (concat user-home-directory ".spacemacs")) diff --git a/init.el b/init.el index 8638bbb19ff9..e9cc656fa176 100644 --- a/init.el +++ b/init.el @@ -2,6 +2,7 @@ (defconst spacemacs-core-directory (expand-file-name (concat user-emacs-directory "core/")) "Spacemacs core directory.") +(load (concat spacemacs-core-directory "contribsys.el")) (load (concat spacemacs-core-directory "spacemacs-mode.el")) (spacemacs/buffer) @@ -31,7 +32,7 @@ "Dropbox directory.") ;; if you have a dropbox, then ~/Dropbox/emacs is added to load path (add-to-list 'load-path (concat user-dropbox-directory "emacs/")) - (load (concat spacemacs-core-directory "contribsys.el")) + (contribsys/package.el-initialize) ;; User configuration file for Spacemacs: ~/.spacemacs (contribsys/load-dotfile) (contribsys/call-dotfile-func dotspacemacs/init) From 4b46e83172af7f1aeb7cf6e4e96098f253ce2f5f Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 16 Nov 2014 22:39:03 -0500 Subject: [PATCH 4/9] Move theme and UI elements config to spacemacs-mode --- core/spacemacs-mode.el | 80 +++++++++++++++++++++++++++++++++++------- spacemacs/config.el | 24 ------------- 2 files changed, 68 insertions(+), 36 deletions(-) diff --git a/core/spacemacs-mode.el b/core/spacemacs-mode.el index 691f584b9e82..b8e7bffc812b 100644 --- a/core/spacemacs-mode.el +++ b/core/spacemacs-mode.el @@ -4,6 +4,20 @@ (defvar spacemacs-min-version "24.3" "Mininal required version of Emacs.") +(defvar spacemacs-title-length 70) +(defvar spacemacs-loading-counter 0) +(defvar spacemacs-loading-text "Loading") +(defvar spacemacs-loading-done-text "Ready!") +(defvar spacemacs-loading-dots-chunk-count 3) +(defvar spacemacs-loading-dots-count + (- spacemacs-title-length + (length spacemacs-loading-text) + (length spacemacs-loading-done-text))) +(defvar spacemacs-loading-dots-chunk-size + (/ spacemacs-loading-dots-count spacemacs-loading-dots-chunk-count)) +(defvar spacemacs-loading-dots-chunk-threshold 0) +(defvar spacemacs-solarized-dark-createdp nil) + (define-derived-mode spacemacs-mode special-mode "spacemacs-mode" "Spacemacs major mode for startup screen." :syntax-table nil @@ -12,10 +26,57 @@ (setq cursor-type nil) ;; no welcome buffer (setq inhibit-startup-screen t) + ;; load the default theme manually to give a smooth startup experience + (spacemacs/load-or-install-package 'dash) + (add-to-list 'load-path "~/.emacs.d/spacemacs/extensions/solarized-theme/") + (require 'solarized) + (deftheme solarized-dark "The dark variant of the Solarized colour theme") + (deftheme solarized-light "The light variant of the Solarized colour theme") + (create-solarized-theme 'light 'solarized-light) + ;; font + ;; Dynamic font size depending on the system + (let ((font "Source Code Pro")) + (when (member font (font-family-list)) + (pcase window-system + (`x (spacemacs/set-font font 10)) + (`mac (spacemacs/set-font font 12)) + (`w32 (spacemacs/set-font font 9)) + (other (spacemacs/set-font font 10))))) + ;; edit area full screen + (tool-bar-mode -1) + (when (not (eq window-system 'mac)) + (menu-bar-mode -1)) + (scroll-bar-mode -1) ;; motion state since this is a special mode (eval-after-load 'evil '(add-to-list 'evil-motion-state-modes 'spacemacs-mode))) +(defun spacemacs/load-or-install-package (pkg) + "Load PKG package. PKG will be installed if it is not already +installed." + (condition-case nil + (require pkg) + (error + ;; not installed, we try to initialize package.el only if required to + ;; precious seconds during boot time + (require 'cl) + (let* ((elpa-dir (concat user-emacs-directory "elpa/")) + (pkg-elpa-dir + (if (file-exists-p elpa-dir) + (reduce (lambda (x y) (if x x y)) + (mapcar (lambda (x) + (if (string-match (symbol-name pkg) x) x)) + (directory-files elpa-dir)) + :initial-value nil)))) + (if pkg-elpa-dir + (add-to-list 'load-path (concat user-emacs-directory "elpa/" + pkg-elpa-dir)) + ;; install the package + (contribsys/package.el-initialize) + (package-refresh-contents) + (package-install pkg)) + (require pkg))))) + (defun spacemacs/emacs-version-ok () (not (version< emacs-version spacemacs-min-version))) @@ -23,18 +84,13 @@ "Change the default welcome message of minibuffer to another one." (message "Spacemacs is ready.")) -(defvar spacemacs-title-length 70) -(defvar spacemacs-loading-counter 0) -(defvar spacemacs-loading-text "Loading") -(defvar spacemacs-loading-done-text "Ready!") -(defvar spacemacs-loading-dots-chunk-count 3) -(defvar spacemacs-loading-dots-count - (- spacemacs-title-length - (length spacemacs-loading-text) - (length spacemacs-loading-done-text))) -(defvar spacemacs-loading-dots-chunk-size - (/ spacemacs-loading-dots-count spacemacs-loading-dots-chunk-count)) -(defvar spacemacs-loading-dots-chunk-threshold 0) +(defun spacemacs/set-font (font size &optional options) + (let* ((fontstr (if options + (format "%s-%s:%s" font size options) + (format "%s-%s" font size)))) + (message (format "Set default font: %s" fontstr)) + (add-to-list 'default-frame-alist (cons 'font fontstr)) + (set-default-font fontstr))) (defun spacemacs/buffer () "Create and initialize the spacemacs startup buffer." diff --git a/spacemacs/config.el b/spacemacs/config.el index 1e538b69bd0f..b0ed05564bb1 100644 --- a/spacemacs/config.el +++ b/spacemacs/config.el @@ -22,17 +22,9 @@ ;; Edit ;; --------------------------------------------------------------------------- -;; set the 2 keys sequence to return to normal state -;; default is "fd" -(defvar spacemacs-normal-state-sequence '(?f . ?d) - "Two keys sequence to return to normal state.") -(defvar spacemacs-normal-state-sequence-delay 0.2 - "Maximum delay between the two keys to trigger the normal state.") ;; start scratch in text mode (usefull to get a faster Emacs load time ;; because it avoids autoloads of elisp modes) (setq initial-major-mode 'text-mode) -;; font size -;;(set-face-attribute 'default nil :height 110) ;; whitespace-mode (setq-default show-trailing-whitespace nil) ;; When point is on paranthesis, highlight the matching one @@ -52,11 +44,6 @@ (lambda () (setq mode-name "Elisp"))) ;; important for golden-ratio to better work (setq window-combination-resize t) -;; edit area full screen -(tool-bar-mode -1) -(when (not (eq window-system 'mac)) - (menu-bar-mode -1)) -(scroll-bar-mode -1) ;; fringes (setq-default fringe-indicator-alist '((truncation . nil) (continuation . nil))) @@ -73,16 +60,6 @@ (setq tooltip-use-echo-area t) ;; When emacs asks for "yes" or "no", let "y" or "n" sufficide (fset 'yes-or-no-p 'y-or-n-p) -;; font -;; (set-default-font "DejaVu Sans Mono-10") -;; Dynamic font size depending on the system -(let ((font "Source Code Pro")) - (when (member font (font-family-list)) - (pcase window-system - (`x (spacemacs/set-font font 10)) - (`mac (spacemacs/set-font font 12)) - (`w32 (spacemacs/set-font font 9)) - (other (spacemacs/set-font font 10))))) ;; draw underline lower (setq x-underline-at-descent-line t) ;; setup right and left margins @@ -239,4 +216,3 @@ (defun server-remove-kill-buffer-hook () (remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function)) (add-hook 'server-visit-hook 'server-remove-kill-buffer-hook) - From 39f4dbdab1383f927635fe4dfb1744e5f20eb125 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 16 Nov 2014 22:39:37 -0500 Subject: [PATCH 5/9] Update load-theme advice to lazy create solarized-dark --- spacemacs/funcs.el | 86 +++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/spacemacs/funcs.el b/spacemacs/funcs.el index e0f03294cb8e..faf1cc893132 100644 --- a/spacemacs/funcs.el +++ b/spacemacs/funcs.el @@ -51,6 +51,49 @@ (interactive) (string-equal system-type "windows-nt")) +;; From http://stackoverflow.com/a/18796138 +;; Cycle through this set of themes +(defvar spacemacs-themes '(solarized-light + solarized-dark + monokai + zenburn) + "Themes officially supported by spacemacs.") +(defvar spacemacs-cur-theme (pop spacemacs-themes) + "Current spacemacs theme.") + +(defun spacemacs/cycle-spacemacs-theme () + "Cycle through themes defined in spacemacs-themes." + (interactive) + (when spacemacs-cur-theme + (disable-theme spacemacs-cur-theme) + (setq spacemacs-themes (append spacemacs-themes + (list spacemacs-cur-theme)))) + (setq spacemacs-cur-theme (pop spacemacs-themes)) + (message "Loading theme %s..." spacemacs-cur-theme) + (load-theme spacemacs-cur-theme t)) + +(defadvice load-theme (around spacemacs/load-theme-adv activate) + "Perform post load processing." + (let ((theme (ad-get-arg 0))) + (if (and spacemacs-solarized-dark-createdp + (eq 'solarized-dark theme)) + (create-solarized-theme 'dark 'solarized-dark)) + ad-do-it + (setq spacemacs-cur-theme theme) + (spacemacs/post-theme-init theme))) + +(defun spacemacs/post-theme-init (theme) + " Some processing that needs to be done when the current theme has been +changed to THEME." + (interactive) + ;; Define a face for each state + (if (fboundp 'spacemacs/set-state-faces) + (spacemacs/set-state-faces)) + (if (fboundp 'spacemacs/set-flycheck-mode-line-faces) + (spacemacs/set-flycheck-mode-line-faces)) + (if (fboundp 'powerline-reset) + (powerline-reset))) + ;; insert one or several line below without changing current evil state (defun evil-insert-line-below (count) "Insert one of several lines below the current point's line without changing @@ -302,41 +345,6 @@ argument takes the kindows rotate backwards." "Edit the `file' in the spacemacs base directory, in the current window." (ido-find-file-in-dir spacemacs-contrib-config-directory)) -;; From http://stackoverflow.com/a/18796138 -;; Cycle through this set of themes -(setq spacemacs-themes '(solarized-light - solarized-dark - monokai - zenburn)) -(defvar spacemacs-cur-theme (pop spacemacs-themes)) -(defun spacemacs/cycle-spacemacs-theme () - "Cycle through themes defined in spacemacs-themes." - (interactive) - (when spacemacs-cur-theme - (disable-theme spacemacs-cur-theme) - (setq spacemacs-themes (append spacemacs-themes - (list spacemacs-cur-theme)))) - (setq spacemacs-cur-theme (pop spacemacs-themes)) - (message "Loading theme %s..." spacemacs-cur-theme) - (load-theme spacemacs-cur-theme t)) - -(defadvice load-theme (after spacemacs/load-theme-adv activate) - "Perform post load processing." - (setq spacemacs-cur-theme (ad-get-arg 0)) - (spacemacs/post-theme-init spacemacs-cur-theme)) - -(defun spacemacs/post-theme-init (theme) - " Some processing that needs to be done when the current theme has been -changed to THEME." - (interactive) - ;; Define a face for each state - (if (fboundp 'spacemacs/set-state-faces) - (spacemacs/set-state-faces)) - (if (fboundp 'spacemacs/set-flycheck-mode-line-faces) - (spacemacs/set-flycheck-mode-line-faces)) - (if (fboundp 'powerline-reset) - (powerline-reset))) - ;; From http://xugx2007.blogspot.ca/2007/06/benjamin-rutts-emacs-c-development-tips.html (setq compilation-finish-function (lambda (buf str) @@ -548,14 +556,6 @@ kill internal buffers too." (when (not (frame-parameter nil 'fullscreen)) 'fullscreen))) )) -(defun spacemacs/set-font (font size &optional options) - (let* ((fontstr (if options - (format "%s-%s:%s" font size options) - (format "%s-%s" font size)))) - (message (format "Set default font: %s" fontstr)) - (add-to-list 'default-frame-alist (cons 'font fontstr)) - (set-default-font fontstr))) - (defun spacemacs/scale-font-size-overlay-map () "Set a temporary overlay map to easily change the font size." (set-temporary-overlay-map From 37e57f2659bb4694e24502f7c89351b79d4843d8 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 16 Nov 2014 22:40:21 -0500 Subject: [PATCH 6/9] Remove solarized theme init from spacemacs/extensions.el --- spacemacs/extensions.el | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/spacemacs/extensions.el b/spacemacs/extensions.el index 62fb7812b79b..cb7ef9502eca 100644 --- a/spacemacs/extensions.el +++ b/spacemacs/extensions.el @@ -4,7 +4,6 @@ (defvar spacemacs-pre-extensions '( use-package - solarized-theme )) ;; Post extensions are loaded *after* the packages @@ -99,20 +98,3 @@ (spray-quit) (set-default-evil-insert-state-cursor) (evil-normal-state)))))) - -;; solarized theme dependencies -(unless (package-installed-p 'dash) - (package-refresh-contents) - (package-install 'dash)) -(defun spacemacs/init-solarized-theme () - ;; different method used than the documented one in order to speed up the - ;; loading of emacs - (use-package solarized - :init - (progn - (deftheme solarized-dark "The dark variant of the Solarized colour theme") - (create-solarized-theme 'dark 'solarized-dark) - (deftheme solarized-light "The light variant of the Solarized colour theme") - (create-solarized-theme 'light 'solarized-light) - (spacemacs/post-theme-init 'solarized-light) - (redisplay)))) From 9234f4785255372e61ea9dde9a7156585d5b3c27 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 16 Nov 2014 22:44:45 -0500 Subject: [PATCH 7/9] Move coffeescript init to appropriate place --- spacemacs/packages.el | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 2a5c7df28ab1..772c9593527b 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -772,6 +772,23 @@ determine the state to enable when escaping from the insert state.") ("\\.cmake\\'" . cmake-mode)) auto-mode-alist)))) +(defun spacemacs/init-coffee-mode () + (use-package coffee-mode + :defer t + :init + (progn + (defun spacemacs/coffee-indent () + (if (coffee-line-wants-indent) + ;; We need to insert an additional tab because the last line was special. + (coffee-insert-spaces (+ (coffee-previous-indent) coffee-tab-width)) + ;; otherwise keep at the same indentation level + (coffee-insert-spaces (coffee-previous-indent))) + ) + ;; indent to right position after `evil-open-blow' and `evil-open-above' + (add-hook 'coffee-mode-hook '(lambda () + (setq indent-line-function 'spacemacs/coffee-indent + evil-shift-width coffee-tab-width)))))) + (defun spacemacs/init-csharp-mode () (use-package csharp-mode :defer t)) @@ -1918,20 +1935,3 @@ determine the state to enable when escaping from the insert state.") (defun spacemacs/init-zenburn-theme () (use-package zenburn-theme :defer t)) - -(defun spacemacs/init-coffee-mode () - (use-package coffee-mode - :defer t - :init - (progn - (defun spacemacs/coffee-indent () - (if (coffee-line-wants-indent) - ;; We need to insert an additional tab because the last line was special. - (coffee-insert-spaces (+ (coffee-previous-indent) coffee-tab-width)) - ;; otherwise keep at the same indentation level - (coffee-insert-spaces (coffee-previous-indent))) - ) - ;; indent to right position after `evil-open-blow' and `evil-open-above' - (add-hook 'coffee-mode-hook '(lambda () - (setq indent-line-function 'spacemacs/coffee-indent - evil-shift-width coffee-tab-width)))))) From a7d9e66d2378bc03820b9beb8357239ed341b6ce Mon Sep 17 00:00:00 2001 From: capdevc Date: Sun, 16 Nov 2014 12:31:46 -0500 Subject: [PATCH 8/9] Fix find-dotfile function The contribsys/dotfile-location function wasn't being evaluated --- spacemacs/funcs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacemacs/funcs.el b/spacemacs/funcs.el index faf1cc893132..8d538888f1a7 100644 --- a/spacemacs/funcs.el +++ b/spacemacs/funcs.el @@ -333,7 +333,7 @@ argument takes the kindows rotate backwards." (defun find-dotfile () "Edit the `dotfile', in the current window." (interactive) - (find-file-existing contribsys/dotfile-location)) + (find-file-existing (contribsys/dotfile-location))) (defun find-spacemacs-file () (interactive) From 9c46f350b6b28fb6b4a50f574d8862dcc529afdd Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Sun, 16 Nov 2014 23:38:57 -0500 Subject: [PATCH 9/9] Fixes #115 Unable to customize org agenda files --- spacemacs/packages.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 772c9593527b..e8ef7573ab4d 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1605,12 +1605,13 @@ determine the state to enable when escaping from the insert state.") (defun spacemacs/init-org () (use-package org :mode ("\\.org$" . org-mode) + :init + (setq org-log-done t) :config (progn (require 'org-install) (define-key global-map "\C-cl" 'org-store-link) (define-key global-map "\C-ca" 'org-agenda) - (setq org-log-done t) (setq org-agenda-files '("~/Dropbox/org")) (use-package org-bullets :config