From 8b4b59dbf19f2affc3eaaf69d3cc38efeede3981 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 13 Jan 2017 17:30:28 +0100 Subject: emacs: literate programming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Everything has been moved into an org file. Signed-off-by: Miquel Sabaté Solà --- emacs/settings/init-dired.el | 49 -------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 emacs/settings/init-dired.el (limited to 'emacs/settings/init-dired.el') diff --git a/emacs/settings/init-dired.el b/emacs/settings/init-dired.el deleted file mode 100644 index 55271aa..0000000 --- a/emacs/settings/init-dired.el +++ /dev/null @@ -1,49 +0,0 @@ -;;; init-dired.el --- Dired mode configuration - -;; Copyright (C) 2017 Miquel Sabaté Solà -;; -;; This program is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;;; Commentary: -;; -;; Set of settings for dired mode. - -; Add basic evil movement. -(with-eval-after-load 'evil - (evil-add-hjkl-bindings dired-mode-map 'normal - (kbd "w") 'evil-forward-word-begin)) - -; Allow dired mode to attach files to mu4e. Taken from: -; https://www.djcbsoftware.nl/code/mu/mu4e/Dired.html#Dired. -; With this, you will need to type C-c RET C-a, in order to attach the file -; pointed by the cursor. - -(require 'gnus-dired) - -;; Make the `gnus-dired-mail-buffers' function also work on message-mode derived -;; modes, such as mu4e-compose-mode. -(defun gnus-dired-mail-buffers () - "Return a list of active message buffers." - - (let (buffers) - (save-current-buffer - (dolist (buffer (buffer-list t)) - (set-buffer buffer) - (when (and (derived-mode-p 'message-mode) - (null message-sent-message-via)) - (push (buffer-name buffer) buffers)))) - (nreverse buffers))) - -(setq gnus-dired-mail-mode 'mu4e-user-agent) -(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode) - -(provide 'init-dired) -;;; init-dired.el ends here -- cgit v1.2.3