From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.help Subject: Re: Customize dired buffer names Date: Sun, 17 Jan 2010 01:09:05 +0200 Organization: JURTA Message-ID: <871vhpd4vi.fsf@mail.jurta.org> References: <2dcdf560-2617-4a5f-b5f6-92584fc7c9f5@e27g2000yqd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263683408 5866 80.91.229.12 (16 Jan 2010 23:10:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Jan 2010 23:10:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 17 00:10:01 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWHmJ-0004qn-GQ for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Jan 2010 00:09:59 +0100 Original-Received: from localhost ([127.0.0.1]:44194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWHmK-0008HF-Bn for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Jan 2010 18:10:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWHlw-0008EW-Fo for help-gnu-emacs@gnu.org; Sat, 16 Jan 2010 18:09:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWHlr-00089y-Pr for help-gnu-emacs@gnu.org; Sat, 16 Jan 2010 18:09:35 -0500 Original-Received: from [199.232.76.173] (port=48546 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWHlr-00089h-Kz for help-gnu-emacs@gnu.org; Sat, 16 Jan 2010 18:09:31 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:58890) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWHlr-0005Zh-7c for help-gnu-emacs@gnu.org; Sat, 16 Jan 2010 18:09:31 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NWHln-0004gr-3B for help-gnu-emacs@gnu.org; Sun, 17 Jan 2010 00:09:27 +0100 Original-Received: from 82.131.31.29.cable.starman.ee ([82.131.31.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jan 2010 00:09:27 +0100 Original-Received: from juri by 82.131.31.29.cable.starman.ee with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jan 2010 00:09:27 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 82.131.31.29.cable.starman.ee User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (x86_64-pc-linux-gnu) Cancel-Lock: sha1:ohw8I3bABEMfclFIEtb0Obh+tIs= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71268 Archived-At: > 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 > "" 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 "" (directory-file-name dired-directory))) -- Juri Linkov http://www.jurta.org/emacs/