diff options
author | William Carroll <wpcarro@gmail.com> | 2021-11-08T22·45-0800 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-01-08T05·42+0000 |
commit | 7c3fef10d93bc54c540d2f26e11412ef487efc5d (patch) | |
tree | 477a4702113c277710b534434c1ae66af515d793 | |
parent | c022f2ba2e574cdc6df01fd6302032640c12cdd4 (diff) |
refactor(wpcarro/emacs): Prefer simpler project-find-file r/3542
This version better interacts with google3. Change-Id: Ib65618dbdc7d76a27479a4e0cfc52c079537dc64 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4808 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
-rw-r--r-- | users/wpcarro/emacs/.emacs.d/wpc/bookmark.el | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el b/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el index 47da863a676c..26c20399e2d4 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/bookmark.el @@ -34,22 +34,11 @@ (cl-defstruct bookmark label path kbd) -;; TODO: Consider hosting this function somewhere other than here, since it -;; feels useful above of the context of bookmarks. -;; TODO: Assess whether it'd be better to use the existing function: -;; `counsel-projectile-switch-project-action'. See the noise I made on GH for -;; more context: https://github.com/ericdanan/counsel-projectile/issues/137 - (defun bookmark-handle-directory-dwim (path) - "Open PATH as either a project directory or a regular directory. -If PATH is `projectile-project-p', open with `counsel-projectile-find-file'. -Otherwise, open with `counsel-find-file'." - (if (projectile-project-p path) - (with-temp-buffer - (cd (projectile-project-p path)) - (call-interactively #'counsel-projectile-find-file)) - (let ((ivy-extra-directories nil)) - (counsel-find-file path)))) + "Open PATH as either a project directory or a regular directory." + (with-temp-buffer + (cd path) + (call-interactively #'project-find-file))) (defconst bookmark-handle-directory #'bookmark-handle-directory-dwim "Function to call when a bookmark points to a directory.") |