all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13602: 24.3.50; remove bindings for `icomplete-minibuffer-map' - make a separate mode
@ 2013-01-31 19:41 Drew Adams
  2013-02-04 10:27 ` Jambunathan K
                   ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Drew Adams @ 2013-01-31 19:41 UTC (permalink / raw)
  To: 13602


Icomplete mode is general, for use with all minibuffers, whatever the
kind of input being done (kind of completion or input without
completion, etc.).  It needs to be sensitive to this and not impose
itself like a brute.  There are many minibuffer keymaps, with many keys
in them.  And applications often define more keys in these maps.
 
These Icomplete keybindings are inappropriate:
 
(defvar icomplete-minibuffer-map
  (let ((map (make-sparse-keymap)))
    (define-key map [?\M-\t] 'minibuffer-force-complete)
    (define-key map [?\C-j]  'minibuffer-force-complete-and-exit)
    (define-key map [?\C-s]  'icomplete-forward-completions)
    (define-key map [?\C-r]  'icomplete-backward-completions)
    map))
 
It is not kosher to bind such keys in the minibuffer in a general mode.
Let users bind them if they like.
 
In particular: C-s and C-r are used to search minibuffer text (e.g. move
the cursor).  M-TAB is useful in the minibuffer to complete names.  And
users and applications can reasonably bind C-j to be self-inserting in
the minibuffer, just as some do for SPC.
 
`icomplete-mode-map' should not even be unconditionally imposed as part
of the local map when Icomplete mode is turned on.
 
You have made it difficult for users to get the normal, traditional
Icomplete behavior without your recent additions for cycling.
Misguided.  Please let users more easily choose whether they want that.
 
I propose that you create a separate mode for using
`icomplete-mode-map', analogous to the separation between `cua-mode' and
`cua-selection-mode'.  That is clean and simple for you to do.
 
Users turning on Icomplete mode would not get these key bindings.  Users
turning on the new Icomplet-With-Cycling mode (or whatever name you
like) would get the current behavior you have defined: Icomplete plus
your keybindings.
 
This approach would give users more contol - an easy way to get your new
cycling feature or to do without it.  If they choose to use it, they can
always change the key bindings.  Even in that case, my suggestion would
be that you pick different default bindings.  But at least with this
approach no bindings would not be imposed on regular Icomplete users.
 
(defun cua-selection-mode (arg)
  "Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings."
  (interactive "P")
  (setq-default cua-enable-cua-keys nil)
 ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
  (if (not (called-interactively-p 'any))
      (cua-mode arg)
    ;; Use call-interactive to turn a nil prefix arg into `toggle'.
    (call-interactively 'cua-mode)
    (customize-mark-as-set 'cua-enable-cua-keys)))

In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2013-01-25 on ODIEONE
Bzr revision: 111604 eliz@gnu.org-20130125143821-1ykj7ia1qjojjjnp
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'
 






^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2016-04-29 16:05 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-31 19:41 bug#13602: 24.3.50; remove bindings for `icomplete-minibuffer-map' - make a separate mode Drew Adams
2013-02-04 10:27 ` Jambunathan K
2013-02-04 16:02   ` Drew Adams
2013-02-04 16:36     ` Jambunathan K
2013-02-04 17:34       ` Drew Adams
2013-02-04 11:20 ` Dmitry Gutov
2013-02-04 16:16   ` Drew Adams
2013-02-04 22:04     ` Dmitry Gutov
2013-02-04 23:33       ` Drew Adams
2013-02-04 14:51 ` Stefan Monnier
2013-02-04 16:22   ` Drew Adams
2013-02-04 16:43     ` Jambunathan K
2013-02-04 17:40       ` Drew Adams
2013-02-05  2:35         ` Jambunathan K
2013-02-05  4:29           ` Drew Adams
2013-02-05 23:19             ` Juri Linkov
2013-02-06  3:42               ` Jambunathan K
2013-02-06 10:24                 ` Juri Linkov
2013-02-06 13:31                   ` Jambunathan K
2013-02-06 15:27                     ` Drew Adams
2013-02-06 15:42               ` Stefan Monnier
2013-02-06 15:49                 ` Drew Adams
2013-02-06 16:02                 ` Stefan Monnier
2013-02-06 23:45                   ` Juri Linkov
2013-02-07  3:51                     ` Jambunathan K
2013-02-07  7:50                       ` Juri Linkov
2013-02-07 10:24                         ` Jambunathan K
2013-02-08  7:55                           ` Juri Linkov
2013-02-08 16:55                             ` Drew Adams
2013-02-07 14:17                         ` Stefan Monnier
2013-02-07 15:45                           ` Jambunathan K
2013-02-07 16:50                             ` Stefan Monnier
2013-02-10  4:15                               ` Jambunathan K
2013-02-07 21:32                           ` Drew Adams
2013-02-08  7:59                           ` Juri Linkov
2013-02-08 15:40                             ` Stefan Monnier
2013-02-08 17:00                               ` Drew Adams
2013-02-08 17:11                                 ` Jambunathan K
2013-02-08 17:28                                   ` Drew Adams
2013-02-13 14:42                                   ` Jambunathan K
2016-04-28 22:25                                     ` Lars Ingebrigtsen
2016-04-29 16:05                                       ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.