[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two questions about icicles
From: |
Seweryn Kokot |
Subject: |
Re: Two questions about icicles |
Date: |
Fri, 02 Nov 2007 17:18:57 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
"Drew Adams" <drew.adams@oracle.com> writes:
>> I'm trying to start using icicles and these are two things which bother
>> me
>>
>> 1. when I type C-h f char S-TAB M-* delete
>> I can find functions which contain "char" and "delete" in them, however
>> if I start to type C-h f delete S-TAB then I get that there are no
>> completions. Any idea what's wrong?
>
> No idea. It works for me.
>
> Please use `M-x icicle-send-bug-report', providing a step-by-step recipe to
> reproduce the problem, starting with "emacs -Q" (to inhibit loading init
> files). Let me know what Emacs version you use, and please use the latest
> Icicles files.
I installed icicles with get_icicles.sh script.
1.
emacs -Q -l .emacs_test
where .emacs_test file is:
(setq load-path (append (list "~/elisp/icicles") load-path))
(require 'icicles)
(icy-mode 1)
2. "C-h f char S-TAB" gives no completion,
while typing "C-h f delete S-TAB" gives completion
list where there are functions containing "char" substring.
I use emacs22 in Debian
GNU Emacs 22.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2007-08-22 on raven, modified by Debian
and latest icicles files.
>
>> 2. how to swap keys TAB and S-TAB in icicles-mode? I mean if I use S-TAB
>> more frequently than TAB then why not make life easier. It's not simple
>> since S-TAB means 'icicle-complete-keys' and 'icicle-apropos-complete'
>> depending on context. It would be nice to have a snippet of code to yank
>> it into .emacs file.
>
> See
> http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Customizing_Key_Bindings.
>
> I'm afraid that the key used for key completion is hard-coded to `S-TAB', so
> far. I'll think about making that easier to change. For now, you can change
> it in the code (file icicle-mode.el):
>
> (defun icicle-bind-S-TAB-in-keymaps-from (map)
> "Bind `S-TAB' to `icicle-complete-keys' in keymaps accessible from MAP."
> (dolist (key+map (accessible-keymaps map))
> (let ((map (cdr key+map)))
> (when (and (keymapp map) ; Try to exclude menu maps.
> (not (stringp (car-safe (last map)))))
> (unless (lookup-key map [S-tab])
> (condition-case nil
> (define-key map [S-tab] 'icicle-complete-keys)
> (error nil)))
> (unless (lookup-key map [S-iso-lefttab])
> (condition-case nil
> (define-key map [S-iso-lefttab] 'icicle-complete-keys)
> (error nil)))))))
>
> Change [S-tab] to [(control ?i)] - that's TAB. You can either leave the rest
> as is or remove the last `unless' sexp - it is needed only because some
> keyboards use a different Shift TAB key.
>
> HTH - Drews
thanks for this elisp code, I'll try it.
--
Seweryn Kokot