Git Product home page Git Product logo

ido-completing-read-plus's Introduction

ido-completing-read+ (formerly ido-ubiquitous)

MELPA Stable CI Status Join the chat at https://gitter.im/DarwinAwardWinner/ido-ubiquitous Coverage Status

This package replaces stock emacs completion with ido completion wherever it is possible to do so without breaking things (i.e. what you were probably hoping for when you set ido-everywhere to t).

Get it from MELPA: https://stable.melpa.org/#/ido-completing-read+

Version 4.0 changes

Long-time users should know that ido-completing-read+ version 4.0 is a major update. The previously separate ido-ubiquitous package has been merged into ido-completing-read+, which now provides all the features of both packages. The distinction between "new" and "old" default selection styles has been eliminated and replaced by a new variable ido-cr+-nil-def-alternate-behavior-list (see FAQ for details), and the override system has been accordingly simplified into just an allow list and a disable list. If you have previously customized any ido-ubiquitous options, be sure to check out

`M-x customize-group ido-completing-read+`

after updating to 4.0 and make sure the new settings are to your liking.

The short-lived ido-describe-fns package has likewise been subsumed into this one.

How to enable ido in as many places as possible

If you are using this package, you probably want to enable ido everywhere that it is possible to do so. Here are all the places to enable ido that I'm aware of. (Note that most of these variables/modes can also be set/enabled via M-x customize-variable if you prefer that.)

Ido itself

First, enable ido-mode and ido-everywhere.

(ido-mode 1)
(ido-everywhere 1)

ido-completing-read+ (this package)

Install this package from MELPA and then turn on ido-ubiquitous-mode:

(require 'ido-completing-read+)
(ido-ubiquitous-mode 1)

Amx

Amx, another of my packages, allows you to use alternate completion systems like ido for commands in M-x, with enhancements like putting your most-used commands at the front of the list. First install amx from MELPA, then turn on amx-mode:

(require 'amx)
(amx-mode 1)

ido-yes-or-no

If you want to use ido for yes-or-no questions, even though it's massive overkill, install my ido-yes-or-no package from MELPA, and then enable the mode:

(require 'ido-yes-or-no)
(ido-yes-or-no-mode 1)

ido for describe-face and certain other commands

Some commands, such as describe-face, use completing-read-multiple instead of completing-read. You can get ido completion for these commands with crm-custom-mode, which replaces completing-read-multiple with repeated calls to completing-read, which would then use ido thanks to ido-ubiquitous-mode. First, install the crm-custom package from MELPA, then enable the mode:

(require 'crm-custom)
(crm-custom-mode 1)

Make sure to read and understand the FAQ entry below about the empty entry at the beginning of the completion list before using this mode, or using it will likely be very confusing.

Packages with built-in ido support

Lastly, some packages already provide their own interfaces to ido, so ido-completing-read+ specifically avoids interfering with these. If you use any of the following packages, you need to enable ido for each of them separately.

  • Magit: (setq magit-completing-read-function 'magit-ido-completing-read)
  • Gnus: (setq gnus-completing-read-function 'gnus-ido-completing-read)
  • ESS: (setq ess-use-ido t)

If you are a package author implementing ido support for your package, you should consider using ido-completing-read+ in place of ido-completing-read, since it smooths out many of the unexpected edge cases of ido relative to completing-read-default.

icomplete-mode

For any case where ido cannot be used, there is another older mode called icomplete-mode that integrates with standard emacs completion and adds some ido-like behavior. It is built in to emacs, so no installation is necessary. Just load the file and enable the mode:

(require 'icomplete)
(icomplete-mode 1)

Frequently asked questions

How does ido-ubiquitous-mode decide when to replace completing-read?
Why don't some commands use ido completion?

Emacs' completing-read is a complex function with many complex features. Not all of these features are supported by ido, so it is impossible to always replace completing-read with ido completion. Trying to use ido when these features are requested can cause confusing and unexpected behavior or even completely break the completion system. So, ido-completing-read+ tries to get out of the way whenever it detects that these features might be used by a given call to completing-read. Furthermore, it's not always possible to detect based on the arguments to completing-read whether such ido-incompatible features are being used or not, so ido-completing-read+ also comes with a list of functions that are known not to work with ido. You can inspect this list using

M-x describe-variable ido-cr+-disable-list

If you want to know why a certain command isn't getting ido completion, you can enable ido-cr+-debug-mode and then run the command. There should then be a line in the *Messages* buffer that explains the reason for disabling ido completion.

Why does RET sometimes not select the first completion on the list?
Why is there an empty entry at the beginning of the completion list?
What happened to old-style default selection?

The simplest way to think about this is that if the command that called completing-read didn't specify a default, then the default is the empty string. In other words, "" is the default default.

Previous versions of ido-ubiquitous-mode gave special consideration to cases where a default value was not provided to completing-read and the user pressed RET without entering any text. The expected behavior is that completing-read should return the empty string in this case, which indicates to the calling function that the user did not select any completion. This conflicts with the standard ido behavior of selecting the first available completion when pressing RET, and this conflict was previously resolved by having two different modes that differed in their handling of RET on an empty input. Now there is only one mode, and the no-default case is handled by acting as if the empty string was specified as the default, which more closely matches the behavior of standard emacs completion. Since you, the user, have no way of knowing how completing-read was called, you can tell when this is occurring by watching for the appearance of an empty completion at the front of the list. Compare:

If the command specifies apple as the default when calling completing-read, the prompt will look like this, and pressing RET will select "apple":

Pick a fruit: {apple | banana | cherry | date}

However, if the command does not specify any default, an extra empty option is displayed before the first option, and pressing RET will select this empty option and return "":

Pick a fruit: { | apple | banana | cherry | date}

To select "apple" instead, you must first press the right arrow key once, or type an "a", before pressing RET.

However, some commands don't take this quirk of completing-read into account and don't expect it to ever return an empty string when require-match is non-nil. You can accommodate these functions by adding them to ido-cr+-nil-def-alternate-behavior-list.

How can I troubleshoot when ido-completing-read+ isn't doing what I want?

First, invoke the ido-cr+-debug-mode command. Then, run the command or code that you are having trouble with, and when the completion prompt appears, make a selection to complete the process. Then, examine the Messages buffer, where ido-completing-read+ will explain which mode of operation it selected and why. Based on this, you can add an entry to ido-cr+-disable-list, or take some other appropriate action.

Updates to ido-completing-read+ may include new disable list entries, but Emacs will not edit your override variables if you have already customized them. So, if you have recently upgraded ido-completing-read+, remember to invoke ido-cr+-update-disable-list to add in any new overrides. By default, ido-completing-read+ will remind you to do this whenever a new version adds to the list. For more information, see:

M-x describe-variable ido-cr+-auto-update-disable-list

Where can I report bugs?

If you end up adding any disable list entries, please report them at https://github.com/DarwinAwardWinner/ido-ubiquitous/issues so I can incorporate them into the defaults for future versions. You can also report any bugs you find in ido-completing-read+.

I'm getting some weird warnings from ido-completing-read+ when Emacs starts.

I've gotten numerous reports about nonsensical warnings produced by this package, such as "free variable" warnings about variables that are most definitely properly declared, or warnings that only appear when ido-completing-read+ is loaded after another unrelated package. For many of these warnings, I've never been able to discover the cause or consistently reproduce the warnings myself, and I've given up trying to figure it out. Please don't report any new bugs about variable warnings unless you can tell me how to consistently reproduce them starting from emacs -Q. If you are an Emacs expert who knows how to fix these warnings, please let me know.

You can see the bug reports about weird warnings here.

What is the "bleeding-edge" branch?

All users should just use the main branch, or better yet, install from MELPA. The bleeding-edge branch is where I test experimental and unfinished features. Because ido-completing-read+ hooks deeply into the bowels of Emacs, a bug in ido-completing-read+ could easily freeze or crash Emacs entirely. Additionally, some bug only show up when ido-completing-read+ is installed and compiled as a package. So I test every new feature myself for some time on this branch before pushing to the main branch. If you report a bug, I might develop a fix for it on the bleeding edge branch and ask then you to try this branch. Otherwise, normal users don't need to think about this branch.

Running the tests

This package comes with a test suite. If you want to run it yourself, first install the Eldev, then use eldev test to run the tests. Please run this test suite before submitting any pull requests, and note in the pull request whether any of the tests fail.

ido-completing-read-plus's People

Contributors

bashu avatar darwinawardwinner avatar gdobbins avatar gitter-badger avatar jonathanchu avatar kant avatar ndrvtl avatar phst avatar purcell avatar randymorris avatar silex avatar swsnr avatar syohex avatar tarsius avatar technomancy avatar trevors avatar zahardzhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ido-completing-read-plus's Issues

error: macroexp--backtrace is not defined

I get the following message when compiling ido-ubiquitous.el:

In end of data:
ido-ubiquitous.el:781:1:Warning: the function `macroexp--backtrace' is not
    known to be defined.

I get similar errors when I try to enable the mode, even if I run emacs with -Q.

Emacs version info:

GNU Emacs 24.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12) of 2012-09-22 on batsu, modified by Debian

If it makes any difference I installed ido-ubiquitous via el-get.

ido-ubiquitous breaks M-x rgrep

Using this barebones init.el (https://gist.github.com/3b36874b2abb44a986eb), and an otherwise empty .emacs.d, I'm left with a broken M-x rgrep. It says No Match for every directory.

If you comment out (ido-ubiquitous-mode) in that same init.el, then everything works just fine.

This might just be another symptom of issue #24, but I thought I'd mention it.

Lisp error: (void-variable ido-ubiquitous-default-command-overrides)

After upgrade to version 20130903.220, I got this error.

Here are the debug infos:

(defvar ido-ubiquitous-command-overrides ido-ubiquitous-default-command-overrides "List of command override specifications for ido-ubiquitous\n\nEach override specification describes how ido-ubiquitous should\nbehave one or many commands. A specification has the\nform `(BEHAVIOR MATCH-TYPE MATCH-TEXT)'. BEHAVIOR is one of the\nfollowing:\n\n  * `disable': ido-ubiquitous should not be used at all for the\n    specified commands;\n  * `enable': ido-ubiquitous may be used with the specified\n    commands, without emulating the old-style default selection\n    of `completing-read';\n  * `enable-old': ido-ubiquitous may be used with the specified\n    commands, and should emulate the old-style default selection\n    of `completing-read'.\n\nMATCH-TYPE affects how MATCH-TEXT is interpreted, as follows:\n\n  * `exact': the specification only affects the one command\n    whose name is MATCH-TEXT;\n  * `prefix': the specification affects any command whose name\n    starts with MATCH-TEXT (This is useful for specifying a\n    certain behavior for an entire package);\n  * `regexp': the specification affects any command whose name\n    matches MATCH-TEXT (with MATCH-TEXT being interpreted as a\n    regular expression)\n\nMATCH-TEXT should be a string.\n\nSince this variable's has a somewhat complex structure, it is\nrecommended that you set this variable through Customize.\n\nNote that this variable only affects *commands*, which are\nfunctions marked as interactive. See\n`ido-ubiquitous-function-overrides' for how to modify the\nbehavior of ido-ubiquitous for arbitrary functions.\n\nIf you need to add a new specification to this list, please also\nfile a bug report at ")
  eval-buffer(#<buffer  *load*-880758> nil "/home/noinil/.emacs.d/elpa/ido-ubiquitous-20130903.2208/ido-ubiquitous-autoloads.el" nil t)  ; Reading at buffer position 5296
  load-with-code-conversion("/home/noinil/.emacs.d/elpa/ido-ubiquitous-20130903.2208/ido-ubiquitous-autoloads.el" "/home/noinil/.emacs.d/elpa/ido-ubiquitous-20130903.2208/ido-ubiquitous-autoloads.el" nil t)
  load("/home/noinil/.emacs.d/elpa/ido-ubiquitous-20130903.2208/ido-ubiquitous-autoloads" nil t)
  package-activate-1(ido-ubiquitous [(20130903 2208) nil "Use ido (nearly) everywhere. [github]"])
  package-activate(ido-ubiquitous (20130903 2208))
  package-initialize()
  eval-buffer(#<buffer  *load*-441654> nil "/home/noinil/.emacs.d/core/prelude-packages.el" nil t)  ; Reading at buffer position 1447
  load-with-code-conversion("/home/noinil/.emacs.d/core/prelude-packages.el" "/home/noinil/.emacs.d/core/prelude-packages.el" nil t)
  require(prelude-packages)
  eval-buffer(#<buffer  *load*> nil "/home/noinil/.emacs.d/init.el" nil t)  ; Reading at buffer position 3393
  load-with-code-conversion("/home/noinil/.emacs.d/init.el" "/home/noinil/.emacs.d/init.el" t t)
  load("/home/noinil/.emacs.d/init" t t)

Broken links

Many links referred in the comments for the default overrides are broken. This is a minor thing but the documentation provided by the linked issues is of interest in order to understand and review from time to time why some features were enabled/disabled.

ido-ubiquitous-mode prevents disable-theme from working in emacs 24.3

I'm in emacs 24.3.1 with ido-ubiquitous from elpa (version 20140324.1003). I start emacs with the following .emacs:

(push "~/.emacs.d/" load-path)
(require 'package)
(package-initialize)
(ido-mode 1)
(ido-ubiquitous-mode 1)

Then I run M-x load-theme adwaita, and everything is fine. Then try M-x disable-theme adwaita, and the theme is not disabled and no messages are printed. If I then do M-x ido-ubiquitous-mode to disable the mode, and then re-run M-x disable-theme adwaita the theme disappears correctly. I have tried this with many themes (zenburn, solarized-dark, dichromacy, deeper-blue, etc.), and they all have this same behavior.

EDIT

I just did some testing and found some additional info. If I run the related commands directly in elisp (as opposed to via M-x) everything works as expected. I.e. running

(ido-ubiquitous-mode 1)
(load-theme 'adwaita t)
(disable-theme 'adwaita)

returns me back to the default theme.

installation problem

When I try to install through elpa I get the following error:
define-obsolete-variable-alias: Wrong number of arguments: #[(old new) "ÂÃ� EÄ�Å FE�" [old new progn defalias put (quote byte-obsolete-variable)] 6], 3

describe-function and describe-variable

Since the update (I update using MELPA from version 20121214 to 20130121.1236) descirbe-function /-variable no longer use ido. How can I reenable this behavior?

I am using ArchLinux's emacs-24.3-5 Package. emacs --version shows "24.3.1"

Symbol's value as variable is void: completing-read-function

I get the error in the title of this issue when I try to load ido-ubiquitous. Emacs version is GNU Emacs 23.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-04-12 on bitzer.hoetzel.info.

I am not super well versed in elisp, but M-x apropos completing-read knows about:

completing-read
completing-read-multiple
gnus-completing-read
gnus-completing-read-with-default
ido-completing-read

but doesn't know anything about completing-read-function.

Sometimes doesn't pick default value.

For example, go into ibuffer and type / R to select the saved group. When I have ido-ubiquitous enabled and simply hit RET after invoking the menu, "nil" is selected (persumably, because no group filter is selected and the view changes to "/ \").

This also happens in other selections, such as C-h f, C-h v and so, but not always, only when there's no symbol under the point.

Reference to free variable

Is there a reason for the following 5 free variables:

~/.emacs.d/elpa/ido-ubiquitous-20130924.1230/ido-ubiquitous.elc:Warning:
    reference to free variable `predicate'
~/.emacs.d/elpa/ido-ubiquitous-20130924.1230/ido-ubiquitous.elc:Warning:
    reference to free variable `inherit-input-method'
~/.emacs.d/elpa/ido-ubiquitous-20130924.1230/ido-ubiquitous.elc:Warning:
    reference to free variable `ido-cur-item'
~/.emacs.d/elpa/ido-ubiquitous-20130924.1230/ido-ubiquitous.elc:Warning:
    reference to free variable `ido-default-item'
~/.emacs.d/elpa/ido-ubiquitous-20130924.1230/ido-ubiquitous.elc:Warning:
    reference to free variable `ido-cur-list'

Do autoloads

I removed all autoload stuff in the 2.x series because it was causing cryptic errors. If anyone knows how to properly set up autoloads, please feel free to submit a pull request.

Add Info-read-node-name to function exceptions

I'm about to add Info-read-node-name to function exceptions for ido-ubiquitous and, as the docstring for the variable suggests, dropping by to report an issue with it.

it all starts with Info-goto-node behaviour specification:

Completion is available, but only for node names in the current Info file.

The completion candidates list is therefore not complete, but the Info-read-node-name requires a strict match compensating for the issue by providing a custom function that would accept candidates that look like a full node name, e.g. "(emacs)Abbrevs". The actual problem is that ido doesn't consult try-completion when confirming match and thus doesn't accept such names.

called-interactively-p not working as expected

hello, i filed a bug report with evil-mode here because a couple things didn't work as expected, and it appears that it has something to do with called-interactively-p. if you could have a quick look it'd be greatly appreciated. thanks.

ido-ubiquitous breaks some M-x man entries

Selecting an argument for M-x man will also have ido-like completion when using this package, but man breaks on some choices presented by ido-ubiquitous.

For instance M-x man man works in my system, but M-x man history does not because the selected item for history is history(ntcl) and the following error message is displayed instead:


/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `man  history(ntcl) 2>/dev/null | sed  -e '/^[�-�][�-�]*$/d' -e '/�[789]/s///g' -e '/Reformatting page.  Wait/d' -e '/Reformatting entry.  Wait/d' -e '/^[    ]*Hewlett-Packard[  ]Company[   ]*-[    ][0-9]*[    ]-/d' -e '/^[   ]*Hewlett-Packard[  ]*-[    ][0-9]*[    ]-.*$/d' -e '/^[    ][  ]*-[    ][0-9]*[    ]-[     ]*Formatted:.*[0-9]$/d' -e '/^[     ]*Page[     ][0-9]*.*(printed[  ][0-9\/]*)$/d' -e '/^Printed[   ][0-9].*[0-9]$/d' -e '/^[   ]*X[    ]Version[   ]1[01].*Release[    ][0-9]/d' -e '/^[A-Za-z].*Last[     ]change:/d' -e '/^Sun[  ]Release[   ][0-9].*[0-9]$/d' -e '/[    ]*Copyright [0-9]* UNIX System Laboratories, Inc.$/d' -e '/^[   ]*Rev\..*Page [0-9][0-9]*$/d' | awk ''

process exited abnormally with code 2

Turning off ido-ubiquitous will prevent this error from happening. A nice workaround is to temporarily disable ido-ubiquitous for such instances. Is there any way to temporarily disable it?

Invalid function: ido-ubiquitous-with-override

It appears something is still broken with the autoloads. After installing ido-ubiquitous from MELPA I get Invalid function: ido-ubiquitous-with-override whenever I try to rename a file with R in a dired buffer, among a few other situations. After this error, my whole Emacs session slowly unravels -- font locking breaks, minibuffer becomes unusable -- and I need to restart Emacs.

Here's how to reproduce

mkdir /tmp/$$
HOME=/tmp/$$ emacs -Q -l test.el .

Here's test.el:

;;; test.el
(require 'package)

(add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(package-refresh-contents)
(unless (package-installed-p 'ido-ubiquitous)
  (package-install 'ido-ubiquitous))

(require 'ido-ubiquitous)

(ido-mode 1)
(ido-ubiquitous-mode)

After Emacs starts, type R and you'll get the error message.

Error with bindings to lambda functions

I have the following global binding

(global-set-key (kbd "M-j") #'(lambda ()
                                            (interactive)
                                            (join-line -1)))

When I hit M-j ido-ubiquitous causes the following error

Debugger entered--Lisp error: (wrong-type-argument stringp (lambda nil (interactive) (join-line -1)))
  string=("execute-extended-command" (lambda nil (interactive) (join-line -1)))
  funcall(string= "execute-extended-command" (lambda nil (interactive) (join-line -1)))
  (let ((matcher (cdr (assoc type ido-ubiquitous-spec-matchers))) (text (ido-ubiquitous--as-string text)) (symname (ido-ubiquitous--as-string symbol))) (if (null matcher) (progn (error "ido-ubiquitous: Unknown match spec type \"%s\". See `ido-ubiquitous-spec-matchers' for valid types." type))) (funcall matcher text symname))
  (let* ((--cl-rest-- spec) (type (if (= (length --cl-rest--) 2) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal (quote wrong-number-of-arguments) (list nil (length --cl-rest--))))) (text (car --cl-rest--))) (let ((matcher (cdr (assoc type ido-ubiquitous-spec-matchers))) (text (ido-ubiquitous--as-string text)) (symname (ido-ubiquitous--as-string symbol))) (if (null matcher) (progn (error "ido-ubiquitous: Unknown match spec type \"%s\". See `ido-ubiquitous-spec-matchers' for valid types." type))) (funcall matcher text symname)))
  (progn (let* ((--cl-rest-- spec) (type (if (= (length --cl-rest--) 2) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- ...))) (signal (quote wrong-number-of-arguments) (list nil (length --cl-rest--))))) (text (car --cl-rest--))) (let ((matcher (cdr (assoc type ido-ubiquitous-spec-matchers))) (text (ido-ubiquitous--as-string text)) (symname (ido-ubiquitous--as-string symbol))) (if (null matcher) (progn (error "ido-ubiquitous: Unknown match spec type \"%s\". See `ido-ubiquitous-spec-matchers' for valid types." type))) (funcall matcher text symname))))
  ido-ubiquitous-spec-match((exact "execute-extended-command") (lambda nil (interactive) (join-line -1)))
  (if (ido-ubiquitous-spec-match spec cmd) (setq --cl-var-- action --cl-var-- nil) t)
  (if (memq action (quote (disable enable enable-old nil))) (if (ido-ubiquitous-spec-match spec cmd) (setq --cl-var-- action --cl-var-- nil) t) t)
  (progn (setq spec (car --cl-var--) action (car-safe (prog1 spec (setq spec (cdr spec))))) (if (memq action (quote (disable enable enable-old nil))) (if (ido-ubiquitous-spec-match spec cmd) (setq --cl-var-- action --cl-var-- nil) t) t))
  (and (consp --cl-var--) (progn (setq spec (car --cl-var--) action (car-safe (prog1 spec (setq spec (cdr spec))))) (if (memq action (quote (disable enable enable-old nil))) (if (ido-ubiquitous-spec-match spec cmd) (setq --cl-var-- action --cl-var-- nil) t) t)))
  (while (and (consp --cl-var--) (progn (setq spec (car --cl-var--) action (car-safe (prog1 spec (setq spec (cdr spec))))) (if (memq action (quote (disable enable enable-old nil))) (if (ido-ubiquitous-spec-match spec cmd) (setq --cl-var-- action --cl-var-- nil) t) t))) (setq --cl-var-- (cdr --cl-var--)))
  (let* ((--cl-var-- ido-ubiquitous-command-overrides) (spec nil) (action nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq spec (car --cl-var--) action (car-safe (prog1 spec (setq spec ...)))) (if (memq action (quote (disable enable enable-old nil))) (if (ido-ubiquitous-spec-match spec cmd) (setq --cl-var-- action --cl-var-- nil) t) t))) (setq --cl-var-- (cdr --cl-var--))) (if --cl-var-- (progn (quote nil)) --cl-var--))
  (progn (let* ((--cl-var-- ido-ubiquitous-command-overrides) (spec nil) (action nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq spec (car --cl-var--) action (car-safe (prog1 spec ...))) (if (memq action (quote ...)) (if (ido-ubiquitous-spec-match spec cmd) (setq --cl-var-- action --cl-var-- nil) t) t))) (setq --cl-var-- (cdr --cl-var--))) (if --cl-var-- (progn (quote nil)) --cl-var--)))
  ido-ubiquitous-get-command-override((lambda nil (interactive) (join-line -1)))
  eval((ido-ubiquitous-get-command-override cmd))
  (setq override (eval override))
  (lambda (override &rest body) "Eval BODY with specicified OVERRIDE in place.\n\nThe OVERRIDE argument is evaluated normally, so if it is a\nliteral symbol, it must be quoted.\n\nSee `ido-ubiquitous-command-overrides' for valid override types." (setq override (eval override)) (cons (quote let) (cons (list (list (quote ido-ubiquitous-next-override) (list (quote quote) override))) body)))((ido-ubiquitous-get-command-override cmd) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function cmd record-flag keys special))))
  (ido-ubiquitous-with-override (ido-ubiquitous-get-command-override cmd) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function cmd record-flag keys special))))
  (let (ad-return-value) (ido-ubiquitous-with-override (ido-ubiquitous-get-command-override cmd) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function cmd record-flag keys special)))) ad-return-value)
  ad-Advice-command-execute(#[1025 "\305�\211?\205\f

This happens also with other bindings to lambda functions

Reported incompatibility with isearch+

Hi,

I'm writing to tell you that Ido Ubiquitous doesn't work with Isearch+,
more exactly you can't search for unicode characters. I `solved' the
problem by putting:

(ido-ubiquitous-disable-in isearchp-read-unicode-char)

in my .emacs file. Of course I don't get Ido completion, but it's
better than getting an error message and you don't claim Ido works
everywhere in any case. However, I think the less the user has to do
the better. Would it be possible for Ido Ubiquitous to do this
automatically? This seems the best solution until such time as Ido can
be made to work with Isearch+.

Regards,

Bernard.

void function macroexp--backtrace

When installing and compiling, Emacs 24.2 complains about it:

ido-ubiquitous.el:782:1:Warning: the function `macroexp--backtrace' is not
    known to be defined.

and after restarting Emacs, prevents starter-kit from working as macroexp--backtrace definition is void.

Ido-ubiquitous version: 20130912.1508

On require: Symbol's value as variable is void: <HTML><HEAD><TITLE>

I'm using emacs prelude, which tries to load ido-ubiquitous. When it hits the (require 'ido-ubiquitous)
call, though, I get the following message:

require: Symbol's value as variable is void: <HTML><HEAD><TITLE>

Setting debug-on-error didn't produce a backtrace. Any idea what variable it's trying to access?

completion-at-point?

Have you considered going really ubiquitous and adding the full emacs completion tandem?

Maybe merging ido-at-point... It's a tiny extension.

ido-ubiquitous interfering with org-capture, specifically templates

org-mode has feature called Capture, When using Capture one can create Capture templates, which make it easy to create new TODO items or notes. One of the features one can use on a capture template is template expansion, these allow for dynamic insertion of content into templates. For example:

         ("t"
          "TODO"
      entry
      (file+headline "~/Ubuntu One/org/migtd.org" "Entrando")
          "* TODO %^{Brief Description} %^g\n\nAdded: %U" )

Here the %^{Brief Description} element makes Capture prompt the user for a brief description of the TODO on the mini-buffer while capturing a TODO. Unfortunately recently while ido-ubiquitous is activated it tries to use ido for the brief description prompt even though the use of ido is not appropriate there and interferes with the proper input. Here is a screen-shot of this behaviour:
screenshot from 2013-09-27 10 59 46

Choosing the first suggested item breaks

When choosing the first suggested item (without typing anything at the prompt) ido-completing-read does not return the first suggested item. Instead it will return "" the empty string.

I see that ido-find-file handles the case fine (no big surprise), but many other functions using completing-read does not.

Maybe this could be handled by ido-ubiquitous somehow? Or does that break some other functionality?

(one example would be M-x webjump <return> <return>)

Problem with magit

When I hit 'm m' to run manual-merge in magit I get the following backtrace:

(wrong-type-argument symbolp (lambda nil (interactive) (magit-key-mode-command (quote magit-manual-merge))))
  ido-read-internal(list "Merge: " magit-read-rev-history nil nil nil)
  ad-Orig-ido-completing-read("Merge: " ("master" "origin/master") nil nil nil magit-read-rev-history nil nil)
  ido-completing-read("Merge: " ("master" "origin/master") nil nil nil magit-read-rev-history nil)
  magit-ido-completing-read("Merge: " (("master" . "master") ("origin/master" . "refs/remotes/origin/master")) nil nil nil magit-read-rev-history nil)
  magit-completing-read("Merge: " (("master" . "master") ("origin/master" . "refs/remotes/origin/master")) nil nil nil magit-read-rev-history nil)
  magit-read-rev("Merge" nil)
  (list (magit-read-rev "Merge" (magit-guess-branch)))
  call-interactively(magit-manual-merge)
  magit-key-mode-command(magit-manual-merge)
  (lambda nil (interactive) (magit-key-mode-command (quote magit-manual-merge)))()
  call-interactively((lambda nil (interactive) (magit-key-mode-command (quote magit-manual-merge))) nil nil)

I tried to use (ido-ubiquitous-disble-in magit-completing-read) but that fix it.

completing-read-ido may try to use un-expanded collection

ido-ubiquitous is essential for me. Thanks so much for your work on it!

With ido-ubiquitious on, dired-do-rename is failing for me in completing-read-ido, which is being called like:

(completing-read-ido "Rename foo.md to: " read-file-name-internal file-exists-p nil "~/Documents/" file-name-history "~/Documents/foo.md" nil)

I have ido-ubiquitous-allow-on-functional-collection turned on, and note that collection is a function, read-file-name-internal.

The error I receive upon calling dired-do-rename is:

Wrong type argument: sequencep, read-file-name-internal

I am never prompted for the file's new name.

I think the problem is in the following bit of code:

         ;; Pre-expand list of possible completions, but only if we
         ;; have a chance of using ido. This is executed after the
         ;; ido-allowed check to avoid unnecessary work if ido isn't
         ;; going to used.
         (_ignore ;; (Return value doesn't matter).
          (when (and ido-allowed collection-ok)
            (setq collection (all-completions "" collection predicate)
                  ;; Don't need this any more
                  predicate nil)))
         (collection-ok
          ;; Don't use ido if the collection is empty or too large.
          (and collection-ok
               collection
               (or (null ido-ubiquitous-max-items)
                   (<= (length collection) ido-ubiquitous-max-items))))

collection is not being expanded because ido-allowed is false (because ido-ubiquitous-active-override is disable), but then it tries (length collection) which raises the above error because collection is still a symbol.

I suspect that either (1) the check on the length of the collection shouldn't be executed if ido-allowed is already false, or else (2) the collection should be expanded even if ido-allowed is false.

I'm using ido-ubiquitous version 2.10 on Emacs 24.3.1, unofficial Mac port.

`insert-char`

Would it be possible to have ido work for insert-char. I could not figure out why it was not working by default.

Doesn't work for `man` and `gtags-find-tag`

Hello,

I have several questions:

  • Is there a simple way to tell ido-ubiquitous that I want it to work everywhere, even if breaking things? I tried to set ido-ubiquitous-function-overrides and ido-ubiquitous-command-overrides to nil but it didn't work.
  • How should I theorically proceed when I see ido-ubiquitous not working? Add the offending method to ido-ubiquitous-command-overrides?

Thanks

Breaks menu-bar-open

When I run menu-bar-open by any means (eg. M-x menu-bar-open or <f10>), it shows the Menu bar prompt in the mini-buffer briefly, but then the mini-buffer says No buffer named *Completions* and I'm kicked back to the main buffer.

I was able to work around the issue by adding (disable exact "menu-bar-open") to ido-ubiquitous-command-overrides.

Support `ido-load-library`

When ido-ubiquitous-mode is enabled and ido-load-library is available, load-library and find-library should be redirected to ido-load-library and ido-load-library-find. This should be done in a reversible way so that it can be turned off when the mode is turned off.

commit 1b74a85fe6 cause `describe-function' very slow

I guess use `delete-dups' to delete duplicates is inefficiency.

I set 'ido-ubiquitous-max-items' to 20, `C-h v' spend about 4 seconds .
But revert that commit, even set 'ido-ubiquitous-max-items' back to 5000 have no delay.

Breaks with 'gnus-topic-move-group

gnus-topic-move-group in gnus-topic.el doesn't work properly with ido-ubiquitous; after selecting one of the (correct) possibilities for the destination group name, gnus doesn't take the expected action. With ido-ubiquitous disabled, the behavior is correct.

I haven't figured out what's going on, but I see that there's a gnus-completing-read function which is presumably performing some IDO-incompatible magic...

If I find out more, I'll post it here, but I at least wanted to file an issue.

FWIW, I'm using the Gnus in Emacs HEAD, and the latest ido-ubiquitous from Marmalade.

Fallback to default completion on error

Ido-ubiquitous hooks pretty deeply into critical core functionality of Emacs, and when there is an error in ido-ubiquitous, it can effectively make Emacs unusable (for example by disabling all minibuffer prompts). Examples: #16, #17, #18, #21. Instead, ido-ubiquitous should catch any errors that are due to its own intervention and use the fallback completion method in place of ido, with a warning.

Functions cannot be called interactively after ido-ubiquitous is loaded

After ido-ubiquitous is loaded, functions are no longer called interactively according to called-interactively-p. This is regardless of ido-ubiquitous-mode being enabled or disabled, just loading the library is sufficient.

To reproduce, define this function.

(defun must-be-interactive ()
  (interactive)
  (unless (called-interactively-p 'any)
    (error "Not called interactively!!!")))

Before loading ido-ubiquitous, this expression returns nil.

(call-interactively 'must-be-interactive)

After loading ido-ubiquitous.el it will throw the error when evaluated. This includes running the command through execute-extended-command (M-x).

Add whitelist for collection functions

Recent versions use fallback mode when the collection arg to completing-read is a function. However, some functions are ok. A whitelist should be defined.

Disable when collection is too large

TODO: add a preference for max collection size to allow ido. Fall back to standard completion if collection is larger than this size. Nil = no limit.

find-tag?

find-tag is not using ido(-ubiquitous), I don't know whether this is on purpose or an accidental omission.

Is this the main repo?

Your repo is a fork but right now for melpa we have you as the "main" repo. And I noticed that our build broke because you did a forced update. So I am wondering if your branch is not the "main" repo and we should use @technomancy 's repo.

If this is the main repo you shouldn't force push (update) to master IMO. If this isn't the case then I can fix the recipe to use techno's repo and then complain to him if there is a force push... or you because it looks like you can commit there also :)

Disable for smex

Can this be disabled during smex as recent commands history is more useful there? The source code only mentions that smex should be preferred but doesn't mention a way to not have it on during smex operation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.