[Top][All Lists]

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

Re: Customize dired buffer names

From: Juri Linkov
Subject: Re: Customize dired buffer names
Date: Sun, 17 Jan 2010 01:09:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (x86_64-pc-linux-gnu)

> 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)))

Juri Linkov

reply via email to

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