2019-12-23 17:20:19 -05:00
|
|
|
;;; config/default/autoload/files.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +default/browse-project ()
|
|
|
|
"Browse files from the current project's root."
|
|
|
|
(interactive) (doom-project-browse (doom-project-root)))
|
|
|
|
;; NOTE No need for find-in-project, use `projectile-find-file'
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +default/browse-templates ()
|
|
|
|
"Browse files from `+file-templates-dir'."
|
|
|
|
(interactive) (doom-project-browse +file-templates-dir))
|
|
|
|
;;;###autoload
|
|
|
|
(defun +default/find-in-templates ()
|
|
|
|
"Find a file under `+file-templates-dir', recursively."
|
|
|
|
(interactive) (doom-project-find-file +file-templates-dir))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +default/browse-emacsd ()
|
|
|
|
"Browse files from `doom-emacs-dir'."
|
|
|
|
(interactive) (doom-project-browse doom-emacs-dir))
|
|
|
|
;;;###autoload
|
|
|
|
(defun +default/find-in-emacsd ()
|
|
|
|
"Find a file under `doom-emacs-dir', recursively."
|
|
|
|
(interactive) (doom-project-find-file doom-emacs-dir))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +default/browse-notes ()
|
|
|
|
"Browse files from `org-directory'."
|
2020-04-25 15:40:24 -04:00
|
|
|
(interactive)
|
2020-05-14 15:16:34 -04:00
|
|
|
(unless (bound-and-true-p org-directory)
|
2020-05-11 02:57:45 -04:00
|
|
|
(require 'org))
|
2020-04-25 15:40:24 -04:00
|
|
|
(doom-project-browse org-directory))
|
2019-12-23 17:20:19 -05:00
|
|
|
;;;###autoload
|
|
|
|
(defun +default/find-in-notes ()
|
|
|
|
"Find a file under `org-directory', recursively."
|
2020-04-25 15:40:24 -04:00
|
|
|
(interactive)
|
2020-05-14 15:16:34 -04:00
|
|
|
(unless (bound-and-true-p org-directory)
|
2020-05-11 02:57:45 -04:00
|
|
|
(require 'org))
|
2020-04-25 15:40:24 -04:00
|
|
|
(doom-project-find-file org-directory))
|
2019-12-23 17:20:19 -05:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +default/find-file-under-here ()
|
|
|
|
"Perform a recursive file search from the current directory."
|
|
|
|
(interactive)
|
|
|
|
(if (featurep! :completion ivy)
|
|
|
|
(call-interactively #'counsel-file-jump)
|
2020-06-04 20:02:46 -04:00
|
|
|
(cmd! (doom-project-find-file default-directory))))
|
2020-02-25 10:26:21 -05:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +default/discover-projects (arg)
|
|
|
|
"Discover projects in `projectile-project-search-path'.
|
|
|
|
If prefix ARG is non-nil, prompt for the search path."
|
|
|
|
(interactive "P")
|
|
|
|
(if arg
|
|
|
|
(call-interactively #'projectile-discover-projects-in-directory)
|
2020-06-10 02:55:59 -04:00
|
|
|
(if projectile-project-search-path
|
|
|
|
(mapc #'projectile-discover-projects-in-directory projectile-project-search-path)
|
|
|
|
(user-error "`projectile-project-search-path' is empty; don't know where to search"))))
|