unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Leo <sdl.web@gmail.com>
Cc: 5952@debbugs.gnu.org, John Wiegley <jwiegley@gmail.com>
Subject: bug#5952: 23.1.95; Some new ido features on top of virtual buffers
Date: Sun, 28 Feb 2016 16:22:56 +1030	[thread overview]
Message-ID: <8760x9v0sn.fsf@gnus.org> (raw)
In-Reply-To: <m14ojd56ky.fsf@cam.ac.uk> (Leo's message of "Thu, 15 Apr 2010 11:54:37 +0100")

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





      parent reply	other threads:[~2016-02-28  5:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15 10:54 bug#5952: 23.1.95; Some new ido features on top of virtual buffers Leo
2013-07-06 12:58 ` Leo Liu
2016-02-28  5:52 ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760x9v0sn.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=5952@debbugs.gnu.org \
    --cc=jwiegley@gmail.com \
    --cc=sdl.web@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).