GNU bug report logs - #5952
23.1.95; Some new ido features on top of virtual buffers

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Thu, 15 Apr 2010 10:55:01 UTC

Severity: wishlist

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 5952 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 5952 <at> debbugs.gnu.org, John Wiegley <jwiegley <at> gmail.com>
Subject: Re: bug#5952: 23.1.95; Some new ido features on top of virtual buffers
Date: Sun, 28 Feb 2016 16:22:56 +1030
Leo <sdl.web <at> 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




This bug report was last modified 9 years and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.