Icicles - Libraries

Last edit

Added:

> [new:DrewAdams:2013-10-16 20:12 UTC]
> '''NOTE:''' '''Icicles''', as well as my other libraries that are on %%EmacsWiki%% are also obtainable from [[http://melpa.milkbox.net/|MELPA]]. What's more, you can be pretty sure that they are untampered with, because their wiki pages are locked except to %%EmacsWiki%% administrators.
> [new]


iciclesimage
Previous: IciclesIciclesIndexNext: Icicles - Screenshots

Icicles Libraries

Icicles” refers to a set of libraries that enhance minibuffer input, providing cycling among completion candidates and more powerful completion. It is composed of the following required libraries:

Required

When you load (e.g. ‘load-library’ or ‘require’) the driver library, icicles.el, the others are all loaded automatically, except for icicles-chg.el, icicles-doc1.el and icicles-doc2.el, which need not be loaded (they contain only a change log and documentation, as comments).

Optional, But Recommended

The following libraries are recommended but optional (loaded by icicles.el if in your ‘load-path’, otherwise ignored). They are enhanced by Icicles, or Icicles is enhanced by them, or both.

apropos-fn+var.elApropos enhancements for functions and variables.
bookmark+.el etc.Many bookmark enhancements. See Bookmark+ and Icicles - Bookmark Enhancements.
col-highlight.elRequired by crosshairs.el (Emacs 22+). See HighlightCurrentColumn.
crosshairs.elHighlight target positions – see CrosshairHighlighting.
doremi.el, doremi-frm.elIncremental changes – see Icicles - Completions Display, Icicles - Fuzzy Symbol Completion, and option icicle-max-candidates.
frame-cmds.elFrame and window commands.
fuzzy-match.elSee Icicles - Fuzzy Completion.
hexrgb.elColor manipulation. I strongly recommend that you include this library.
hl-line+.elRequired by crosshairs.el (Emacs 22+). See HighlightCurrentLine.
icomplete+.elSee Icicles - Icompletion and Icomplete+.
info+.elSee Icicles - Info Enhancements and Info+.
lacarte.elKeyboard access to the menu bar menus – see LaCarte. Used with Icicles, you can type a substring or a regexp that matches any part of a menu bar menu tree, and you can cycle among completion candidates to easily navigate menus and choose a menu item.
mb-depth+.elMinibufferDepthIndicator, for recursive minibuffers (Emacs 22 and later).
pp+.elPretty-printing for `M-:’. See Pp+.
synonyms.elA hypertext thesaurus. See Synonyms.
thingatpt+.elBetter defaults when using commands; better possibilities for `M-.’. See ThingAtPoint+ and Icicles - Inserting Text from Cursor.
vline.elRequired by crosshairs.el (Emacs 22+). See VlineMode.

Be aware that some of these libraries in turn require other libraries. For example, library frame-cmds.el requires library frame-fns.el

Depending on your platform, if you use Icicles in a text terminal (that is, without a window system/manager), then you might need to change some of the key bindings, if some of the default bindings are not available to you.

If on your platform, for example, Emacs in a text terminal does not recognize a key such as ‘S-TAB’ (as something different from ‘TAB’), then you will want to change that key binding. To customize Icicles key bindings, see Icicles - Customizing Key Bindings. You might also want to customize some of the Icicles faces, since a text terminal is sometimes limited in the colors it can handle.

It is of course best to byte-compile all of the libraries (except icicles-chg.el, icicles-doc1.el, and icicles-doc2.el). You will likely get some byte-compiler warning messages. These are probably benign – ignore them. Icicles is designed to work with multiple versions of Emacs, and that fact provokes compiler warnings. If you get byte-compiler errors (not warnings), then please report a bug, using ‘M-x icicle-send-bug-report’.

Whenever you update Icicles (i.e., download new versions of Icicle source files), I recommend that you do the following:

  1. Delete all existing byte-compiled Icicles files (icicles*.elc).
  2. Load Icicles (‘load-library’ or ‘require’).
  3. Byte-compile the source files.

In particular, always load icicles-mac.el (not icicles-mac.elc) before you byte-compile new versions of the files, in case there have been any changes to Lisp macros (in icicles-mac.el).

After startup, you can turn Icicle mode on or off at any time interactively, using command ‘icy-mode’ (aka ‘icicle-mode’ -- prefix ‘icy’ is unique to this command, so it is easier to complete).

Note: If you turn on Icicle mode in your init file, it’s generally best to do so as late as possible – after you or any libraries that you load do any key binding. This is because Icicles uses the current global key bindings to determine which keys to bind for minibuffer completion and cycling. To pick up the latest bindings at any time, you can of course enter Icicle mode interactively using command ‘icy-mode’ (if necessary, exit, then re-enter).

Note: Icicles redefines some functions when you are in Icicle mode (it restores them when you leave Icicle mode). It generally does not use ‘defadvice’ to alter the functions; it redefines them instead. Because of this, there can be incompatibilities with other libraries that also change the same functions (using ‘defadvice’ or otherwise). An example is ViperMode. If you load Viper before Icicles, then you will run into problems with function ‘read-file-name’ because it is tweaked by both Viper and Icicles. If you load Icicles before Viper, you should not encounter this problem (but you might encounter other problems: both Icicles and Viper try to control the minibuffer).

Checking What Has Changed

Here’s one way to check which Icicles libraries have changed recently: Latest Icicles Changes

Downloading Icicles Libraries

NOTE: Icicles, as well as my other libraries that are on EmacsWiki are also obtainable from MELPA. What’s more, you can be pretty sure that they are untampered with, because their wiki pages are locked except to EmacsWiki administrators.

You can download the Icicles files individually from ElispArea, by clicking the file link and then right-clicking the ‘Download’ link for each, and choosing ‘Save As’ in your browser. You will need to do that on each file page.

Alternatively, there are ways you can download all of the files at once. Some of these means were provided by Icicles users.

Note: The EmacsWiki ElispArea always has the latest version of Icicles. If you want to be sure to have the latest version, then either download the files individually there or use one of the first two methods described below (within Emacs and using a shell script). The files obtained by the other methods are updated only periodically (e.g. once a week).

If you have Emacs 24 or later, then the first method is probably the easiest way to obtain up-to-date Icicles files.

1. Within Emacs – Alternative ways:

  • You can download Icicles from MELPA. If you use Emacs 24 or later, you can both download and install it from within Emacs, easily. To do that, you first need to add ‘melpa’ to list ‘package-archives’. Then use ‘M-x list-packages’ and click ‘icicles’ in the list of available pacakges. Use code like this to add ‘melpa’ to the list of available archives:
       (when (> emacs-major-version 23)
        (require 'package)
        (package-initialize)
        (add-to-list 'package-archives 
                     '("melpa" . "http://melpa.milkbox.net/packages/")
                     'APPEND))
  • Use library icicles-install.el. See the simple instructions in the file header. Based on the ELPA initialization code. It uses UrlPackage, if available; else it uses ‘wget’. Thanks to AnupamSengupta for this.
  • Use library auto-install.el. Setup like this: (setq auto-install-save-confirm nil). Do ‘M-x auto-install-batch’, then enter ‘icicles’. – Thanks to AndyStewart for this.

2. Using a shell script: (UNIX, GNU/Linux) Use ‘wget’: get-icicles.sh. Thanks to LeWang for that. Thanks to MishaGorodnitzky? for tweaking it to get around an EmacsWiki limit on how many files you can download per second.

Note: Bash complains with the message “./get-icicles.sh: line 67: [: missing `]’”, but the line looks fine, and the script works anyway.

It looks like you need to use -a instead of &&, or else this line fails and it won’t create the backup, at least on cygwin bash. So, the correct line is
   if [ -z "$no_backup"  -a  -d "$dir" ]; then
– [[c-98-210-60-2.hsd1.ca.comcast.net?]]
Feel free to test what you think is better and then update the script to correct it. Thx – DrewAdams

3. Using git: The GitHubMirror contains a git repository that includes the Icicles files (https://github.com/emacsmirror/icicles), as well as other repositories.

The Icicles repository contains the full git history of each Icicles file, but it does not include any of the other libraries on which Icicles depends or which Icicles can take advantage of. (The git commit messages themselves are not meaningful.) Those related libraries are also available on the GitHubMirror, but in separate git repositories.

Note that repository names on github cannot contain a plus character (`+’). So, for example, Bookmark+ files are available from repository https://github.com/emacsmirror/bookmark-plus, not https://github.com/emacsmirror/bookmark+.

4. Using a zip file: You can download an automatically generated zip file of Icicles files from the Icicles repository on the GitHubMirror. The zip file contains only the Icicles files, not any related files (see #3).

5. Python script: icicles dler.py. Runs under python2.5.2. Thanks to DarrenYin?. (The script is still “somewhat sketchy”. – DarrenYin?)

6. Using ‘wget’ directly :

  • Required libraries: wget http://www.emacswiki.org/emacs/download/icicles{,-chg,-cmd1,-cmd2,-doc1,-doc2,-face,-fn,-mac,-mcmd,-mode,-opt,-var}.el
  • Optional libraries: wget http://www.emacswiki.org/emacs/download/{apropos-fn%2bvar,bookmark%2b,col-highlight,crosshairs,doremi,doremi-frm,frame-cmds,fuzzy-match,hexrgb,hl-line%2b,icomplete%2b,info%2b,lacarte,mb-depth%2b,pp%2b,synonyms,thingatpt%2b,vline}.el

– JoniDiMontago?


Previous: IciclesIciclesIndexNext: Icicles - Screenshots

DrewsElispLibraries referenced here: Lisp:lacarte.el, Lisp:icicles.el, Lisp:icicles-chg.el, Lisp:icicles-cmd1.el, Lisp:icicles-cmd2.el, Lisp:icicles-face.el, Lisp:icicles-fn.el, Lisp:icicles-mac.el, Lisp:icicles-mode.el, Lisp:icicles-opt.el, Lisp:icicles-var.el, Lisp:icomplete+.el


CategoryCommands CategoryCompletion CategoryRegexp