[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/crux 2be95ea 040/112: Use read-from-minibuffer for the new
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/crux 2be95ea 040/112: Use read-from-minibuffer for the new file name |
Date: |
Wed, 11 Aug 2021 09:57:49 -0400 (EDT) |
branch: elpa/crux
commit 2be95ea0ff7285624268e75135d52b7a3b68d1ef
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Wilfred Hughes <me@wilfred.me.uk>
Use read-from-minibuffer for the new file name
`read-file-name` works great for existing file names, but this command
is often used to renaming files to names that aren't currently used.
If a user is using a completion backend like ido or helm,
`read-file-name` will prompt them for an *existing* file name. Instead,
allow them to input arbitrary strings.
---
crux.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crux.el b/crux.el
index e88bc0c..8c167f9 100644
--- a/crux.el
+++ b/crux.el
@@ -232,7 +232,7 @@ point reaches the beginning or end of the buffer, stop
there."
(let ((filename (buffer-file-name)))
(if (not (and filename (file-exists-p filename)))
(rename-buffer (read-from-minibuffer "New name: " (buffer-name)))
- (let ((new-name (read-file-name "New name: " filename)))
+ (let ((new-name (read-from-minibuffer "New name: " filename)))
(cond
((vc-backend filename) (vc-rename-file filename new-name))
(t
- [nongnu] elpa/crux b07b31a 005/112: Move a function around, (continued)
- [nongnu] elpa/crux b07b31a 005/112: Move a function around, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux b5eac2a 008/112: Code style, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 3088be2 012/112: Add a way to make commands operate on either a region or a buffer, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 16eb56d 011/112: Kill crux-setup-default-keybindings, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux d2643ae 019/112: Add crux-ispell-word-then-abbrev, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 382834e 020/112: Fix contributors link, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux e6e3221 025/112: Fix crux-*-file-and-buffer commands inconsistencies and alias the inverse, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 4c90762 026/112: Add complementary `with-region-or-line` & `with-region-or-point-to-eol`, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux e4c539b 028/112: Merge pull request #9 from waymondo/with-region-or-line, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux dc1606b 034/112: Add crux-transpose-windows for swapping the buffers between two windows, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 2be95ea 040/112: Use read-from-minibuffer for the new file name,
ELPA Syncer <=
- [nongnu] elpa/crux e2124c8 023/112: Merge pull request #6 from verdammelt/patch-1, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 3c14b4a 024/112: Merge pull request #13 from jiegec/master, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 79e500e 030/112: Add multiple choice with completion for shell init files., ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux e6c7421 035/112: Remove crux-swap-windows and alias it to crux-transpose-windows, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 5938c84 036/112: Merge pull request #21 from dgtized/transpose-windows, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 6d11d2e 039/112: When opening a line above, don't reindent the current line, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 1967a75 041/112: Allow users to create directories with crux-rename-file-and-buffer, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 582a68d 046/112: Fix the version header, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux bcbfdec 048/112: Don't assume ido when offering files from recentf (#33), ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 3b377b4 054/112: Add smart kill line function, ELPA Syncer, 2021/08/11