summaryrefslogtreecommitdiff
path: root/lisp/icomplete.el
Commit message (Collapse)AuthorAgeFilesLines
* Add comment on fido-mode's file-sorting semanticsJoão Távora2020-01-091-0/+6
| | | | * lisp/icomplete.el (icomplete--sorted-completions): Add comment.
* Consider non-string minibuffer-default in icompleteJoão Távora2020-01-091-5/+6
| | | | | | | Fixes: bug#38992 * lisp/icomplete.el (icomplete--sorted-completions): Consider non-string minibuffer-default.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Don't always resort in recently introduced icomplete--sorted-completionsJoão Távora2019-12-311-30/+31
| | | | | | | | | | Doing so breaks icomplete-forward-completions and icomplete-backward-completions. * lisp/icomplete.el (icomplete--sorted-completions): Don't always resort. (cherry picked from commit 639fb50ed4c622f99dfbde32fbdbca42ce36d385)
* Don't force completion recalculation in icomplete-fido-retJoão Távora2019-12-311-4/+2
| | | | | | | | | | | Besides the adverse effect of delaying completions, it tripped up the useful logic of icomplete-force-complete-and-exit in the case where a default was available, but no completions calculated yet. * lisp/icomplete.el (icomplete-fido-ret): Don't force calculation of completions. (cherry picked from commit 13778aa5be7bf028893672d84c2a291f491d8216)
* Correctly cache sorted completions in icomplete--sorted-completionsJoão Távora2019-12-311-29/+30
| | | | | | | * lisp/icomplete.el (icomplete--sorted-completions): Use completion--cache-all-sorted-completions. (cherry picked from commit 83587bb68830bd91124f99ddf8590d1d5f63869f)
* Move flex style's minibuffer-default-aware sorting to lisp/icomplete.elJoão Távora2019-12-311-13/+27
| | | | | | | | | | | | | | | | This moves the logic from the series of commits starting in the commit named: Improve sorting of flex completion style with non-nil minibuffer-default to lisp/icomplete.el, so far the only confirmed beneficiary of that functionality. * lisp/icomplete.el (icomplete--sorted-completions): Consider minibuffer-default here. * lisp/minibuffer.el (completion--flex-adjust-metadata): Simplify. (cherry picked from commit 0d2a711dc9a65dc8eb6e995369e70cddbcd7d9a4)
* Make fido-mode behave more like ido-mode when finding directoriesJoão Távora2019-12-311-2/+19
| | | | | | | | | | | Notably C-x d (M-x dired) and C-x v d (M-x vc-dir) behaved quite differently, having regular files as the default instead of ido's usual "./". * lisp/icomplete.el (icomplete--sorted-completions): New helper. (icomplete-completions): Use it. (cherry picked from commit ee914051fbb4fbff9073a23b5ea7668bf48b5c6a)
* Slightly simplify lisp/icomplete.el with new icomplete--category helperJoão Távora2019-12-311-24/+15
| | | | | | | | | | * lisp/icomplete.el (icomplete-fido-kill) (icomplete-fido-delete-char, icomplete-fido-ret) (icomplete-fido-backward-updir, icomplete-exhibit): Use icomplete--category. (icomplete--category): New helper. (cherry picked from commit 24a1f520f91c278cb8cc57325ea80285a3b252cf)
* ; Spelling fixesPaul Eggert2019-12-101-1/+1
|
* * lisp/icomplete.el (icomplete-fido-kill): Unbreak yes-or-no-p usageJoão Távora2019-11-191-1/+5
| | | | Discussed in the context of bug#19064, bug#17272.
* Make icomplete-tidy-shadowed-file-names less aggressiveJoão Távora2019-11-151-52/+55
| | | | | | | | | | | | | When using this option and editing input, some transient situations may arise that lead to file-name shadowing, but that shouldn't necessarily lead to auto-delete behaviour, which will be suprising. In '/foo/x/bar', if the user deletes the 'x', shadowing occurs, but probably shouldn't. So, somewhat like ido-mode, only auto-tidy shadowed file names if the user is inserting text at end of input. * lisp/icomplete.el (icomplete-exhibit): Check this-command. (icomplete-tidy-shadowed-file-names): Tweak docstring.
* Avoid fido-mode's setup on non-icomplete minibuffersJoão Távora2019-11-131-7/+8
| | | | | | | | Otherwise we would lose things like C-r (isearch-backward) when doing simple stuff like non-icomplete pp-eval-expression. * lisp/icomplete.el (icomplete--fido-mode-setup): Restrict setup to when icomplete-mode really kicks in.
* Add extra bindings to fido-mode.Jimmy Aguilar Mena2019-11-101-0/+5
| | | | | * lisp/icomplete.el (icomplete-fido-mode-map) : Add arrows and other bindings to reproduce ido behaviour.
* Revert "Nudge icomplete-mode a little closer to fido-mode"João Távora2019-11-091-13/+2
| | | | | | | | | Fixes bug#38131. This is not the best way to have fido-mdoe emulate that particular bit of ido-mode. This reverts commit 5761a1a3939e23d8e8c725241dd9398a12f191b0.
* Rename some commands to reflect they are fido-mode specificJoão Távora2019-11-091-8/+8
| | | | | | | | * lisp/icomplete.el (icomplete-fido-kill) (icomplete-fido-delete-char, icomplete-fido-ret) (icomplete-fido-backward-updir): Rename from icomplete-magic-ido-* versions. (icomplete-fido-mode-map): Use new command names.
* Nudge icomplete-mode a little closer to fido-modeJoão Távora2019-11-081-2/+13
| | | | | | * lisp/icomplete.el (icomplete-completions): Don't use ellipsis when truncating determ in fido-mode. Highlight the center part of determ with icomplete-first-match.
* Document fido-modeJoão Távora2019-11-051-7/+11
| | | | | | | | | | | * doc/emacs/buffers.texi (Icomplete): Document Fido Mode. * etc/NEWS: Mention Fido Mode. * lisp/icomplete.el (icomplete-mode): Ensure fido-mode is off. (fido-mode): Ensure icomplete-mode is off. (icomplete-magic-ido-ret): Don't force completions if no completions.
* New fido-mode, emulates ido-mode with icomplete-modeJoão Távora2019-11-051-15/+37
| | | | | | * lisp/icomplete.el (icomplete-fido-mode-map): New variable. (icomplete--fido-mode-setup): New function. (fido-mode): New global minor mode.
* Correct merge blunder in last icomplete commitJoão Távora2019-11-021-5/+1
| | | | | * lisp/icomplete.el (icomplete-exhibit): Use while-no-input-ignore-events.
* New icomplete-tidy-shadowed-file-names variableJoão Távora2019-11-021-39/+66
| | | | | | * lisp/icomplete.el (rfn-eshadow): Require it. (icomplete-tidy-shadowed-file-names): New variable. (icomplete-exhibit): Use icomplete-tidy-shadowed-file-names.
* Fix icomplete-force-complete-and-exit for no-input situationsJoão Távora2019-11-021-3/+23
| | | | | | | | | | | | | If there is no minibuffer input, but the user has already cycled some pre-calculated completions, we should be calling minibuffer-force-complete-and-exit instead of minibuffer-complete-and-exit. The former is guaranteed to be fast in this situation and yields the desired "selected" completion, while the latter will just give us the default, ignoring all the cycling of icomplete-{forward|backward}-completions. * lisp/icomplete.el (icomplete-force-complete-and-exit): Add comments and fix for empty input but some completions calculated.
* Improve fix for icomplete's backward-kill-word bug#38024João Távora2019-11-021-2/+5
| | | | | | | * lisp/icomplete.el (icomplete-exhibit): Use while-no-input-ignore-events, not redisplay. Co-authored-by: Stefan Monnier <j.schmoe@example.org>
* Make icomplete-exhibit actually work when navigating up directoriesJoão Távora2019-10-291-0/+2
| | | | | | | | | Sometimes, when finding files with icomplete-mode, backward-deleting the previous word or sexp (to move up a directory) doesn't actually refresh the file list of the new directory. Forcing redisplay in icomplete-exhibit misteriously fixes the problem. * lisp/icomplete.el (icomplete-exhibit): Add call to redisplay.
* New commands for making icomplete behave more like idoJoão Távora2019-10-291-0/+85
| | | | | | | | | | | | | | | | This tries (not particularly hard) to emulate Ido's magic C-k, C-d, RET and DEL. For now, the new commands have to be explicitly added to an active map by the user, using something like this: (let ((imap icomplete-minibuffer-map)) (define-key imap (kbd "C-k") 'icomplete-magic-ido-kill) (define-key imap (kbd "C-d") 'icomplete-magic-ido-delete-char) (define-key imap (kbd "RET") 'icomplete-magic-ido-ret) (define-key imap (kbd "DEL") 'icomplete-magic-ido-backward-updir)) * lisp/icomplete.el (icomplete-magic-ido-kill) (icomplete-magic-ido-delete-char, icomplete-magic-ido-ret) (icomplete-magic-ido-backward-updir): New commands.
* Optimize lisp/icomplete.el when default completion availableJoão Távora2019-10-271-4/+2
| | | | | | | | | | | | | | | | | | | | Often, when using icomplete with icomplete-show-matches-on-no-input and commands like C-h f, icomplete-exhibit will take a long time (like several seconds) to show all the completions. However, if there is a non-nil default value, like when the C-h f is performed exactly on a function name, the minibuffer prompt will reflect that immediately. If the user immediately presses RE (icomplete-force-complete-and-exit) we take that to mean "use the default" and avoid the long wait. As an extra performance tweak, this commit also removes an unneeded call to icomplete-exhibit in icomplete-minibuffer-setup. * lisp/icomplete.el (icomplete-force-complete-and-exit): Short-circuit possibility of non-nil minibuffer-default. (icomplete-minibuffer-setup): No need to explicitly icomplete-exhibit here since icomplete-post-command-hook will call it unconditionally.
* Remove Maintainer: when it duplicates Author:Paul Eggert2019-05-261-1/+0
| | | | | | | The convention is that a file with Author: but not Maintainer: means the author is a maintainer, which makes it confusing when a file lists the same person as author and maintainer. Avoid the confusion by removing the duplicate Maintainer: line.
* Fixes for "Maintainer:" and related linesPaul Eggert2019-05-191-2/+2
| | | | | | Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines, which are not that useful. It also cleans up and regularizes a few similar lines.
* Rework last commit to icomplete and minibuffer.el.Stefan Monnier2019-01-231-11/+2
| | | | | | | | | | | | | | | Rather than let minibuffer-force-complete set up cycling and then undoing it, better tell it directly not to setup cycling. Also be a bit more careful to remove the transient map. Additionally to bug#34077 and bug#34116, this also relates to bug#25644. * lisp/minibuffer.el (completion--flush-all-sorted-completions): Also take down the transient cycling map if applicable. (minibuffer-force-complete): New arg dont-cycle. Set completion-cycling to the actual function that takes down the transient map rather than just t. (minibuffer-force-complete-and-exit): * lisp/icomplete.el (icomplete-force-complete): Use new dont-cycle arg.
* Force completion in icomplete with C-M-i, but don't cycle (bug#34077)João Távora2019-01-231-1/+16
| | | | | | | | | | | | | | | | | | | | Cycling after forcing a completion with C-M-i in icomplete can be confusing, as it leaves rotated prospects in the minibuffer. In C-x C-f, for example it is very difficult to understand if the prospects refer to subdirectories of the directory being completed to, which happens naturally when the completion is unique; or if they are a cycled version of prospects that match the new completion pattern, in case the completion happens to still match other items. To resolve this confusion, never cycle with C-M-i in icomplete: non-ambiguous cycling can be achieved with C-. and C-, The former behaviour can still be restored with: (define-key icomplete-minibuffer-map (kbd "C-M-i") 'minibuffer-force-complete) * lisp/icomplete.el (icomplete-force-complete): New command. (icomplete-minibuffer-map): Bind C-M-i to icomplete-force-complete.
* Simplify ignored extensions filtering in Icomplete (bug#34070)João Távora2019-01-171-12/+22
| | | | | | * lisp/icomplete.el: Use lexical binding. (icomplete-completions): Use minibuffer-completion-predicate to filter out completion-ignored-extensions.
* Revert "Fix icomplete's cycling when filename filtering kicks in"João Távora2019-01-171-12/+5
| | | | | This reverts commit cdb082322d4209c5104bc1a98b21bf3dd75e8f17, which was a fix for bug#34070. A much better fix to be added soon.
* Fix icomplete's cycling when filename filtering kicks inJoão Távora2019-01-141-5/+12
| | | | | | | | | Fixes: bug#34070 * lisp/icomplete.el (icomplete--filtered-completions): New variable. (icomplete-forward-completions, icomplete-backward-completions): Use it. (icomplete-completions): Set it.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Optionally add argument description in minor mode DOC (bug#10754)John Shahid2018-07-011-3/+0
|/ | | | | | | | | | | Add a paragraph to minor mode's docstring documenting the mode's ARG usage if the supplied docstring doesn't already contain the word "ARG". * easy-mmode.el (easy-mmode--arg-docstring): New const. (easy-mmode--arg-docstring): New function. (define-minor-mode): Use them. Remove argument documentation from all minor modes.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Give a fixed default value for icomplete-prospects-height (Bug#26939)Noam Postavsky2017-06-141-9/+6
| | | | | | * lisp/icomplete.el (icomplete-prospects-height): Default to 2. (icomplete-prospects-length): Remove. * etc/NEWS: Announce removal.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.
* | Make icomplete respect `completion-ignored-extensions'Drew Adams2016-04-281-0/+3
|/ | | | | * lisp/icomplete.el (icomplete-completions): Heed `completion-ignored-extensions' (bug#12939).
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer directed to neutral quotesPaul Eggert2015-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer directed to neutral quotes in docstings and diagnostics. In docstrings, escape apostrophes that would otherwise be translated to curved quotes using the newer, simpler rules. * admin/unidata/unidata-gen.el (unidata-gen-table): * lisp/align.el (align-region): * lisp/allout.el (allout-mode, allout-solicit-alternate-bullet): * lisp/bookmark.el (bookmark-default-annotation-text): * lisp/calc/calc-aent.el (math-read-if, math-read-factor): * lisp/calc/calc-lang.el (math-read-giac-subscr) (math-read-math-subscr): * lisp/calc/calc-misc.el (report-calc-bug): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-read-parse-table-part): * lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules): * lisp/cedet/semantic/complete.el (semantic-displayor-show-request): * lisp/dabbrev.el (dabbrev-expand): * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/elint.el (elint-get-top-forms): * lisp/emacs-lisp/lisp-mnt.el (lm-verify): * lisp/emulation/viper-cmd.el (viper-toggle-search-style): * lisp/erc/erc-button.el (erc-nick-popup): * lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login): * lisp/eshell/em-dirs.el (eshell/cd): * lisp/eshell/em-glob.el (eshell-glob-regexp): * lisp/eshell/em-pred.el (eshell-parse-modifiers): * lisp/eshell/esh-arg.el (eshell-parse-arguments): * lisp/eshell/esh-opt.el (eshell-show-usage): * lisp/files-x.el (modify-file-local-variable): * lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer) (filesets-update-pre010505): * lisp/find-cmd.el (find-generic, find-to-string): * lisp/gnus/auth-source.el (auth-source-netrc-parse-entries): * lisp/gnus/gnus-agent.el (gnus-agent-check-overview-buffer) (gnus-agent-fetch-headers): * lisp/gnus/gnus-int.el (gnus-start-news-server): * lisp/gnus/gnus-registry.el: (gnus-registry--split-fancy-with-parent-internal): * lisp/gnus/gnus-score.el (gnus-summary-increase-score): * lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): * lisp/gnus/gnus-topic.el (gnus-topic-rename): * lisp/gnus/legacy-gnus-agent.el (gnus-agent-unlist-expire-days): * lisp/gnus/nnmairix.el (nnmairix-widget-create-query): * lisp/gnus/spam.el (spam-check-blackholes): * lisp/mail/feedmail.el (feedmail-run-the-queue): * lisp/mpc.el (mpc-playlist-rename): * lisp/net/ange-ftp.el (ange-ftp-shell-command): * lisp/net/mairix.el (mairix-widget-create-query): * lisp/net/tramp-cache.el: * lisp/obsolete/otodo-mode.el (todo-more-important-p): * lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): * lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region): * lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region): * lisp/org/ob-core.el (org-babel-goto-named-src-block) (org-babel-goto-named-result): * lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap): * lisp/org/ob-ref.el (org-babel-ref-resolve): * lisp/org/org-agenda.el (org-agenda-prepare): * lisp/org/org-bibtex.el (org-bibtex-fields): * lisp/org/org-clock.el (org-clock-notify-once-if-expired) (org-clock-resolve): * lisp/org/org-feed.el (org-feed-parse-atom-entry): * lisp/org/org-habit.el (org-habit-parse-todo): * lisp/org/org-mouse.el (org-mouse-popup-global-menu) (org-mouse-context-menu): * lisp/org/org-table.el (org-table-edit-formulas): * lisp/org/ox.el (org-export-async-start): * lisp/play/dunnet.el (dun-score, dun-help, dun-endgame-question) (dun-rooms, dun-endgame-questions): * lisp/progmodes/ada-mode.el (ada-goto-matching-start): * lisp/progmodes/ada-xref.el (ada-find-executable): * lisp/progmodes/antlr-mode.el (antlr-options-alists): * lisp/progmodes/flymake.el (flymake-parse-err-lines) (flymake-start-syntax-check-process): * lisp/progmodes/python.el (python-define-auxiliary-skeleton): * lisp/progmodes/sql.el (sql-comint): * lisp/progmodes/verilog-mode.el (verilog-load-file-at-point): * lisp/server.el (server-get-auth-key): * lisp/subr.el (version-to-list): * lisp/textmodes/reftex-ref.el (reftex-label): * lisp/textmodes/reftex-toc.el (reftex-toc-rename-label): * lisp/vc/ediff-diff.el (ediff-same-contents): * lisp/vc/vc-cvs.el (vc-cvs-mode-line-string): * test/automated/tramp-tests.el (tramp-test33-asynchronous-requests): Use directed rather than neutral quotes in diagnostics.
* New command icomplete-force-complete-and-exitDmitry Gutov2015-05-191-3/+13
| | | | | | | | | | | | | * lisp/icomplete.el (icomplete-force-complete-and-exit): New command (http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00461.html) (http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00516.html). (icomplete-minibuffer-map): Bind C-j to it. (icomplete-forward-completions, icomplete-backward-completions): Mention the new command in the docstring. * lisp/minibuffer.el (minibuffer-force-complete-and-exit): Revert the previous fix for bug#17545.
* Update copyright year to 2015Paul Eggert2015-01-011-2/+2
| | | | Run admin/update-copyright.
* * lisp/icomplete.el: Move Iswitchb autoload here. Much simpler.Stefan Monnier2014-10-061-0/+13
| | | | | | | | * lisp/Makefile.in (obsolete-autoloads): Remove. (AUTOGENEL): Remove obsolete/loaddefs.el. * lisp/loadup.el: Don't load obsolete/loaddefs.el. * lisp/obsolete/iswitchb.el (iswitchb-mode): Use normal autoload cookie. Remove redundant obsolescence thingy.
* lisp/icomplete.el (icomplete-completions): Follow-up to ↵Juanma Barranquero2014-03-031-1/+1
| | | | 2014-03-01T01:25:29Z!lekktu@gmail.com.
* lisp/icomplete.el, lisp/ido.el: Doc fixes.Juanma Barranquero2014-03-031-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | lisp/icomplete.el: Miscellaneous doc fixes. Use Icomplete everywhere instead of icomplete for consistency. (icomplete-max-delay-chars): Fix typo. (icomplete-mode): Use \[]. (icomplete-tidy, icomplete-exhibit): Reflow. (icomplete-minibuffer-setup-hook, icomplete-completions): Remove superfluous backlashes. lisp/ido.el: Miscellaneous doc fixes. Use Ido everywhere instead of ido or `ido' for consistency. (ido-record-ftp-work-directories, ido-merge-ftp-work-directories) (ido-cache-ftp-work-directory-time, ido-slow-ftp-hosts) (ido-slow-ftp-host-regexps, ido-reread-directory): Upcase "ftp". (ido-separator): Extract obsolescence info from docstring and declare with make-obsolete-variable. (ido-minibuffer-setup-hook): Simplify example. (ido-text, ido-text-init, ido-input-stack, ido-report-no-match) (ido-wide-find-file, ido-wide-find-dir, ido-wide-find-dir-or-delete-dir) (ido-completion-help, ido-completing-read): Fix typos in docstrings. (ido-everywhere): Reflow docstring. (ido-toggle-vc): Doc fix. (ido-switch-buffer, ido-find-file): Use tabs to improve legibility of long list of keybindings.
* lisp/icomplete.el (icomplete-completions): Use string-width.Juanma Barranquero2014-03-021-2/+2
| | | | Suggested by Stefan Monier <monnier@iro.umontreal.ca>.