From unknown Fri Jun 20 07:25:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#17000 <17000@debbugs.gnu.org> To: bug#17000 <17000@debbugs.gnu.org> Subject: Status: setup ido keymaps only once Reply-To: bug#17000 <17000@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:25:05 +0000 retitle 17000 setup ido keymaps only once reassign 17000 emacs submitter 17000 Jonas Bernoulli severity 17000 minor tag 17000 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 15:50:38 2014 Received: (at submit) by debbugs.gnu.org; 12 Mar 2014 19:50:38 +0000 Received: from localhost ([127.0.0.1]:34948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNpAi-0002EY-VC for submit@debbugs.gnu.org; Wed, 12 Mar 2014 15:50:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42723) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNpAf-0002EE-Ot for submit@debbugs.gnu.org; Wed, 12 Mar 2014 15:50:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNpAK-0007x9-W3 for submit@debbugs.gnu.org; Wed, 12 Mar 2014 15:50:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNpAK-0007r4-SU for submit@debbugs.gnu.org; Wed, 12 Mar 2014 15:50:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNow3-0002qu-7X for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 15:35:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WNovv-0003K8-K2 for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 15:35:27 -0400 Received: from mail.hostpark.net ([212.243.197.30]:49987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WNovv-0003Jr-5k for bug-gnu-emacs@gnu.org; Wed, 12 Mar 2014 15:35:19 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 2735617312 for ; Wed, 12 Mar 2014 20:35:17 +0100 (CET) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id aNHDiV8FoN6F for ; Wed, 12 Mar 2014 20:35:17 +0100 (CET) Received: from lem (77-58-212-245.dclient.hispeed.ch [77.58.212.245]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPS id F35AF17156 for ; Wed, 12 Mar 2014 20:35:16 +0100 (CET) User-agent: mu4e 0.9.9.5; emacs 24.3.50.1 From: Jonas Bernoulli To: bug-gnu-emacs@gnu.org Subject: setup ido keymaps only once Date: Wed, 12 Mar 2014 20:35:16 +0100 Message-ID: <877g7zfbwr.fsf@bernoul.li> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Currently the ido keymaps are hard to modify because they are recreated every time `ido-completing-read' is used. This forces users to add a function to `ido-minibuffer-setup' and do their `define-key's there. I believe it is safe for the "base" ido keymaps to set the value when the variable is defined, instead of delaying this until ido is actually used, and then redoing that work whenever `ido-completing-read' is called. These are the keymaps which are currently set in `ido-init-completion-maps': ido-common-completion-map ido-file-completion-map ido-file-dir-completion-map ido-buffer-completion-map `ido-completion-map' is different, it's a kind of "current-local-map". Its value is set in `ido-setup-completion-map' by creating a new sparse keymap, setting its parent to one of the above keymaps (depending on what is currently being completed) and then possibly making some adjustments depending on `ido-context-switch-command' and `viper-mode'. `ido-setup-completion-map' is called every time `ido-read-internal' is called, i.e. every time the user actually uses ido completion. Therefor `ido-completion-map' is set every time ido completion is used and so it is safe to modify it using `ido-minibuffer-setup-hook' for just this one call. `ido-init-completion-maps' is *not* called every time ido completion is used. It is called only in `ido-common-initialization' which is called only in `ido-mode' and `ido-completion-read', but not in `ido-read-internal'. The reason why `ido-completion-read' has to do the common initialization is simple: it may be used by users and packages to complete certain things without also using ido completion for everything `ido-mode' itself supports. Besides the initialization of the keymaps the "common initialization" also includes adding functions to hooks. I am arguing that the latter should stay but that the keymaps shouldn't be recreated here and that it is backward compatible to make that change. While it is possible that some third-party code modifies one of the `ido-*-completion-map's by using `ido-minibuffer-setup', that would be a bug. Instead the "final keymap", `ido-completion-map', should be modified. Even without the proposed change modifying one of the `ido-*-completion-map's when using `ido-completing-read' with the intention of having that only affect the current invocation would actually affect later uses of ido completion because only `ido-completing-read' re-runs `ido-init-completion-maps', `ido-read-internal' does *not* do that. Therefore changes to these keymaps would remain in effect until the next time `ido-completing-read' is used, uses of `ido-read-internal' that happen in between would use the modified map. Best regards, Jonas --- diff --git a/lisp/ido.el b/lisp/ido.el index b16ab1f..b4a3b28 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -978,25 +978,96 @@ The fallback command is passed as an argument to the functions." :type 'hook :group 'ido) -;;; Internal Variables - -;; Persistent variables - -(defvar ido-completion-map nil - "Currently active keymap for Ido commands.") +;; Keymaps -(defvar ido-common-completion-map nil +(defvar ido-common-completion-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-a" 'ido-toggle-ignore) + (define-key map "\C-c" 'ido-toggle-case) + (define-key map "\C-e" 'ido-edit-input) + (define-key map "\t" 'ido-complete) + (define-key map " " 'ido-complete-space) + (define-key map "\C-j" 'ido-select-text) + (define-key map "\C-m" 'ido-exit-minibuffer) + (define-key map "\C-p" 'ido-toggle-prefix) + (define-key map "\C-r" 'ido-prev-match) + (define-key map "\C-s" 'ido-next-match) + (define-key map [?\C-.] 'ido-next-match) + (define-key map [?\C-,] 'ido-prev-match) + (define-key map "\C-t" 'ido-toggle-regexp) + (define-key map "\C-z" 'ido-undo-merge-work-directory) + (define-key map [(control ?\s)] 'ido-restrict-to-matches) + (define-key map [(meta ?\s)] 'ido-take-first-match) + (define-key map [(control ?@)] 'ido-restrict-to-matches) + (define-key map [right] 'ido-next-match) + (define-key map [left] 'ido-prev-match) + (define-key map "?" 'ido-completion-help) + ;; Magic commands. + (define-key map "\C-b" 'ido-magic-backward-char) + (define-key map "\C-f" 'ido-magic-forward-char) + (define-key map "\C-d" 'ido-magic-delete-char) + (set-keymap-parent map minibuffer-local-map) + (setq ido-common-completion-map map)) "Keymap for all Ido commands.") -(defvar ido-file-completion-map nil +(defvar ido-file-completion-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-k" 'ido-delete-file-at-head) + (define-key map "\C-o" 'ido-copy-current-word) + (define-key map "\C-w" 'ido-copy-current-file-name) + (define-key map [(meta ?l)] 'ido-toggle-literal) + (set-keymap-parent map ido-file-dir-completion-map) + (setq ido-file-completion-map map)) "Keymap for Ido file commands.") -(defvar ido-file-dir-completion-map nil +(defvar ido-file-dir-completion-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-x\C-b" 'ido-enter-switch-buffer) + (define-key map "\C-x\C-f" 'ido-fallback-command) + (define-key map "\C-x\C-d" 'ido-enter-dired) + (define-key map [down] 'ido-next-match-dir) + (define-key map [up] 'ido-prev-match-dir) + (define-key map [(meta up)] 'ido-prev-work-directory) + (define-key map [(meta down)] 'ido-next-work-directory) + (define-key map [backspace] 'ido-delete-backward-updir) + (define-key map "\d" 'ido-delete-backward-updir) + (define-key map [remap delete-backward-char] 'ido-delete-backward-updir) ; BS + (define-key map [remap backward-kill-word] 'ido-delete-backward-word-updir) ; M-DEL + + (define-key map [(control backspace)] 'ido-up-directory) + (define-key map "\C-l" 'ido-reread-directory) + (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir) + (define-key map [(meta ?b)] 'ido-push-dir) + (define-key map [(meta ?v)] 'ido-push-dir-first) + (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir) + (define-key map [(meta ?k)] 'ido-forget-work-directory) + (define-key map [(meta ?m)] 'ido-make-directory) + (define-key map [(meta ?n)] 'ido-next-work-directory) + (define-key map [(meta ?o)] 'ido-prev-work-file) + (define-key map [(meta control ?o)] 'ido-next-work-file) + (define-key map [(meta ?p)] 'ido-prev-work-directory) + (define-key map [(meta ?s)] 'ido-merge-work-directories) + (set-keymap-parent map ido-common-completion-map) + (setq ido-file-dir-completion-map map)) "Keymap for Ido file and directory commands.") -(defvar ido-buffer-completion-map nil +(defvar ido-buffer-completion-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-x\C-f" 'ido-enter-find-file) + (define-key map "\C-x\C-b" 'ido-fallback-command) + (define-key map "\C-k" 'ido-kill-buffer-at-head) + (define-key map "\C-o" 'ido-toggle-virtual-buffers) + (set-keymap-parent map ido-common-completion-map) + (setq ido-buffer-completion-map map)) "Keymap for Ido buffer commands.") +;;; Internal Variables + +;; Persistent variables + +(defvar ido-completion-map nil + "Currently active keymap for Ido commands.") + (defvar ido-file-history nil "History of files selected using `ido-find-file'.") @@ -1503,7 +1574,6 @@ Removes badly formatted data and ignored directories." (ido-save-history)) (defun ido-common-initialization () - (ido-init-completion-maps) (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) @@ -1597,90 +1667,22 @@ This function also adds a hook to the minibuffer." ;;; IDO KEYMAP -(defun ido-init-completion-maps () - "Set up the completion keymaps used by Ido." - - ;; Common map - (let ((map (make-sparse-keymap))) - (define-key map "\C-a" 'ido-toggle-ignore) - (define-key map "\C-c" 'ido-toggle-case) - (define-key map "\C-e" 'ido-edit-input) - (define-key map "\t" 'ido-complete) - (define-key map " " 'ido-complete-space) - (define-key map "\C-j" 'ido-select-text) - (define-key map "\C-m" 'ido-exit-minibuffer) - (define-key map "\C-p" 'ido-toggle-prefix) - (define-key map "\C-r" 'ido-prev-match) - (define-key map "\C-s" 'ido-next-match) - (define-key map [?\C-.] 'ido-next-match) - (define-key map [?\C-,] 'ido-prev-match) - (define-key map "\C-t" 'ido-toggle-regexp) - (define-key map "\C-z" 'ido-undo-merge-work-directory) - (define-key map [(control ?\s)] 'ido-restrict-to-matches) - (define-key map [(meta ?\s)] 'ido-take-first-match) - (define-key map [(control ?@)] 'ido-restrict-to-matches) - (define-key map [right] 'ido-next-match) - (define-key map [left] 'ido-prev-match) - (define-key map "?" 'ido-completion-help) - ;; Magic commands. - (define-key map "\C-b" 'ido-magic-backward-char) - (define-key map "\C-f" 'ido-magic-forward-char) - (define-key map "\C-d" 'ido-magic-delete-char) - (set-keymap-parent map minibuffer-local-map) - (setq ido-common-completion-map map)) - - ;; File and directory map - (let ((map (make-sparse-keymap))) - (define-key map "\C-x\C-b" 'ido-enter-switch-buffer) - (define-key map "\C-x\C-f" 'ido-fallback-command) - (define-key map "\C-x\C-d" 'ido-enter-dired) - (define-key map [down] 'ido-next-match-dir) - (define-key map [up] 'ido-prev-match-dir) - (define-key map [(meta up)] 'ido-prev-work-directory) - (define-key map [(meta down)] 'ido-next-work-directory) - (define-key map [backspace] 'ido-delete-backward-updir) - (define-key map "\d" 'ido-delete-backward-updir) - (define-key map [remap delete-backward-char] 'ido-delete-backward-updir) ; BS - (define-key map [remap backward-kill-word] 'ido-delete-backward-word-updir) ; M-DEL - - (define-key map [(control backspace)] 'ido-up-directory) - (define-key map "\C-l" 'ido-reread-directory) - (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir) - (define-key map [(meta ?b)] 'ido-push-dir) - (define-key map [(meta ?v)] 'ido-push-dir-first) - (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir) - (define-key map [(meta ?k)] 'ido-forget-work-directory) - (define-key map [(meta ?m)] 'ido-make-directory) - (define-key map [(meta ?n)] 'ido-next-work-directory) - (define-key map [(meta ?o)] 'ido-prev-work-file) - (define-key map [(meta control ?o)] 'ido-next-work-file) - (define-key map [(meta ?p)] 'ido-prev-work-directory) - (define-key map [(meta ?s)] 'ido-merge-work-directories) - (set-keymap-parent map ido-common-completion-map) - (setq ido-file-dir-completion-map map)) - ;; File only map - (let ((map (make-sparse-keymap))) - (define-key map "\C-k" 'ido-delete-file-at-head) - (define-key map "\C-o" 'ido-copy-current-word) - (define-key map "\C-w" 'ido-copy-current-file-name) - (define-key map [(meta ?l)] 'ido-toggle-literal) - (set-keymap-parent map ido-file-dir-completion-map) - (setq ido-file-completion-map map)) +(defun ido-setup-completion-map () + "Set up the keymap for Ido. - ;; Buffer map - (let ((map (make-sparse-keymap))) - (define-key map "\C-x\C-f" 'ido-enter-find-file) - (define-key map "\C-x\C-b" 'ido-fallback-command) - (define-key map "\C-k" 'ido-kill-buffer-at-head) - (define-key map "\C-o" 'ido-toggle-virtual-buffers) - (set-keymap-parent map ido-common-completion-map) - (setq ido-buffer-completion-map map))) +Create a keymap and depending on what is being completed set its +parent to one of: + `ido-common-completion-map' + `ido-file-dir-completion-map' + `ido-file-completion-map' + `ido-buffer-completion-map' -(defun ido-setup-completion-map () - "Set up the keymap for Ido." +If option `ido-context-switch-command' is non-nil or `viper-mode' +is enabled some keybindings are changed in the keymap. +Finally `ido-completion-map' is bound to the keymap." ;; generated every time so that it can inherit new functions. (let ((map (make-sparse-keymap)) (viper-p (if (boundp 'viper-mode) viper-mode))) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 12 19:36:09 2014 Received: (at 17000) by debbugs.gnu.org; 12 Mar 2014 23:36:09 +0000 Received: from localhost ([127.0.0.1]:35055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNsgz-0001Bb-AO for submit@debbugs.gnu.org; Wed, 12 Mar 2014 19:36:09 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:26308) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WNsgx-0001BR-2D for 17000@debbugs.gnu.org; Wed, 12 Mar 2014 19:36:07 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFMCppy/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="51546108" Received: from 76-10-154-114.dsl.teksavvy.com (HELO ceviche.home) ([76.10.154.114]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Mar 2014 19:36:06 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 6354766090; Wed, 12 Mar 2014 19:36:06 -0400 (EDT) From: Stefan Monnier To: Jonas Bernoulli Subject: Re: bug#17000: setup ido keymaps only once Message-ID: References: <877g7zfbwr.fsf@bernoul.li> Date: Wed, 12 Mar 2014 19:36:06 -0400 In-Reply-To: <877g7zfbwr.fsf@bernoul.li> (Jonas Bernoulli's message of "Wed, 12 Mar 2014 20:35:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 17000 Cc: 17000@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Currently the ido keymaps are hard to modify because they are recreated > every time `ido-completing-read' is used. Indeed, this is wrong. > I believe it is safe for the "base" ido keymaps to set the value when > the variable is defined, instead of delaying this until ido is actually > used, and then redoing that work whenever `ido-completing-read' is > called. Agreed. > -(defvar ido-common-completion-map nil > +(defvar ido-common-completion-map > + (let ((map (make-sparse-keymap))) [...] > + (set-keymap-parent map minibuffer-local-map) > + (setq ido-common-completion-map map)) This last line should just be "map)". Same for the other maps. Looks good. Please apply after the trunk re-opens. Stefan "Beware: I don't use IDO and don't know its code" From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 13 11:35:22 2014 Received: (at 17000) by debbugs.gnu.org; 13 Mar 2014 15:35:22 +0000 Received: from localhost ([127.0.0.1]:36010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO7fG-0000f5-6K for submit@debbugs.gnu.org; Thu, 13 Mar 2014 11:35:22 -0400 Received: from mail.hostpark.net ([212.243.197.30]:49935) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO7fB-0000et-IF for 17000@debbugs.gnu.org; Thu, 13 Mar 2014 11:35:18 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 14B15176D3; Thu, 13 Mar 2014 16:35:16 +0100 (CET) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id B16JT6-WICo6; Thu, 13 Mar 2014 16:35:15 +0100 (CET) Received: from lem (77-58-212-245.dclient.hispeed.ch [77.58.212.245]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPS id DCC13174E1; Thu, 13 Mar 2014 16:35:15 +0100 (CET) References: <877g7zfbwr.fsf@bernoul.li> User-agent: mu4e 0.9.9.5; emacs 24.3.50.1 From: Jonas Bernoulli To: Stefan Monnier Subject: Re: bug#17000: setup ido keymaps only once In-reply-to: Date: Thu, 13 Mar 2014 16:35:15 +0100 Message-ID: <87wqfyun64.fsf@bernoul.li> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17000 Cc: 17000@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > This last line should just be "map)". Same for the other maps. > Looks good. Please apply after the trunk re-opens. Once the trunk re-opens I will submit a new patch with this fixed and which includes the necessary changelog entry. > Stefan "Beware: I don't use IDO and don't know its code" Jonas "Who was bothered by this so much he didn't use IDO until now" :-) From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 18:39:42 2014 Received: (at 17000) by debbugs.gnu.org; 8 Dec 2014 23:39:42 +0000 Received: from localhost ([127.0.0.1]:58255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy7u1-0005HJ-J1 for submit@debbugs.gnu.org; Mon, 08 Dec 2014 18:39:41 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:45747) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy7tw-0005H8-EN for 17000@debbugs.gnu.org; Mon, 08 Dec 2014 18:39:37 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xy7tc-0000KW-3J; Tue, 09 Dec 2014 00:39:16 +0100 From: Lars Magne Ingebrigtsen To: Jonas Bernoulli Subject: Re: bug#17000: setup ido keymaps only once References: <877g7zfbwr.fsf@bernoul.li> <87wqfyun64.fsf@bernoul.li> X-Now-Playing: Telebossa's _Telebossa_: "Amoroso" X-Hashcash: 1:23:141208:monnier@iro.umontreal.ca::1p8R97qGo9ESqgaN:00000000000000000000000000000000000001fY9 X-Hashcash: 1:23:141208:17000@debbugs.gnu.org::LDzP1ApGnCs6uv5e:00000000000000000000000000000000000000002P+l X-Hashcash: 1:23:141208:jonas@bernoul.li::0QHBDA3JLvX/1YAo:0f1Oz Date: Tue, 09 Dec 2014 00:39:15 +0100 In-Reply-To: <87wqfyun64.fsf@bernoul.li> (Jonas Bernoulli's message of "Thu, 13 Mar 2014 16:35:15 +0100") Message-ID: User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1Xy7tc-0000KW-3J X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1418686756.32394@/FgrfSub33OFMHa2hREK3g X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17000 Cc: 17000@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Jonas Bernoulli writes: >> This last line should just be "map)". Same for the other maps. >> Looks good. Please apply after the trunk re-opens. > > Once the trunk re-opens I will submit a new patch with this fixed > and which includes the necessary changelog entry. > >> Stefan "Beware: I don't use IDO and don't know its code" > > Jonas "Who was bothered by this so much he didn't use IDO until now" :-) The trunk is open now if you have an updated version of this patch... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 10 04:17:52 2014 Received: (at 17000) by debbugs.gnu.org; 10 Dec 2014 09:17:52 +0000 Received: from localhost ([127.0.0.1]:60245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XydP2-0001GU-SY for submit@debbugs.gnu.org; Wed, 10 Dec 2014 04:17:52 -0500 Received: from mail.hostpark.net ([212.243.197.30]:49196) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XydOx-0001GE-HX for 17000@debbugs.gnu.org; Wed, 10 Dec 2014 04:17:47 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 20D4E17AE7; Wed, 10 Dec 2014 10:17:42 +0100 (CET) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id 1rgKPJj0G3KE; Wed, 10 Dec 2014 10:17:42 +0100 (CET) Received: from lem (80-218-85-1.dclient.hispeed.ch [80.218.85.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPS id E56F117AFC; Wed, 10 Dec 2014 10:17:41 +0100 (CET) References: <877g7zfbwr.fsf@bernoul.li> <87wqfyun64.fsf@bernoul.li> From: Jonas Bernoulli To: Lars Magne Ingebrigtsen Subject: Re: bug#17000: setup ido keymaps only once In-reply-to: Date: Wed, 10 Dec 2014 10:15:08 +0100 Message-ID: <87388nc1cz.fsf@bernoul.li> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17000 Cc: 17000@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Lars Magne Ingebrigtsen writes: > Jonas Bernoulli writes: > >>> This last line should just be "map)". Same for the other maps. >>> Looks good. Please apply after the trunk re-opens. >> >> Once the trunk re-opens I will submit a new patch with this fixed >> and which includes the necessary changelog entry. >> >>> Stefan "Beware: I don't use IDO and don't know its code" >> >> Jonas "Who was bothered by this so much he didn't use IDO until now" :-) > > The trunk is open now if you have an updated version of this patch... Yes I know, thanks. This is fairly high up on my todo list. I'll test a bit and then post a new version. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 22 13:56:36 2014 Received: (at 17000) by debbugs.gnu.org; 22 Dec 2014 18:56:36 +0000 Received: from localhost ([127.0.0.1]:55137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y389j-0000xt-Fu for submit@debbugs.gnu.org; Mon, 22 Dec 2014 13:56:36 -0500 Received: from mail.hostpark.net ([212.243.197.30]:51900) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y389f-0000xd-NR for 17000@debbugs.gnu.org; Mon, 22 Dec 2014 13:56:33 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id F36C416F24; Mon, 22 Dec 2014 19:56:28 +0100 (CET) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id omfvCTPEC1-v; Mon, 22 Dec 2014 19:56:28 +0100 (CET) Received: from lem (80-218-85-1.dclient.hispeed.ch [80.218.85.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id A9D8B16F3A; Mon, 22 Dec 2014 19:56:28 +0100 (CET) References: <877g7zfbwr.fsf@bernoul.li> <87wqfyun64.fsf@bernoul.li> From: Jonas Bernoulli To: Stefan Monnier Subject: Re: bug#17000: setup ido keymaps only once In-reply-to: <87wqfyun64.fsf@bernoul.li> Date: Mon, 22 Dec 2014 19:53:40 +0100 Message-ID: <87k31jcy8b.fsf@bernoul.li> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17000 Cc: 17000@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain > Once the trunk re-opens I will submit a new patch with this fixed > and which includes the necessary changelog entry. Here we go. I hope I got the metadata mostly right. I have used this, along with various third-party ido extensions, for a while now (with 24.4 though) and without any problems. Best regards, Jonas --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Define-ido-keymaps-when-the-variables-are-defined.patch >From a4111f92676c87a179f9ec21782c6939537a564b Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Mon, 22 Dec 2014 19:45:46 +0100 Subject: [PATCH] Define ido keymaps when the variables are defined. Instead of redefining the ido keymaps using `ido-init-completxion-maps' every time `ido-completing-read' is used, set them up once in the respective `defvar' forms. The actual keymap used during completion is still a keymap which has one of the ido keymaps as parent, so it is possible to modify bindings without that affecting future invocations. Fixes: debbugs:17000 * lisp/ido: define keymaps once (ido-common-completion-map, ido-file-dir-completion-map) (ido-file-completion-map, ido-buffer-completion-map): Setup key bindings when variable is defined. (ido-completion-map): Move definition. (ido-init-completion-maps): Noop. (ido-common-initialization): Don't call it. (ido-setup-completion-map): Improve doc-string, cleanup. --- lisp/ChangeLog | 11 +++ lisp/ido.el | 222 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 123 insertions(+), 110 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8bb1c8..32884eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2014-12-22 Jonas Bernoulli + + * lisp/ido: define keymaps once (bug#17000) + (ido-common-completion-map, ido-file-dir-completion-map) + (ido-file-completion-map, ido-buffer-completion-map): Setup key bindings + when variable is defined. + (ido-completion-map): Move definition. + (ido-init-completion-maps): Noop. + (ido-common-initialization): Don't call it. + (ido-setup-completion-map): Improve doc-string, cleanup. + 2014-12-22 Stefan Monnier * completion.el: Use post-self-insert-hook (bug#19400). diff --git a/lisp/ido.el b/lisp/ido.el index 5f7637c..c8f0338 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -324,7 +324,8 @@ (defvar recentf-list) ;;; User Variables -;; +;;;; Options + ;; These are some things you might want to change. (defun ido-fractionp (n) @@ -978,25 +979,92 @@ (defcustom ido-before-fallback-functions '() :type 'hook :group 'ido) -;;; Internal Variables - -;; Persistent variables - -(defvar ido-completion-map nil - "Currently active keymap for Ido commands.") +;;;; Keymaps -(defvar ido-common-completion-map nil +(defvar ido-common-completion-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-map) + (define-key map "\C-a" 'ido-toggle-ignore) + (define-key map "\C-c" 'ido-toggle-case) + (define-key map "\C-e" 'ido-edit-input) + (define-key map "\t" 'ido-complete) + (define-key map " " 'ido-complete-space) + (define-key map "\C-j" 'ido-select-text) + (define-key map "\C-m" 'ido-exit-minibuffer) + (define-key map "\C-p" 'ido-toggle-prefix) + (define-key map "\C-r" 'ido-prev-match) + (define-key map "\C-s" 'ido-next-match) + (define-key map [?\C-.] 'ido-next-match) + (define-key map [?\C-,] 'ido-prev-match) + (define-key map "\C-t" 'ido-toggle-regexp) + (define-key map "\C-z" 'ido-undo-merge-work-directory) + (define-key map [(control ?\s)] 'ido-restrict-to-matches) + (define-key map [(meta ?\s)] 'ido-take-first-match) + (define-key map [(control ?@)] 'ido-restrict-to-matches) + (define-key map [right] 'ido-next-match) + (define-key map [left] 'ido-prev-match) + (define-key map "?" 'ido-completion-help) + (define-key map "\C-b" 'ido-magic-backward-char) + (define-key map "\C-f" 'ido-magic-forward-char) + (define-key map "\C-d" 'ido-magic-delete-char) + map) "Keymap for all Ido commands.") -(defvar ido-file-completion-map nil - "Keymap for Ido file commands.") - -(defvar ido-file-dir-completion-map nil +(defvar ido-file-dir-completion-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map ido-common-completion-map) + (define-key map "\C-x\C-b" 'ido-enter-switch-buffer) + (define-key map "\C-x\C-f" 'ido-fallback-command) + (define-key map "\C-x\C-d" 'ido-enter-dired) + (define-key map [down] 'ido-next-match-dir) + (define-key map [up] 'ido-prev-match-dir) + (define-key map [(meta up)] 'ido-prev-work-directory) + (define-key map [(meta down)] 'ido-next-work-directory) + (define-key map [backspace] 'ido-delete-backward-updir) + (define-key map "\d" 'ido-delete-backward-updir) + (define-key map [remap delete-backward-char] 'ido-delete-backward-updir) ; BS + (define-key map [remap backward-kill-word] 'ido-delete-backward-word-updir) ; M-DEL + (define-key map [(control backspace)] 'ido-up-directory) + (define-key map "\C-l" 'ido-reread-directory) + (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir) + (define-key map [(meta ?b)] 'ido-push-dir) + (define-key map [(meta ?v)] 'ido-push-dir-first) + (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir) + (define-key map [(meta ?k)] 'ido-forget-work-directory) + (define-key map [(meta ?m)] 'ido-make-directory) + (define-key map [(meta ?n)] 'ido-next-work-directory) + (define-key map [(meta ?o)] 'ido-prev-work-file) + (define-key map [(meta control ?o)] 'ido-next-work-file) + (define-key map [(meta ?p)] 'ido-prev-work-directory) + (define-key map [(meta ?s)] 'ido-merge-work-directories) + map) "Keymap for Ido file and directory commands.") -(defvar ido-buffer-completion-map nil +(defvar ido-file-completion-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map ido-file-dir-completion-map) + (define-key map "\C-k" 'ido-delete-file-at-head) + (define-key map "\C-o" 'ido-copy-current-word) + (define-key map "\C-w" 'ido-copy-current-file-name) + (define-key map [(meta ?l)] 'ido-toggle-literal) + map) + "Keymap for Ido file commands.") + +(defvar ido-buffer-completion-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map ido-common-completion-map) + (define-key map "\C-x\C-f" 'ido-enter-find-file) + (define-key map "\C-x\C-b" 'ido-fallback-command) + (define-key map "\C-k" 'ido-kill-buffer-at-head) + (define-key map [?\C-\S-b] 'ido-bury-buffer-at-head) + (define-key map "\C-o" 'ido-toggle-virtual-buffers) + map) "Keymap for Ido buffer commands.") +;;; Internal Variables + +;;;; Persistent variables + (defvar ido-file-history nil "History of files selected using `ido-find-file'.") @@ -1027,7 +1095,10 @@ (defvar ido-ignore-item-temp-list nil Intended to be let-bound by functions which call Ido repeatedly. Should never be set permanently.") -;; Temporary storage +;;;; Temporary storage + +(defvar ido-completion-map nil + "Currently active keymap for Ido commands.") (defvar ido-eoinput 1 "Point where minibuffer input ends and completion info begins. @@ -1086,13 +1157,14 @@ (defvar ido-virtual-buffers nil This is a copy of `recentf-list', pared down and with faces applied. Only used if `ido-use-virtual-buffers' is non-nil.") -;;; Variables with dynamic bindings. -;;; Declared here to keep the byte compiler quiet. +;;;; Variables with dynamic bindings. + +;; These are declared here to keep the byte compiler quiet. ;; Stores the current ido item type ('file, 'dir, 'buffer, or 'list). (defvar ido-cur-item) -;;; Stores the current default item +;; Stores the current default item (defvar ido-default-item) ;; Stores the current list of items that will be searched through. @@ -1502,7 +1574,6 @@ (defun ido-kill-emacs-hook () (ido-save-history)) (defun ido-common-initialization () - (ido-init-completion-maps) (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) @@ -1596,120 +1667,51 @@ (defun ido-mode (&optional arg) ;;; IDO KEYMAP -(defun ido-init-completion-maps () - "Set up the completion keymaps used by Ido." - - ;; Common map - (let ((map (make-sparse-keymap))) - (define-key map "\C-a" 'ido-toggle-ignore) - (define-key map "\C-c" 'ido-toggle-case) - (define-key map "\C-e" 'ido-edit-input) - (define-key map "\t" 'ido-complete) - (define-key map " " 'ido-complete-space) - (define-key map "\C-j" 'ido-select-text) - (define-key map "\C-m" 'ido-exit-minibuffer) - (define-key map "\C-p" 'ido-toggle-prefix) - (define-key map "\C-r" 'ido-prev-match) - (define-key map "\C-s" 'ido-next-match) - (define-key map [?\C-.] 'ido-next-match) - (define-key map [?\C-,] 'ido-prev-match) - (define-key map "\C-t" 'ido-toggle-regexp) - (define-key map "\C-z" 'ido-undo-merge-work-directory) - (define-key map [(control ?\s)] 'ido-restrict-to-matches) - (define-key map [(meta ?\s)] 'ido-take-first-match) - (define-key map [(control ?@)] 'ido-restrict-to-matches) - (define-key map [right] 'ido-next-match) - (define-key map [left] 'ido-prev-match) - (define-key map "?" 'ido-completion-help) - ;; Magic commands. - (define-key map "\C-b" 'ido-magic-backward-char) - (define-key map "\C-f" 'ido-magic-forward-char) - (define-key map "\C-d" 'ido-magic-delete-char) - (set-keymap-parent map minibuffer-local-map) - (setq ido-common-completion-map map)) - ;; File and directory map - (let ((map (make-sparse-keymap))) - (define-key map "\C-x\C-b" 'ido-enter-switch-buffer) - (define-key map "\C-x\C-f" 'ido-fallback-command) - (define-key map "\C-x\C-d" 'ido-enter-dired) - (define-key map [down] 'ido-next-match-dir) - (define-key map [up] 'ido-prev-match-dir) - (define-key map [(meta up)] 'ido-prev-work-directory) - (define-key map [(meta down)] 'ido-next-work-directory) - (define-key map [backspace] 'ido-delete-backward-updir) - (define-key map "\d" 'ido-delete-backward-updir) - (define-key map [remap delete-backward-char] 'ido-delete-backward-updir) ; BS - (define-key map [remap backward-kill-word] 'ido-delete-backward-word-updir) ; M-DEL +(defalias 'ido-init-completion-maps 'ignore "") +(make-obsolete 'ido-init-completion-maps "it does nothing." "25.1") - (define-key map [(control backspace)] 'ido-up-directory) - (define-key map "\C-l" 'ido-reread-directory) - (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir) - (define-key map [(meta ?b)] 'ido-push-dir) - (define-key map [(meta ?v)] 'ido-push-dir-first) - (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir) - (define-key map [(meta ?k)] 'ido-forget-work-directory) - (define-key map [(meta ?m)] 'ido-make-directory) - (define-key map [(meta ?n)] 'ido-next-work-directory) - (define-key map [(meta ?o)] 'ido-prev-work-file) - (define-key map [(meta control ?o)] 'ido-next-work-file) - (define-key map [(meta ?p)] 'ido-prev-work-directory) - (define-key map [(meta ?s)] 'ido-merge-work-directories) - (set-keymap-parent map ido-common-completion-map) - (setq ido-file-dir-completion-map map)) - - ;; File only map - (let ((map (make-sparse-keymap))) - (define-key map "\C-k" 'ido-delete-file-at-head) - (define-key map "\C-o" 'ido-copy-current-word) - (define-key map "\C-w" 'ido-copy-current-file-name) - (define-key map [(meta ?l)] 'ido-toggle-literal) - (set-keymap-parent map ido-file-dir-completion-map) - (setq ido-file-completion-map map)) +(defun ido-setup-completion-map () + "Set up the completion keymap used by Ido. - ;; Buffer map - (let ((map (make-sparse-keymap))) - (define-key map "\C-x\C-f" 'ido-enter-find-file) - (define-key map "\C-x\C-b" 'ido-fallback-command) - (define-key map "\C-k" 'ido-kill-buffer-at-head) - (define-key map [?\C-\S-b] 'ido-bury-buffer-at-head) - (define-key map "\C-o" 'ido-toggle-virtual-buffers) - (set-keymap-parent map ido-common-completion-map) - (setq ido-buffer-completion-map map))) +Create a keymap, bind `ido-completion-map' to it, and depending +on what is being completed (`ido-cur-item') set its parent keymap +to one of: + `ido-common-completion-map' + `ido-file-dir-completion-map' + `ido-file-completion-map' + `ido-buffer-completion-map' -(defun ido-setup-completion-map () - "Set up the keymap for Ido." - +If option `ido-context-switch-command' is non-nil or `viper-mode' +is enabled then some keybindings are changed in the keymap." ;; generated every time so that it can inherit new functions. (let ((map (make-sparse-keymap)) (viper-p (if (boundp 'viper-mode) viper-mode))) - (when viper-p (define-key map [remap viper-intercept-ESC-key] 'ignore)) - - (cond - ((memq ido-cur-item '(file dir)) + (pcase ido-cur-item + ((or `file `dir) (when ido-context-switch-command (define-key map "\C-x\C-b" ido-context-switch-command) (define-key map "\C-x\C-d" 'ignore)) (when viper-p - (define-key map [remap viper-backward-char] 'ido-delete-backward-updir) - (define-key map [remap viper-del-backward-char-in-insert] 'ido-delete-backward-updir) - (define-key map [remap viper-delete-backward-word] 'ido-delete-backward-word-updir)) + (define-key map [remap viper-backward-char] + 'ido-delete-backward-updir) + (define-key map [remap viper-del-backward-char-in-insert] + 'ido-delete-backward-updir) + (define-key map [remap viper-delete-backward-word] + 'ido-delete-backward-word-updir)) (set-keymap-parent map (if (eq ido-cur-item 'file) ido-file-completion-map ido-file-dir-completion-map))) - - ((eq ido-cur-item 'buffer) + (`buffer (when ido-context-switch-command (define-key map "\C-x\C-f" ido-context-switch-command)) (set-keymap-parent map ido-buffer-completion-map)) - - (t + (_ (set-keymap-parent map ido-common-completion-map))) - (setq ido-completion-map map))) (defun ido-final-slash (dir &optional fix-it) -- 2.1.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 22 21:08:03 2014 Received: (at 17000) by debbugs.gnu.org; 23 Dec 2014 02:08:03 +0000 Received: from localhost ([127.0.0.1]:55401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3EtH-0006VV-3E for submit@debbugs.gnu.org; Mon, 22 Dec 2014 21:08:03 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:50344) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3EtE-0006V6-UM for 17000@debbugs.gnu.org; Mon, 22 Dec 2014 21:08:01 -0500 Received: by mail-pa0-f49.google.com with SMTP id eu11so6946174pac.22 for <17000@debbugs.gnu.org>; Mon, 22 Dec 2014 18:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=NVFwwnPSY3PuYzsmOfvI/p2NNIlzuBuWiDaUBVp9++4=; b=Qljicuh3fAMteerXUJKdlFvI+UroyDACrr8j9KdYu1jlLIp/70Rxvz3o9fdZD86hS3 TCwi+90+v65tzR8gXjK+E48qeyn/w4lT/ZzsW5JonUXaD1YyLxCun+H46YPUd+Bs8npP KjMznYF0ExNwChzMeeEYw1D7pzhwsekgtx29rgBa/PGLNTftLMiWQSep6FvYviMJZcld H3df/bW+Bls7bJ5Ehm7PCLwNyKyvsKZfv5o/yqDFhRAVJnpgUEDhBN2D0hwIeR4YolFF 7ICpws/1K7HlsXlXdWbooSy3PuRAi5T8Jlqifia+7QJhAs81fxPQrcHaO8ZYN6pC9oSr oPWw== X-Received: by 10.66.251.167 with SMTP id zl7mr40196539pac.140.1419300480203; Mon, 22 Dec 2014 18:08:00 -0800 (PST) Received: from Shidais-iMac.local ([128.199.230.246]) by mx.google.com with ESMTPSA id r1sm18299594pdp.83.2014.12.22.18.07.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Dec 2014 18:07:59 -0800 (PST) From: Leo Liu To: Stefan Monnier Subject: Re: bug#17000: setup ido keymaps only once References: <877g7zfbwr.fsf@bernoul.li> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Tue, 23 Dec 2014 10:07:53 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 12 Mar 2014 19:36:06 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (OS X 10.10.1) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17000 Cc: 17000@debbugs.gnu.org, Jonas Bernoulli X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-03-13 07:36 +0800, Stefan Monnier wrote: > Indeed, this is wrong. Ido's author is not an idiot and AFAIK he is responsive to questions on ido. So maybe ask him first for why it was designed that way ;) Leo From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 24 12:11:49 2014 Received: (at 17000) by debbugs.gnu.org; 24 Dec 2014 17:11:49 +0000 Received: from localhost ([127.0.0.1]:56716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3pTR-00056a-1i for submit@debbugs.gnu.org; Wed, 24 Dec 2014 12:11:49 -0500 Received: from mail-wg0-f44.google.com ([74.125.82.44]:64635) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3pTO-00056P-Lf for 17000@debbugs.gnu.org; Wed, 24 Dec 2014 12:11:47 -0500 Received: by mail-wg0-f44.google.com with SMTP id b13so11689611wgh.3 for <17000@debbugs.gnu.org>; Wed, 24 Dec 2014 09:11:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=hGJeNHKSgYRFF3tDmLSqq7qjX6jrdMP4WAdEuMaBWtg=; b=ICizRSF4cFYYliEHVtfcKuu8bntAKRJhqk4Sy5uK7k/AqeSSBAGodQsFzifgMFhMKi gKnCE5u2k1ks1QAZnp2hRL29La+JGVXEhL54/PHIv5xx1RjgVn1TIDCnOpcfGnNF+Ze+ Nd1d6qfpc22nzpNTcZD9QbYcFoEu3Da3vkd53lGI84UPNjevZqInVOqeSnDtr+APmnm3 i7rRVeHP6R3L7kwYQ/7ueVRkAMKzfPhAZEZzVDMNEwRk4PwrQylGJNyjtSpkVbpP2/pQ 3yvPnhm7VHvp5UH7wTafusktBhjNgNmqXPafQQ7BP+DByiFVEc+glypjXstpXwtfnKZF g9OQ== X-Received: by 10.180.206.165 with SMTP id lp5mr53438086wic.83.1419441105844; Wed, 24 Dec 2014 09:11:45 -0800 (PST) Received: from [192.168.0.185] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by mx.google.com with ESMTPSA id hl1sm6405845wjc.18.2014.12.24.09.11.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Dec 2014 09:11:45 -0800 (PST) Message-ID: <549AF3CF.6070503@yandex.ru> Date: Wed, 24 Dec 2014 19:11:43 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0 MIME-Version: 1.0 To: Leo Liu , Stefan Monnier Subject: Re: bug#17000: setup ido keymaps only once References: <877g7zfbwr.fsf@bernoul.li> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17000 Cc: 17000@debbugs.gnu.org, Jonas Bernoulli , "Kim F. Storm" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 12/23/2014 04:07 AM, Leo Liu wrote: > Ido's author is not an idiot and AFAIK he is responsive to questions on > ido. So maybe ask him first for why it was designed that way ;) Kim, any particular reason it was written this way? From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 25 17:45:08 2014 Received: (at 17000) by debbugs.gnu.org; 25 Dec 2014 22:45:08 +0000 Received: from localhost ([127.0.0.1]:57560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4H9X-0002wm-7v for submit@debbugs.gnu.org; Thu, 25 Dec 2014 17:45:07 -0500 Received: from ispc3.dotserv.com ([178.20.216.13]:60847) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4H9V-0002wd-6S for 17000@debbugs.gnu.org; Thu, 25 Dec 2014 17:45:05 -0500 Received: from localhost (localhost [127.0.0.1]) by ispc3.dotserv.com (Postfix) with ESMTP id 93A9B8025C109; Thu, 25 Dec 2014 23:45:03 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ispc3.dotserv.com Received: from ispc3.dotserv.com ([127.0.0.1]) by localhost (ispc3.dotserv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GkmZ05WJkxjl; Thu, 25 Dec 2014 23:44:55 +0100 (CET) Received: from [192.168.0.115] (1405ds6-amb.0.fullrate.dk [90.184.76.141]) (Authenticated sender: storm@cua.dk) by ispc3.dotserv.com (Postfix) with ESMTPSA id 1CBDD8010CD69; Thu, 25 Dec 2014 23:44:55 +0100 (CET) Content-Type: multipart/alternative; boundary=Apple-Mail-89593382-1C86-42EE-BC84-F566D000E242 Mime-Version: 1.0 (1.0) Subject: Re: bug#17000: setup ido keymaps only once From: Kim Storm X-Mailer: iPad Mail (12B440) In-Reply-To: <549AF3CF.6070503@yandex.ru> Date: Thu, 25 Dec 2014 23:44:58 +0100 Content-Transfer-Encoding: 7bit Message-Id: <8F6D5BB7-BBEE-4B8D-B862-15D06C9D7400@cua.dk> References: <877g7zfbwr.fsf@bernoul.li> <549AF3CF.6070503@yandex.ru> To: Dmitry Gutov X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 17000 Cc: "17000@debbugs.gnu.org" <17000@debbugs.gnu.org>, Jonas Bernoulli , Leo Liu , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --Apple-Mail-89593382-1C86-42EE-BC84-F566D000E242 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable As far as I remember, that part of ido has grown out of code inherited from i= switchb, so I probably just didn't see a need to change something that worke= d ok for ido. Iswitchb had this comment in the keymap setup function: ;; generated every time so that it can inherit new functions. The new patches seems fine to me. Regards Kim=20 > Den 24/12/2014 kl. 18.11 skrev Dmitry Gutov : >=20 >> On 12/23/2014 04:07 AM, Leo Liu wrote: >>=20 >> Ido's author is not an idiot and AFAIK he is responsive to questions on >> ido. So maybe ask him first for why it was designed that way ;) >=20 > Kim, any particular reason it was written this way? --Apple-Mail-89593382-1C86-42EE-BC84-F566D000E242 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
As far as I remember, that part of ido= has grown out of code inherited from iswitchb, so I probably just didn't se= e a need to change something that worked ok for ido.

Iswitchb had this comment in the keymap setup function:
;; generated every time so that it can inherit new functions.=
The new patches seems fine to me.

Rega= rds Kim 

Den 24/12/2014 kl. 18.11 skrev Dmitry Gutov <= dgutov@yandex.ru>:

<= blockquote type=3D"cite">
On 12/23/2014 04:07 AM, Leo Liu wrote:

Ido's author is no= t an idiot and AFAIK he is responsive to questions on
ido. So maybe ask him first for why it was d= esigned that way ;)

Kim, any p= articular reason it was written this way?
= --Apple-Mail-89593382-1C86-42EE-BC84-F566D000E242-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 18 10:17:35 2015 Received: (at 17000) by debbugs.gnu.org; 18 Jan 2015 15:17:35 +0000 Received: from localhost ([127.0.0.1]:60702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCrbb-00024s-Gj for submit@debbugs.gnu.org; Sun, 18 Jan 2015 10:17:35 -0500 Received: from mail-qa0-f53.google.com ([209.85.216.53]:40506) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCrbY-00024b-DJ for 17000@debbugs.gnu.org; Sun, 18 Jan 2015 10:17:32 -0500 Received: by mail-qa0-f53.google.com with SMTP id n4so21116334qaq.12 for <17000@debbugs.gnu.org>; Sun, 18 Jan 2015 07:17:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=/xZ/txxnaUABkqwlE28OJ2zUl5btgiGzOjDj3/rH8Bo=; b=VjHuf4TWxjEAyP47QdupTl0AI6IsZTGUW8Z6fmoirSHfz4kWFWU+Didg6PZBqJjWwT bon3xTVZCRYvsyhBi+0P7s7N3I6tDW4Ws4fj0oVVYjpILH8wr7zggBChiBDr0LEwn9Pf reWhwWcT9UTmhtbBcRajoVA/AuZ3yo4zbNWd5SCksdlcgRI56XYwR5FdqpCka/aMreah 2cXlW1YJueeIQ7kQcBXJP5qFHAYC1O5ydScs7XQCdbS1mmSvYKI+zyVWXdPImWsfqRPH bHxa2F0eF9tWqM5CEIr3ZX3KTbQzeQknPkS0G2TO6szIR6OwyZ/kJoBlY7zO9ekXK3Un Km5Q== MIME-Version: 1.0 X-Received: by 10.140.40.70 with SMTP id w64mr29568056qgw.32.1421594247139; Sun, 18 Jan 2015 07:17:27 -0800 (PST) Received: by 10.140.18.132 with HTTP; Sun, 18 Jan 2015 07:17:27 -0800 (PST) Date: Sun, 18 Jan 2015 16:17:27 +0100 X-Google-Sender-Auth: 1mPgy9rw5gGxRUFGl5LcOyE-G1I Message-ID: Subject: Re: bug#17000: setup ido keymaps only once From: Oleh Krehel To: 17000@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17000 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hello, I have been using Jonas' patch for a week now. It's working fine. regards, Oleh From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 19 06:58:31 2015 Received: (at 17000-done) by debbugs.gnu.org; 19 Jan 2015 11:58:31 +0000 Received: from localhost ([127.0.0.1]:32798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YDAyU-0001mG-Jt for submit@debbugs.gnu.org; Mon, 19 Jan 2015 06:58:30 -0500 Received: from mail-wg0-f50.google.com ([74.125.82.50]:51617) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YDAyR-0001lD-Ux for 17000-done@debbugs.gnu.org; Mon, 19 Jan 2015 06:58:28 -0500 Received: by mail-wg0-f50.google.com with SMTP id b13so2918970wgh.9 for <17000-done@debbugs.gnu.org>; Mon, 19 Jan 2015 03:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=TS2Is4ibjUuzhph7g3RoT+D2EWwo4tWlZsu7gh237Oc=; b=edG3xM4Uoemu4UCE0kWUFkxSEJZIYBShoCwypaLbgqTjcVYU8mzZhLmPiFIJbDYe+V nkns+qn192S3jlEE/mSNzn3+jWTq62nRbZ34ScQldFOqtTBVPF3QjPAQ4K8tALWIpRKi gUNCpB7gqSdhiQh8gX1sW7zsaLIhrbe1n4FYNCqZ5jj1XiJbvqmvBwwfbmsTcR+iY21P GyeeW4PjFTu/TDs6kP+lMEoifXoEqW3vkU9oDqfAKggU4ZQMo9QDCVbGDg+C2grZxAHn 6TJ09IjrqbKKxUctiM4XFjTwpC7/Vtpi9OHWH62gRwx7tcMSxlewhb4mXfgbG8OxHY76 OypA== X-Received: by 10.194.63.51 with SMTP id d19mr57131775wjs.77.1421668701969; Mon, 19 Jan 2015 03:58:21 -0800 (PST) Received: from [192.168.1.3] ([82.102.93.54]) by mx.google.com with ESMTPSA id eu8sm13920511wib.21.2015.01.19.03.58.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jan 2015 03:58:21 -0800 (PST) Message-ID: <54BCF157.1050208@yandex.ru> Date: Mon, 19 Jan 2015 13:58:15 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0 MIME-Version: 1.0 To: Oleh Krehel , 17000-done@debbugs.gnu.org, Jonas Bernoulli Subject: Re: bug#17000: setup ido keymaps only once References: <877g7zfbwr.fsf@bernoul.li> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17000-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Version: 25.1 On 01/18/2015 05:17 PM, Oleh Krehel wrote: > I have been using Jonas' patch for a week now. > It's working fine. Thanks for checking, installed. Thanks, Jonas! From unknown Fri Jun 20 07:25:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 16 Feb 2015 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator