Subject: Re: bug#5952: 23.1.95; Some new ido features on top of virtual buffers

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 28 Feb 2016 16:22:56 +1030

Leo <[email-masked]> writes:

> 2. handle files with same base names by appending one level of parent
>    directory. Some files may still be ignored but the chance is much
>    slimmer.

[...]

> +(defun ido-find-duplicate-basenames (files)
> +  "Find all the duplicate base names in FILES."
> +  (let ((names (mapcar 'file-name-nondirectory files))
> +        dups head dup-p)
> +    (setq names (sort names 'string<))
> +    (while names
> +      (setq head (pop names))
> +      (while (string= head (car names))
> +        (pop names)
> +        (setq dup-p t))
> +      (when dup-p
> +        (push head dups)
> +        (setq dup-p nil)))
> +    dups))

[...]

> +  (let ((dups (ido-find-duplicate-basenames recentf-list))
> +        name dir)
>      (dolist (head recentf-list)
>        (and (setq name (file-name-nondirectory head))
>             (null (get-file-buffer head))
> +           (if (not (member name dups))
> +               t
> +             (setq dir head)
> +             (dotimes (__ 2)
> +               (setq dir (directory-file-name (file-name-directory dir))))
> +             (setq name (file-relative-name head dir)))

I don't think this is needed any more, since Emacs now creates buffers
like foo.c<trunk> instead of <1>, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no