From xemacs-m  Mon Mar  3 10:21:24 1997
Received: from hudutilgw.ml.com (hudutilf01.ml.com [198.242.49.31])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id KAA19190
	for <xemacs-beta@xemacs.org>; Mon, 3 Mar 1997 10:21:24 -0600 (CST)
Received: from ml2.ml.com ([199.201.37.130])
	by hudutilgw.ml.com (8.8.5/8.8.5/MLgw-3.03) with ESMTP id LAA12975;
	Mon, 3 Mar 1997 11:19:21 -0500 (EST)
Received: from commpost.ml.com (commpost.ml.com [146.125.4.24]) by ml2.ml.com (8.7.5/8.7.3/MLml-2.06b) with SMTP id LAA26189; Mon, 3 Mar 1997 11:23:40 -0500 (EST)
Received: from spssunp.spspme.ml.com (spssunp.spspme.ml.com [192.168.111.13]) by commpost.ml.com (8.6.12/8.6.12) with ESMTP id LAA06172; Mon, 3 Mar 1997 11:23:15 -0500
Received: by spssunp.spspme.ml.com (SMI-8.6/SMI-4.1)
	id LAA18456; Mon, 3 Mar 1997 11:20:05 -0500
To: XEmacs Beta List <xemacs-beta@xemacs.org>
Cc: Michael Ernst <mernst@theory.lcs.mit.edu>
Subject: patch to uniquify.el
Reply-To: Colin Rafferty <craffert@ml.com>
X-Face: ByE+UMAp1klWR3?\RNGx(A-~Ri!YT%C6M!sxoJL+.;9`Q/|+dj7[KR>gGMyV.2qZeot0NI`4\MA^_Qg`F9=+Ox&zaE?Y9dV%F~Xzf';Zyk2Aobs.uu^Ey0_C6^~q';G#$HkA!ZAHXPpG-"*|Dd*Z4U$4y{{aI0c%75}i~Of(jxYtI[uIpYF<*Zoe|\*/ufb
X-Y-Zippy: I'm having a BIG BANG THEORY!!
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: multipart/mixed;
 boundary="Multipart_Mon_Mar__3_11:20:04_1997-1"
Content-Transfer-Encoding: 7bit
From: Colin Rafferty <craffert@spspme.ml.com>
Date: 03 Mar 1997 11:20:04 -0500
Message-ID: <ocrendxuevf.fsf@spssunp.spspme.ml.com>
Lines: 65
X-Mailer: Gnus v5.4.12/XEmacs 20.1

--Multipart_Mon_Mar__3_11:20:04_1997-1
Content-Type: text/plain; charset=US-ASCII

There is a basic bug in the latest uniquify package.  It is too
aggressive about finding buffers to rename.  Basically, rather than only
renaming file and directory buffers, it renames any buffer that has a
directory associated with it.  This includes shell buffers.

Unfortunately, this extention makes it want to use the same name for
both a dired buffer and a shell buffer whose pwd is the same as the
dired.

The worst part is this happens dur advice for `rename-buffer', so this
bugs out message.el when it renames a *mail* buffer after it sends it.
I imagine this would be a problem with VM as well.

My patch changes the function that gets the file name associated with a
buffer to only return it for "real" file names and for dired buffers.

I only have 20.x, but I assume that this is in 19.15 as well.


--Multipart_Mon_Mar__3_11:20:04_1997-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="patch"
Content-Transfer-Encoding: 8bit

*** lisp/utils/uniquify.el.orig	Wed Dec 18 17:43:01 1996
--- lisp/utils/uniquify.el	Mon Mar  3 11:08:14 1997
***************
*** 172,182 ****
  ;; uniquify's version of buffer-file-name
  (defun uniquify-buffer-file-name (buffer)
    "Return name of file BUFFER is visiting, or nil if none.
! Works on dired buffers as well as ordinary file-visiting buffers."
    (or (buffer-file-name buffer)
        (save-excursion
  	(set-buffer buffer)
! 	list-buffers-directory)))
  
  (defun uniquify-fix-list-filename-lessp (fixlist1 fixlist2)
    (uniquify-filename-lessp
--- 172,184 ----
  ;; uniquify's version of buffer-file-name
  (defun uniquify-buffer-file-name (buffer)
    "Return name of file BUFFER is visiting, or nil if none.
! Works on dired buffers as well as ordinary file-visiting buffers,
! but no others"
    (or (buffer-file-name buffer)
        (save-excursion
  	(set-buffer buffer)
! 	(and (eq major-mode 'dired-mode)
! 	     list-buffers-directory))))
  
  (defun uniquify-fix-list-filename-lessp (fixlist1 fixlist2)
    (uniquify-filename-lessp

--Multipart_Mon_Mar__3_11:20:04_1997-1
Content-Type: text/plain; charset=US-ASCII


-- 
Colin

--Multipart_Mon_Mar__3_11:20:04_1997-1--

