summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-10-21 22:39:39 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-10-21 22:39:39 +0200
commit3982151232928e0a1f1b695ab83c7c46d7df29c4 (patch)
tree7374724a645df88f0ece788167a89fbb668b036a
parent0ecd8ef5e8fb87b8ca8b198bcee2212a07421dd5 (diff)
downloadebsd-master.tar.gz
Emacs: Don't skip dots for dired (helm)HEADmaster
-rw-r--r--.emacs.d/init.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index c3bab31..bd29a73 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -40,6 +40,13 @@
into exps
finally return `(progn ,@exps)))
+(defmacro without-advice (symbol where advice &rest body)
+ (declare (indent 3))
+ `(let ((adv-p (advice-member-p ,advice ,symbol)))
+ (when adv-p (advice-remove ,symbol ,advice))
+ (unwind-protect (progn ,@body)
+ (when adv-p (advice-add ,symbol ,where ,advice)))))
+
(defun add-hooks (fun &rest modes)
"Add a function to multiple mode hooks at once."
(dolist (mode modes)
@@ -177,8 +184,15 @@
;; completion-styles '(helm-flex)
)
(helm-mode 1)
-(helm-ext-ff-enable-skipping-dots t)
(helm-ext-minibuffer-enable-header-line-maybe t)
+(helm-ext-ff-enable-skipping-dots t)
+(defun dired-dont-skip-dots (&rest args)
+ (interactive)
+ (without-advice 'helm-ff-move-to-first-real-candidate :around 'helm-ext-ff-skip-dots
+ (if (called-interactively-p)
+ (call-interactively #'dired)
+ (apply #'dired args))))
+(set-keys [remap dired] dired-dont-skip-dots)
;;; Helm-exwm
(autoload #'helm-exwm "helm-exwm" nil t)