all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ido-completing-read modifies the choices argument
@ 2011-08-22 10:55 Anantha Kumaran
  2013-03-24 12:14 ` Leo Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Anantha Kumaran @ 2011-08-22 10:55 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

Hi,

When a default value is passed to ido-completing-read, it removes the
default value from the choices(argument).
I wonder whether this is a bug or desired behaviour.


(defun ido-make-choice-list (default)
  ;; Return the current list of choices.
  ;; If DEFAULT is non-nil, and corresponds to an element of choices,
  ;; it is put to the start of the list.
  (let ((ido-temp-list ido-choice-list))
    (if default
(progn
  (setq ido-temp-list
(delete default ido-temp-list))
  (setq ido-temp-list
(cons default ido-temp-list))))
    ; (run-hooks 'ido-make-choice-list-hook)
    ido-temp-list))


-- 
Anantha Kumaran(http://ananthakumaran.in)

[-- Attachment #2: Type: text/html, Size: 1280 bytes --]

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

* Re: ido-completing-read modifies the choices argument
  2011-08-22 10:55 ido-completing-read modifies the choices argument Anantha Kumaran
@ 2013-03-24 12:14 ` Leo Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Liu @ 2013-03-24 12:14 UTC (permalink / raw)
  To: Anantha Kumaran; +Cc: emacs-devel

On 2011-08-22 18:55 +0800, Anantha Kumaran wrote:
> When a default value is passed to ido-completing-read, it removes the
> default value from the choices(argument).
> I wonder whether this is a bug or desired behaviour.

This is probably due to how ido works i.e. it displays the default item
as the first item so that RET give you the default value.

Has this caused you any problem? Sorry for the late reply.

Leo



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

end of thread, other threads:[~2013-03-24 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 10:55 ido-completing-read modifies the choices argument Anantha Kumaran
2013-03-24 12:14 ` Leo Liu

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.