From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: transient Date: Tue, 19 May 2020 15:53:59 -0700 (PDT) Message-ID: <4bdbede1-587b-4978-a290-166698ad12d9@default> References: <5230692c-c665-a330-7a12-e59fa25d97dd@gmail.com> <70bb51fd-447d-928c-4d69-1c9673a44471@online.de> <871rnnvmdx.fsf@red-bean.com> <87pnb7sira.fsf@red-bean.com> <06bcddd4-6991-e4f7-e944-93de14af263d@yandex.ru> <87h7wjsd8o.fsf@red-bean.com> <20897f01-122d-7f91-eac2-70f5ad75796f@yandex.ru> <87d077qfmm.fsf@red-bean.com> <806193B0-1248-4522-83F1-21FA8206C5A8@traduction-libre.org> <87imgtlofi.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="110387"; mail-complaints-to="usenet@ciao.gmane.io" To: Stefan Kangas , Howard Melman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 20 00:54:54 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbB8P-000SbK-Lz for ged-emacs-devel@m.gmane-mx.org; Wed, 20 May 2020 00:54:53 +0200 Original-Received: from localhost ([::1]:52700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbB8O-0004ip-Lp for ged-emacs-devel@m.gmane-mx.org; Tue, 19 May 2020 18:54:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbB7e-0003Q9-2O for emacs-devel@gnu.org; Tue, 19 May 2020 18:54:06 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:43276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbB7c-0008Jq-J5 for emacs-devel@gnu.org; Tue, 19 May 2020 18:54:05 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04JMpOht031398; Tue, 19 May 2020 22:54:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=jzwyAdFcaI3ulk4VnZdfrKMrY1P8j2nuVZUGRUFpViU=; b=qjiuv+7MoGcl36HRWUfUXiotEMnKWHsqe3eSUPE8KmYHFylR/gy+2Ci+smxHBzhXJVaL E8suqANqm7us+oq3bbCtPzwgNlGvVmn9UmaI9r9nD0yYnDz7gknn3vWxJ1KkMG1Z80yh HZewy9yjH/BYttg5iEaTiOYeWxkErY/Gunm/XYcnJrpByfDFCzaAy2/+URNmMAZlJEdb gGrdemu7sifzX7wcCydjbDW6DLf3cJD8PR11zVnGrFh/uoJKXE1Q6CgHxsaqJ3W0Mhke 1rDcA05pPue6Ff1wZWJzV6ndqaE4vufBBn1L5Jg4pIQDhDw48OWM677fc5EnB1QNeZtr qw== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 3128tng34m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 May 2020 22:54:01 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04JMmPwB189124; Tue, 19 May 2020 22:54:01 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 314gm5xtn3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 May 2020 22:54:01 +0000 Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 04JMs01O015141; Tue, 19 May 2020 22:54:00 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9626 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 adultscore=0 phishscore=0 mlxscore=0 spamscore=0 suspectscore=1 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005190193 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9626 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 bulkscore=0 spamscore=0 clxscore=1015 cotscore=-2147483648 suspectscore=1 lowpriorityscore=0 adultscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005190194 Received-SPF: pass client-ip=156.151.31.85; envelope-from=drew.adams@oracle.com; helo=userp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/19 18:54:03 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:250988 Archived-At: > > Icicles key completion is similar, but there are > > notable differences: > > > > 1. You can use it on-demand (as well as just > > automatically) - complete only when you want > > to, and without a delay. >=20 > What binding do you use here? Won't it conflict with > other keybindings? Are you sure you really want to know? ;-) tl;dr: By default, the key (`S-TAB' by default) doesn't get bound in any keymaps where it's already bound. ___ Option: `icicle-key-complete-keys' is a variable defined in `icicles-opt.el'. Its value is ([backtab]) Documentation: Key sequences to use for `icicle-complete-keys'. A list of values that each has the same form as a key-sequence argument to `define-key'. It is a list mainly in order to accommodate different keyboards - for example, `S-tab' and `S-iso-lefttab'. (IOW the key to complete keys is `S-TAB' only by default.) ___ These options are also relevant here: 1. `icicle-key-complete-keys-for-minibuffer' is a variable defined in `icicle= s-opt.el'. Its value is ([M-backtab] [ESC backtab]) Documentation: Key sequences to use for `icicle-complete-keys' in the minibuffer. A list of values that each has the same form as a key-sequence argument to `define-key'. Note: Some operating systems intercept `M-S-TAB' for their own use. For some versions of MS Windows, you can use (w32-register-hot-key [M-S-tab]) to allow Emacs to use `M-S-TAB'. [The reason for this is that by default `S-TAB' is also used in Icicles in the minibuffer completion maps, to complete minibuffer input. So by default, _key_ completion in the minibuffer itself (yes, it's possible) uses `M-S-TAB'.] 2. `icicle-keymaps-for-key-completion' is a variable defined in `icicles-opt.= el'. Its value is (...) Documentation: List of keymaps in which to bind `S-TAB' to `icicle-complete-keys'. List elements are symbols that are bound to keymaps. Each keymap should have at least one prefix key. `S-TAB' is bound in each keymap, so that you can use it to complete the prefix keys. If one of the keymaps is not defined when Icicle mode is entered, then it is ignored. If you later define it, then just exit and reenter Icicle mode, to bind `S-TAB' in the newly defined map. For example, use `M-x icy-mode' twice after entering Calendar mode, to be able to complete `calendar-mode' prefix keys such as `A'. Do not add `global-map' or any keymaps, such as `ctl-x-map', that are accessible from the global keymap to the list - they are already treated, by default. Do not add any of the translation keymaps, `function-key-map', `key-translation-map', or `iso-transl-ctl-x-8-map' to the list - that will not work. [These are keymaps inaccessible from `global-map', as maps accessible from it are already included.] 3. `icicle-complete-key-anyway-flag' is a variable defined in `icicles-opt.el= '. Its value is nil Documentation: Non-nil means bind `S-TAB' for key completion even if already bound. If nil, then each of the keys in `icicle-key-complete-keys' is bound to `icicle-complete-keys' in each keymap of `icicle-keymaps-for-key-completion' only if `S-TAB' is not already bound in the keymap. Note: the keys in `icicle-key-complete-keys' are always bound to `icicle-complete-keys' in `icicle-mode-map'. This option affects only the binding of those keys in `icicle-keymaps-for-key-completion'. [Besides the keymaps defined by that option, keymaps reachable from `global-map' with this function get the `S-TAB' binding, IF either they don't already have `S-TAB' bound OR option `icicle-complete-key-anyway-flag' is non-nil. This is the reason behind the "Do not add `global-map'..." part of the `icicle-keymaps-for-key-completion' doc string.] (defun icicle-bind-key-completion-keys-in-keymaps-from (map &optional keys) "Bind keys in `icicle-key-complete-keys' to `icicle-complete-keys'. Each key in `icicle-complete-keys' (or optional arg KEYS, if non-nil) is bound in all keymaps accessible from keymap MAP." (dolist (key+map (accessible-keymaps map)) (let ((map (cdr key+map))) (when (keymapp map) (dolist (key (or keys icicle-key-complete-keys)) (when (or icicle-complete-key-anyway-flag (not (lookup-key map key))) (condition-case nil (define-key map key 'icicle-complete-keys) (error nil)))))))) The same kind of treatment happens in reverse when you turn `icy-mode' off: key-completion keys are unbound. (Yes, it can't be perfect. For example, the set of keymaps accessible from the then current global map might be different, or their keys might be different.) See this part of the doc: https://www.emacswiki.org/emacs/Icicles_-_Key_Completion#KeymapsInaccessibl= eFromGlobalMap Search that same page for "option" to see the above options and others having to do with key completion described in context.