emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: Fix IDO interaction with uniquify.el


From: Kim F. Storm
Subject: Re: PATCH: Fix IDO interaction with uniquify.el
Date: Thu, 06 May 2010 18:56:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.97 (gnu/linux)

Óscar Fuentes <address@hidden> writes:

> Stefan Monnier <address@hidden> writes:
>
>>>> * One of those annoyances was changing the "next" item on the list of
>>>>  buffers once you kill the first one, something that I find
>>>>  confusing. Right now ido may change the order of the buffers after a
>>>>  kill, but the previous second item appears as the first item on the
>>>>  new list.
>>
>> I don't understand.  So you're saying there's a problem (killing may
>> change the order) but the current code has a fix for it (at least for
>> the "first" element of the remaining list).  Right?
>
> Yes.

There is a long-standing and annoying bug in ido: 

Depending on the ido settings, buffers available, and matching items,
simply doing next or prev may change the order of the remaining items.

I'm working on a fix, but this is unrelated to the current discussion.

At least these versions seem to work better than before.

(defun ido-next-match ()
  "Put first element of `ido-matches' at the end of the list."
  (interactive)
  (if ido-matches
      (let ((next (cadr ido-matches)))
        (setq ido-cur-list (ido-chop ido-cur-list next))
        (setq ido-matches (ido-chop ido-matches next))
        (setq ido-rescan nil))))

(defun ido-prev-match ()
  "Put last element of `ido-matches' at the front of the list."
  (interactive)
  (if ido-matches
      (let ((prev (car (last ido-matches))))
        (setq ido-cur-list (ido-chop ido-cur-list prev))
        (setq ido-matches (ido-chop ido-matches prev))
        (setq ido-rescan nil))))


-- 
Kim F. Storm  http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]