emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/crux 273390e 101/112: Read file name insead of raw string


From: ELPA Syncer
Subject: [nongnu] elpa/crux 273390e 101/112: Read file name insead of raw string
Date: Wed, 11 Aug 2021 09:58:02 -0400 (EDT)

branch: elpa/crux
commit 273390e612f35fa632633e989f00ac3aa9acc61e
Author: Yevgnen Koh <wherejoystarts@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Read file name insead of raw string
    
    Using read-file-name allows completion of file paths while
    read-from-minibuffer does not.
---
 crux.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crux.el b/crux.el
index 92c5c26..c6f1215 100644
--- a/crux.el
+++ b/crux.el
@@ -412,7 +412,7 @@ there's a region, all lines that region covers will be 
duplicated."
   (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-from-minibuffer "New name: " filename))
+      (let* ((new-name (read-file-name "New name: " (file-name-directory 
filename)))
              (containing-dir (file-name-directory new-name)))
         (make-directory containing-dir t)
         (cond



reply via email to

[Prev in Thread] Current Thread [Next in Thread]