From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Possible to hook into Emacs's buffer name generation? Date: Fri, 18 Feb 2011 10:13:04 +0100 Message-ID: <87pqqpyacf.fsf@member.fsf.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1298020620 6264 80.91.229.12 (18 Feb 2011 09:17:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 Feb 2011 09:17:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 18 10:16:56 2011 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.69) (envelope-from ) id 1PqMSN-0007be-2a for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Feb 2011 10:16:55 +0100 Original-Received: from localhost ([127.0.0.1]:50805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqMSL-0002sA-6a for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Feb 2011 04:16:53 -0500 Original-Received: from [140.186.70.92] (port=54973 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqMQg-0002rM-Bd for help-gnu-emacs@gnu.org; Fri, 18 Feb 2011 04:15:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqMQf-0003LY-1M for help-gnu-emacs@gnu.org; Fri, 18 Feb 2011 04:15:10 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:33448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqMQe-0003LB-RO for help-gnu-emacs@gnu.org; Fri, 18 Feb 2011 04:15:08 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PqMQc-0006aE-0c for help-gnu-emacs@gnu.org; Fri, 18 Feb 2011 10:15:06 +0100 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Feb 2011 10:15:06 +0100 Original-Received: from tassilo by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Feb 2011 10:15:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:QQJ6gWCrMGR+WzAa7WCPMEPK1zE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:79204 Archived-At: Leo writes: > Maybe you can build on top of uniquify.el? I'm using that, which does the trick. (require 'uniquify) (setq uniquify-buffer-name-style 'post-forward-angle-brackets) ,----[ C-h v uniquify-buffer-name-style RET ] | uniquify-buffer-name-style is a variable defined in `uniquify.el'. | Its value is post-forward-angle-brackets | Original value was nil | | Documentation: | If non-nil, buffer names are uniquified with parts of directory name. | The value determines the buffer name style and is one of `forward', | `reverse', `post-forward', or `post-forward-angle-brackets'. | For example, files `/foo/bar/mumble/name' and `/baz/quux/mumble/name' | would have the following buffer names in the various styles: | forward bar/mumble/name quux/mumble/name | reverse name\mumble\bar name\mumble\quux | post-forward name|bar/mumble name|quux/mumble | post-forward-angle-brackets name name | nil name name<2> | Of course, the "mumble" part may be stripped as well, depending on the setting | of `uniquify-strip-common-suffix'. `---- Bye, Tassilo