Subject: bug#14148: 24.3; make ido-mode slightly more customizable

From: Steven Degutis <[email-masked]>
Date: Fri, 5 Apr 2013 10:38:17 -0500

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgment at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

In ido-mode, we can change the ido-decorations to make the completion
list appear vertically. However, This is limited for two reasons, both
of which are easy to fix. For one thing, the elements at indices 4 and 5
of ido-decorations are overloaded, and used in two places when they
really should be separated out into two different pairs of
decorations. Specifically on lines 4573/4575, this should use new
elements, at new indices 11 and 12 (for backwards compatibility), which
default to the same values as the existing elements 4 and 5. Then these
"brackets" can be customized separately (one as a newline and one not)
when displaying vertically. And only when element 11 exists should it
use 11 and 12, otherwise it should fall back to 4 and 5 for backwards
compatibility with anyone who has customized ido-decorations themselves
before this change. Finally, the inner-if on line 4563 has to be wrapped
with an (and (not (ido-show-when-sole-exact-match)) ...) with that
variable created as a defcustom above. This will prevent the sole exact
match from being hidden, which in vertical mode is confusing and seems
to indicate that there no longer remains any matches. I would add the
changelog myself but I'm woefully ignorant on how to do so. There is
already most of the work done in a patch on the devel mailing list in a
post by Stefan Monnier.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/local/Cellar/emacs/24.3/share/emacs/24.3/etc/DEBUG.

In GNU Emacs 24.3.1 (x86_64-apple-darwin12.3.0, NS apple-appkit-1187.37)
 of 2013-03-27 on Stevens-Mac-Pro.local
Windowing system distributor `Apple', version 10.3.1187
Configured using:
 `configure '--prefix=/usr/local/Cellar/emacs/24.3' '--without-dbus'
 '--enable-locallisppath=/usr/local/share/emacs/site-lisp'
 '--infodir=/usr/local/Cellar/emacs/24.3/share/info/emacs' '--with-ns'
 '--disable-ns-self-contained' 'CC=cc''

Important settings:
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  paredit-mode: t
  rainbow-delimiters-mode: t
  shell-dirtrack-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  ido-ubiquitous-mode: t
  diff-auto-refine-mode: t
  delete-selection-mode: t
  global-hl-line-mode: t
  electric-indent-mode: t
  auto-insert-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
p l l p <backspace> <backspace> <backspace> p l y d
i <backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> d i f f a p p <return> C-e
C-p C-n C-e C-n C-e C-p C-e C-p C-e C-n C-e C-n C-e
s-} C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-a M-f C-f C-M-SPC C-g M-f C-f
C-M-SPC M-w C-_ M-( a n d <return> M-q C-_ C-p C-e
( i d - <backspace> o - d <backspace> s h o w - e x
<M-backspace> <M-backspace> h i d e - e x i s t i n
g <M-backspace> <M-backspace> s h o w - e x i s t i
n g - m a t c h M-q C-{ C-_ C-_ C-n C-SPC C-n C-n C-n
C-n C-n C-n C-n C-n <tab> C-p C-p C-p C-p C-p C-p C-p
C-p C-p M-f C-f M-( n o t SPC C-e <tab> C-p C-a C-SPC
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n <tab> C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p M-f M-f M-f M-b C-b C-M-SPC M-w C-p
C-n M-f C-f C-n C-p s-{ C-p M-{ C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-n M-m s-} C-p C-n s-{
C-s C-y C-s C-s C-s C-s M-x C-g C-g C-p C-n M-x s u
b m i t C-g M-x r e p o r t - e m a <return>

Recent messages:
Loading /Users/sdegutis/.emacs.d/.mc-lists.el (source)...done
byte-code: End of buffer [7 times]
Mark set
Mark saved where search started
diff-beginning-of-file-and-junk: Can't find the beginning of the file
Mark set
Quit
Mark set
user-error: No further undo information
Mark set [3 times]
Quit [3 times]

Load-path shadows:
/Users/sdegutis/.emacs.d/elpa/magit-20130404.2040/.dir-locals hides
/usr/local/Cellar/emacs/24.3/share/emacs/24.3/lisp/gnus/.dir-locals

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils misearch multi-isearch
paredit rainbow-delimiters clojure-test-mode nrepl compile ewoc eldoc
arc-mode archive-mode etags which-func clojure-mode imenu inf-lisp tramp
tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv
gnus-util mm-util mail-prsvr password-cache tramp-loaddefs cl-macs gv
shell pcomplete comint format-spec exec-path-from-shell undo-tree diff
smex ido-ubiquitous ido magit-bisect magit-key-mode magit ansi-color
diff-mode log-edit easy-mmode ring pcvs-util add-log epa derived epg
epg-config sr-speedbar speedbar sb-image ezimage dframe autopair edmacro
kmacro keydef multiple-cursors mc-separate-operations
rectangular-region-mode mc-mark-more thingatpt mc-cycle-cursors
mc-edit-lines multiple-cursors-core rect cl delsel hl-line electric
disp-table naquadah-theme uniquify browse-kill-ring advice help-fns
cl-lib advice-preload autoinsert dired-x easymenu dired
align-cljlet-autoloads auto-dim-other-buffers-autoloads
autopair-autoloads browse-kill-ring-autoloads buffer-move-autoloads
clojure-test-mode-autoloads color-theme-sanityinc-tomorrow-autoloads
exec-path-from-shell-autoloads find-file-in-repository-autoloads
git-commit-mode-autoloads ido-ubiquitous-autoloads js2-mode-autoloads
keydef-autoloads magit-autoloads finder-inf markdown-mode-autoloads
multiple-cursors-autoloads naquadah-theme-autoloads nrepl-autoloads
clojure-mode-autoloads paredit-autoloads rainbow-delimiters-autoloads
scss-mode-autoloads smex-autoloads solarized-theme-autoloads
sr-speedbar-autoloads undo-tree-autoloads yaml-mode-autoloads package
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)