Hot answers tagged

29

UPDATED (Helm changes, personal config changes, and Tu Do comments). I switched from IDO to Helm few years ago and I never looked back. I find the presentation cleaner than let's say ido-vertical-mode for example. Helm doesn't have flex matching though. You don't need smex, etc. Helm does it all. The Tu do article is good as it provides some nice animated ...


17

While an ido command is active (ido-find-file in this case), you can drop back to the non-ido version of the same command (find-file in this case) using the ido-default binding C-x C-f for ido-fallback-command. To answer you question, The first C-x C-f will call ido-find-file. The second C-x C-f will fall back to find-file. Then you can do C-a C-y C-k RET ...


16

Looking at the customization options for ido-mode (M-x customize-group RET ido RET), I don't see any options for enabling the cycling behavior you describe. You can, however, add the following to your init-file: (require 'recentf) (defun ido-recentf-open () "Use `ido-completing-read' to find a recent file." (interactive) (if (find-file (ido-...


12

Yes. Library help-fns+.el defines command describe-command. And it redefines describe-function so that it does describe-command if you give it a prefix arg. The library binds describe-command to C-h c (describe-key-briefly is moved to C-h C-c). The same library defines other help commands, such as describe-file, describe-buffer, describe-keymap, and ...


9

apropos-command might be sufficiently close. It doesn’t offer describe-function’s tab completion, but it lets you search only through commands, and it takes you to their doc page.


8

As @wasamasa suggested, ido-ubiquitous should take care of completion when insert-char is used. There is a bug report that was closed in 2013, but I still see this behaviour with Emacs 24.4 and ido-ubiquitous version 20140904.1547, so I filed another bug report. EDIT: The maintainer of ido-ubiquitous wrote this: Ok, I figured out the problem. There are ...


8

if you have smex installed, just call smex. Start to type, when the right one comes up, press C-h f.


8

ido-mode has built-in support for hiding files matching specific regexps. All you need to do is add \.bak to ido-ignore-files: (add-to-list 'ido-ignore-files "\.bak") After invoking ido-find-file, you can then hit C-a (ido-toggle-ignore) to toggle hiding of .bak files.


8

You can use C-M-j which calls ivy-immediate-done to force the output to be exactly what you typed instead of having it complete to the the nearest match This and more information can be found in the ivy manual ivy-manual


7

According to the source code, you need to modify keybindings via ido-setup-hook: ;; Customization ;; ------------- ;; ;; Customize the `ido' group to change the `ido' functionality. ;; ;; To modify the keybindings, use the ido-setup-hook. For example: ;;(add-hook 'ido-setup-hook 'ido-my-keys) ;; ;;(defun ido-my-keys () ;; "Add my keybindings for ido." ;; ...


7

I can't find this built-in. It is fairly easy to make a wrapper around describe-function that only completes command names when called interactively. In the implementation below, I duplicated the interactive form from describe-function and changed the fboundp test to commandp. As an added bonus, this function offers all function names when called with a ...


7

I was just about to make a blog post about this (I'll do it later anyway): (defun oleh-ido-setup-hook () (define-key ido-file-dir-completion-map "~" (lambda () (interactive) (ido-set-current-directory "~/") (setq ido-exit 'refresh) (exit-minibuffer)))) (add-hook 'ido-setup-hook 'oleh-ido-setup-hook)


7

Write your own command that checks: (defun maybe-projectile-find-file () (interactive) (call-interactively (if (projectile-project-p) #'projectile-find-file #'ido-find-file))) (global-set-key (kbd "C-x C-f") 'maybe-projectile-find-file)


6

Found the answer to this question with some additional digging, but I'll leave it up in case others have this question in the future. The variable in question is confirm-nonexistent-file-or-buffer. It looks like the default is after-completion, but setting it to nil turns of the confirmation request. The variable is relevant not just for ido and family, ...


6

Given you're dealing with full path names, other methods may work: use M-x ffap (find-file-at-point): it will automatically read the path name and open the file activate M-x compilation-shell-minor-mode which will change the font of paths and make them "clickable" (with mouth or RET). Clicking on it brings you to that file and the specific line, and you can ...


5

From a comment at the top of ido-ubiquitous.el (the relevant part is in bold): To use this package, call ido-ubiquitous-mode to enable the mode, or use M-x customize-variable ido-ubiquitous-mode it to enable it permanently. Note that ido-ubiquotous-mode has no effect unless ido-mode is also enabled.


5

To get snow capped mountain included when you just type mount, you may want to do: (push '(unicode-name (styles substring)) completion-category-overrides) Actually, maybe this substring style should be enabled by default for unicode names, like it is for buffer names. Maybe you should lobby for it via M-x report-emacs-bug.


5

If you are using helm and helm-M-x, you can press C-j on the commands to pop up their documentation.


5

The variable mu4e~contacts-for-completion stores a list of contacts that mu4e knows about. The contacts are conveniently stored as "name <email>" strings, which is the same thing you want to insert. Here's an example function that uses the variable together with ido to select and insert a contact: (defun select-and-insert-contact () (interactive) ...


5

Since there's always more than one way to do it, here's a variation on @abo-abo's idea that keeps ido completion active rather than falling back to the normal find command. (defun ido-yank () (interactive) (let ((path (current-kill 0))) (if (file-exists-p path) (progn (let ((dir (file-name-directory path))) (if dir (ido-...


5

For those users of an ivy/counsel persuasion, the command counsel-org-tag (added in v0.6 AFAICT) enables ivy-backed completion (including multiple selection and deselection) of org-mode tags: counsel-org-tag is an interactive autoloaded compiled Lisp function in counsel.el. (counsel-org-tag) Add or remove tags in org-mode. In my configuration ...


4

Ido doesn't have very smart fuzzy matching by default. Essentially, if you put in horse Ido will try to match .*h.*o.*r.*s.*e.* against its candidates. This isn't really how we think about matching, since we would expect a file literally called horse-feathers.txt to score higher than hogs-raging-senial.png. Check out the flx-ido package. From the ...


4

You can control this by setting the variable ido-enable-prefix to t: (setq ido-enable-prefix t) From the documentation: Non-nil means only match if the entered text is a prefix of file name. This behavior is like the standard Emacs completion. If nil, match if the entered text is an arbitrary substring. Value can be toggled within Ido using ido-...


4

If you are using ido-find-file and have configured ido to use the filename at point (e.g. you have ido-use-filename-at-point set to t or 'guess), you can prevent ido from using the name at point from a dired buffer with a hook: (defun my/ido-ignore-file-at-point () "Disable ido-use-filename-at-point for the current buffer." (when (bound-and-true-p ido-...


4

Maybe like this: (define-key ido-file-dir-completion-map (kbd "C-y") 'ido-yank) (defun ido-yank () (interactive) (if (file-exists-p (current-kill 0)) (ido-fallback-command) (yank))) If the current kill is a file that exists, doing C-y C-y should probably give you what you want.


4

The way ido-ignore-buffers works is that each buffer is evaluated against each regexp or function in the list until one of them returns true, in which case the buffer is ignored. In your sample code you ignore everything that starts with a * using regexp. Buffers that do not start with * will be evaluated against your function, which ignores everything ...


4

You can try something like: (let* ((dir-table (apply-partially #'completion-table-with-predicate #'completion-file-name-table #'file-directory-p 'strict)) (my-table (completion-table-in-turn <reponamesfromhg> dir-table))) (completing-...


4

I use the following snippet to select a recently clocked task with ido: (defun org-clock-in-select () (interactive) (let (res) (dolist (i org-clock-history) (with-current-buffer (org-base-buffer (marker-buffer i)) (org-with-wide-buffer (ignore-errors (goto-char (marker-position i)) (push `(,(org-get-heading 'notags)...


4

According to https://github.com/abo-abo/swiper/issues/648, it's simply (setq ivy-virtual-abbreviate 'full) It's not quite as nice as opened buffers (where only the differing part is shown), but good enough. (I haven't found anything like that for ido though.)


4

Asuming that C-x C-f is bound to ido-find-file you drop back to the non-Ido version by typing C-x C-f again or just C-f. This will allow you to create the file you want without Ido interfence.


Only top voted, non community-wiki answers of a minimum length are eligible