                      (interactive)
                      (find-file ,(concat "~/" (cadr item))))))
 
-;; Use IDO ("interactive do") for C-x C-f and other file-finding
-;; operations. There is a known issue (#41) that sometimes causes C-x
-;; b (which is not a file-finding operation, and should be using
-;; Helm) to switch back to IDO. Unfortunately, a consistently
-;; reproducible test case has not been forthcoming.
-(ido-mode 'files)
-
-;; Use fuzzy matching for IDO.
-(setq ido-enable-flex-matching 1)
-
-;; By default, if you type in a filename that does not exist in the
-;; current directory, IDO will wait 0.7 seconds and then whisk you off
-;; to some totally unrelated directory that happens to already have a
-;; file by that filename. Here we turn off that "feature".
-;;
-;; If you want to quickly get to a file somewhere else on the
-;; filesystem, helm-projectile offers a much better user experience.
-;; IDO is better for navigating in the traditional directory-based
-;; system.
-(setq ido-auto-merge-work-directories-length -1)
+(when (equal radian-customize-completion-mechanism 'helm-ido)
+  ;; Use IDO ("interactive do") for C-x C-f and other file-finding
+  ;; operations. There is a known issue (#41) that sometimes causes C-x
+  ;; b (which is not a file-finding operation, and should be using
+  ;; Helm) to switch back to IDO. Unfortunately, a consistently
+  ;; reproducible test case has not been forthcoming.
+  (ido-mode 'files)
+
+  ;; Use fuzzy matching for IDO.
+  (setq ido-enable-flex-matching 1)
+
+  ;; By default, if you type in a filename that does not exist in the
+  ;; current directory, IDO will wait 0.7 seconds and then whisk you off
+  ;; to some totally unrelated directory that happens to already have a
+  ;; file by that filename. Here we turn off that "feature".
+  ;;
+  ;; If you want to quickly get to a file somewhere else on the
+  ;; filesystem, helm-projectile offers a much better user experience.
+  ;; IDO is better for navigating in the traditional directory-based
+  ;; system.
+  (setq ido-auto-merge-work-directories-length -1))
 
 ;; Follow symlinks without prompting. If this isn't done, then you
 ;; will get a prompt every time you edit init.el with M-RET e i. (That

(radian-load-user-config "init.post.local.el")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Packages: Helm

;; Provides a general-purpose completion and narrowing mechanism, and
;; enhanced versions of many standard Emacs commands that use it.
(use-package helm
  :demand t
  :config

  ;; Use Helm mode for many standard Emacs commands.
  (helm-mode 1)

  ;; Fix the unreadable default color for the prefix argument in the
  ;; Helm M-x buffer.
  (when radian-customize-tweak-colors
    (set-face-foreground 'helm-prefarg "#FFFF66"))

  ;; Use fuzzy matching for Helm.
  (setq helm-mode-fuzzy-match t)

  ;; Get rid of the awful background color for buffers corresponding to files
  ;; modified outside of Emacs.
  (when radian-customize-tweak-colors
    (set-face-background 'helm-buffer-saved-out nil))

  :bind (;; Use Helm mode for M-x.
         ("M-x" . helm-M-x))
  ;; Note that Helm has `helm-mode-line-string', but this only affects
  ;; what is shown in the mode line for a Helm buffer.
  :diminish helm-mode)

;; Provides enhanced versions of the Projectile commands that use
;; Helm.
(use-package helm-projectile
  :dependencies (helm)
  :demand t
  :config

  ;; Use Helm mode for Projectile commands. Using helm-projectile-toggle
  ;; instead of helm-projectile-on means we don't get a useless "Turn on
  ;; helm-projectile key bindings" message in the minibuffer during startup.
  ;;
  ;; The local binding of ad-redefinition works around a warning message
  ;; "ad-handle-definition: `tramp-read-passwd' got redefined", as per [1].
  ;;
  ;; [1]: https://github.com/emacs-helm/helm/issues/1498#issuecomment-218249480
  (let ((ad-redefinition-action 'accept))
    (helm-projectile-toggle 1)))

;; Sorts M-x completions by usage.
(use-package smex
  :bind (;; Use smex for M-x.
         ("M-x" . smex)))

;; Provides an enhanced version of smex that uses Helm for completion.
(use-package helm-smex
  :dependencies (helm smex)
  :bind (;; Use helm-smex for M-x.
         ("M-x" . helm-smex)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Packages: User interface

;;;; Load user-specific configuration file (1 of 2)

(radian-load-user-config "init.before.local.el")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Process user-specific configuration

;; Normalize configuration variables.

(unless (member radian-customize-completion-mechanism
                '(helm-ido ivy))
  (lwarn
   '(radian) :error
   "%s is not a valid setting for radian-customize-completion-mechanism, setting to helm-ido"
   radian-customize-completion-mechanism)
  (setq radian-customize-completion-mechanism 'helm-ido))

;; If the user has selected `helm-ido' as their completion framework,
;; then we should disable Ivy and friends. If the user has selected
;; `ivy', then we should disable Helm and friends. Note that this is
;; just for convenience, and the user can override it by using
;; `radian-reenable-package' in their init.before.local.el (because
;; `radian-disable-package' and `radian-reenable-package' are
;; commutative).

(when (equal radian-customize-completion-mechanism 'helm-ido)
  (radian-disable-package 'flx 'ivy 'counsel 'counsel-projectile 'swiper))

(when (equal radian-customize-completion-mechanism 'ivy)
  (radian-disable-package 'helm 'helm-projectile 'helm-smex))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Startup
