bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Lars Ingebrigtsen
Subject: bug#5952: 23.1.95; Some new ido features on top of virtual buffers
Date: Sun, 28 Feb 2016 16:22:56 +1030
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Leo <sdl.web@gmail.com> 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





reply via email to

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