From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Modifying the Mode Line Date: Fri, 11 Mar 2005 10:58:18 -0700 Message-ID: <39e4i1F62rgt8U1@individual.net> References: <87acpbkrcw.fsf@thalassa.informatimago.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1110564279 27201 80.91.229.2 (11 Mar 2005 18:04:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2005 18:04:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 11 19:04:39 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D9oQG-0002l1-SH for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Mar 2005 18:59:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D9ofO-0003h1-Cw for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Mar 2005 13:15:18 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 61 Original-X-Trace: individual.net Awvj8V14eqB8CTfok5pkKAGQKeHWA5s1XgIa/OmG1D8tmwA2o= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <87acpbkrcw.fsf@thalassa.informatimago.com> Original-Xref: shelby.stanford.edu gnu.emacs.help:129220 Original-To: help-gnu-emacs@gnu.org 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 X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:24770 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24770 Pascal Bourguignon wrote: > John Laiosa writes: >>2.) I want to add the full path as it appears in the buffer list so I know >>what directory the file came from. > > See the variable: default-mode-line-format Which leads you to mode-line-format, which leads you to mode-line-buffer-identification: ,---- | mode-line-buffer-identification's value is shown below. | | Documentation: | Mode-line control for identifying the buffer being displayed. | Its default value is ("%12b"). | Major modes that edit things other than ordinary files may change this | (e.g. Info, Dired,...) | | Defined in `bindings'. | | Value: | (#("%12b" 0 4 | (face | (:weight bold) | help-echo "mouse-1: previous buffer, mouse-3: next buffer" local-map | (keymap | (header-line keymap | (mouse-3 . mode-line-bury-buffer) | (down-mouse-3 . ignore) | (mouse-1 . mode-line-unbury-buffer) | (down-mouse-1 . ignore)) | (mode-line keymap | (mouse-3 . mode-line-bury-buffer) | (mouse-1 . mode-line-unbury-buffer) | (down-mouse-1 . ignore)))))) `---- If you do the obvious thing (setq mode-line-buffer-identification '(buffer-file-name "%12f" "%12b")) I suspect you'll lose all those useful text properties (not to mention it's a buffer-local variable, but not documented as such). But bindings.el shows how to do it right: (setq-default mode-line-buffer-identification (list 'buffer-file-name (propertized-buffer-identification "%12f") (propertized-buffer-identification "%12b"))) Another alternative is to change the way buffers are named, to include enough parts of the directory to keep them distinct: (require 'uniquify) (setq uniquify-buffer-name-style 'forward) -- Kevin Rodgers