[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/crux bcbfdec 048/112: Don't assume ido when offering files
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/crux bcbfdec 048/112: Don't assume ido when offering files from recentf (#33) |
Date: |
Wed, 11 Aug 2021 09:57:51 -0400 (EDT) |
branch: elpa/crux
commit bcbfdec127b71605c672a49f2d9d256a06b5e063
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Don't assume ido when offering files from recentf (#33)
By using completing read in crux-recentf-find-file, we can support ido,
helm and ivy users. I've left an alias to avoid breaking current configs.
---
README.md | 4 ++--
crux.el | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 0d8b67e..0f45a6f 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ Command |
Suggested Keybinding(s)
`crux-smart-open-line-above` | <kbd>C-S-RET</kbd> or
<kbd>Super-o</kbd> | Insert an empty line above the current line and indent it
properly.
`crux-smart-open-line` | <kbd>S-RET</kbd> or
<kbd>M-o</kbd> | Insert an empty line and indent it properly (as in most IDEs).
`crux-cleanup-buffer-or-region` | <kbd>C-c n</kbd> | Fix
indentation in buffer and strip whitespace.
-`crux-recentf-ido-find-file` | <kbd>C-c f</kbd> or
<kbd>Super-r</kbd> | Open recently visited file.
+`crux-recentf-find-file` | <kbd>C-c f</kbd> or
<kbd>Super-r</kbd> | Open recently visited file.
`crux-view-url` | <kbd>C-c u</kbd> | Open
a new buffer containing the contents of URL.
`crux-eval-and-replace` | <kbd>C-c e</kbd> | Eval
a bit of Emacs Lisp code and replace it with its result.
`crux-transpose-windows` | <kbd>C-x 4 t</kbd> |
Transpose the buffers between two windows.
@@ -71,7 +71,7 @@ Here's how you'd bind some of the commands to keycombos:
(global-set-key [remap move-beginning-of-line] #'crux-move-beginning-of-line)
(global-set-key (kbd "C-c o") #'crux-open-with)
(global-set-key [(shift return)] #'crux-smart-open-line)
-(global-set-key (kbd "s-r") #'crux-recentf-ido-find-file)
+(global-set-key (kbd "s-r") #'crux-recentf-find-file)
(global-set-key (kbd "C-<backspace>" #'crux-kill-line-backwards))
(global-set-key [remap kill-whole-line] #'crux-kill-whole-line)
```
diff --git a/crux.el b/crux.el
index 637a50e..157b07b 100644
--- a/crux.el
+++ b/crux.el
@@ -375,15 +375,17 @@ as the current user."
(interactive)
(insert (format-time-string "%c" (current-time))))
-(defun crux-recentf-ido-find-file ()
+(defun crux-recentf-find-file ()
"Find a recent file using ido."
(interactive)
- (let ((file (ido-completing-read "Choose recent file: "
- (mapcar #'abbreviate-file-name recentf-list)
- nil t)))
+ (let ((file (completing-read "Choose recent file: "
+ (mapcar #'abbreviate-file-name recentf-list)
+ nil t)))
(when file
(find-file file))))
+(defalias 'crux-recentf-ido-find-file 'crux-recentf-find-file)
+
;; modified from https://www.emacswiki.org/emacs/TransposeWindows
(defun crux-transpose-windows (arg)
"Transpose the buffers shown in two windows.
- [nongnu] elpa/crux dc1606b 034/112: Add crux-transpose-windows for swapping the buffers between two windows, (continued)
- [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, 2021/08/11
- [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 <=
- [nongnu] elpa/crux 3b377b4 054/112: Add smart kill line function, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 1c2c179 061/112: Improve a docstring, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 2b6ddf0 060/112: Add missing space, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 5a7201a 062/112: Fix a docstring, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 32baf6a 064/112: Bump the development version, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux a71669e 033/112: Merge pull request #17 from jiegec/master, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux cf547b7 037/112: Typo Fix: Missed an s in transpose, ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux a6e0a52 043/112: Define a minor mode for crux-reopen-as-root (#28), ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 2cdf266 069/112: Insert literal s-exp instead of printing in crux-eval-and-replace (#50), ELPA Syncer, 2021/08/11
- [nongnu] elpa/crux 2b4bf62 074/112: Give crux group to crux-reopen-as-root-mode, ELPA Syncer, 2021/08/11