[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive 17731eff79 3/4: Add: (-create-directory-no-op)
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive 17731eff79 3/4: Add: (-create-directory-no-op) Error about empty directories |
Date: |
Sat, 9 Sep 2023 00:59:40 -0400 (EDT) |
branch: elpa/hyperdrive
commit 17731eff7967256411ecef33fc8202e302b09c55
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Add: (-create-directory-no-op) Error about empty directories
---
hyperdrive-dir.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 0fb60ef0c8..fd0700acb3 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -244,7 +244,8 @@ With point on header, returns directory entry."
"D" #'hyperdrive-dir-delete
"H" #'hyperdrive-dir-history
"o" #'hyperdrive-dir-sort
- "?" #'hyperdrive-describe-hyperdrive)
+ "?" #'hyperdrive-describe-hyperdrive
+ "+" #'hyperdrive-create-directory-no-op)
(define-derived-mode hyperdrive-dir-mode hyperdrive-ewoc-mode
`("Hyperdrive-dir"
@@ -324,6 +325,12 @@ Interactively, opens file or directory at point in
(interactive (list (hyperdrive-dir--entry-at-point)))
(hyperdrive-history entry))
+(defun hyperdrive-create-directory-no-op ()
+ "Signal error that directory creation is not possible in hyperdrive."
+ (interactive)
+ (hyperdrive-user-error
+ (substitute-command-keys "Cannot create empty directory; to create a new
file, use `hyperdrive-find-file' or \\[hyperdrive-find-file]")))
+
(defun hyperdrive-dir-sort (directory-sort)
"Sort current `hyperdrive-dir' buffer by DIRECTORY-SORT.
DIRECTORY-SORT should be a valid value of