aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/init/ycp-org.el2
-rw-r--r--emacs/.emacs.d/lisp/my/my-dired.el22
2 files changed, 23 insertions, 1 deletions
diff --git a/emacs/.emacs.d/init/ycp-org.el b/emacs/.emacs.d/init/ycp-org.el
index 20817ac..93d192f 100644
--- a/emacs/.emacs.d/init/ycp-org.el
+++ b/emacs/.emacs.d/init/ycp-org.el
@@ -37,7 +37,7 @@
(setq org-adapt-indentation 'headline-data)
(setq org-special-ctrl-a/e t)
(setq org-special-ctrl-k t)
- (setq org-M-RET-may-split-line '((default . nil)))
+ (setq org-M-RET-may-split-line '((default . t)))
(setq org-catch-invisible-edits 'show)
(setq org-modules '(ol-bbdb ol-gnus ol-info))
(setq org-use-sub-superscripts '{})
diff --git a/emacs/.emacs.d/lisp/my/my-dired.el b/emacs/.emacs.d/lisp/my/my-dired.el
index 21240e1..a2485ab 100644
--- a/emacs/.emacs.d/lisp/my/my-dired.el
+++ b/emacs/.emacs.d/lisp/my/my-dired.el
@@ -105,5 +105,27 @@ With a prefix arg, toggle `my-dired-reverse-sorting' instead."
((equal mode-name "Dired by extension")
(my-dired-sort-by-name)))))
+(defun my-empty-xdg-trash ()
+ "Empty the xdg trash"
+ (interactive)
+ (let* ((xdg-data-dir
+ (directory-file-name
+ (expand-file-name "Trash"
+ (or (getenv "XDG_DATA_HOME")
+ "~/.local/share"))))
+ (trash-files-dir (expand-file-name "files" xdg-data-dir))
+ (trash-info-dir (expand-file-name "info" xdg-data-dir)))
+ (delete-directory trash-files-dir t)
+ (delete-directory trash-info-dir t)))
+
+(defun my-dired-do-delete (&arg)
+ "Trash or (with a prefix arg) delete files."
+ (interactive "P")
+ (if arg
+ (let ((delete-by-moving-to-trash nil))
+ (call-interactively 'dired-do-delete))
+ (call-interactively 'dired-do-delete))
+ )
+
(provide 'my-dired)
;;; my-dired.el ends here