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

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

Re: Customize dired buffer names


From: Francis Moreau
Subject: Re: Customize dired buffer names
Date: Sun, 17 Jan 2010 12:43:05 -0800 (PST)
User-agent: G2/1.0

On 17 jan, 00:09, Juri Linkov <address@hidden> wrote:
> > I'd like to change the way that the dired buffers got their names.
>
> > For now it's juste the name of the directory, but I'd like to add
> > "<Dired>" as prefix for example.
>
> > Is it possible ?
>
> I use the following snippet to name dired buffers with absolute names:
>
> (add-hook 'dired-after-readin-hook
>           (lambda ()
>             ;; Name dired buffers by absolute directory names.
>             ;; Use `generate-new-buffer-name' for vc-directory
>             ;; which creates duplicate buffers.
>             (rename-buffer (generate-new-buffer-name dired-directory))
>             ))
>
> You could use something like
>
>   (rename-buffer (concat "<Dired>" (directory-file-name dired-directory)))

Ok, I'll do that.

Thanks both for your suggestions.


reply via email to

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