bug-gnu-emacs
[Top][All Lists]
Advanced

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

tar-extract erroneously reuses buffer names


From: Kevin Rodgers
Subject: tar-extract erroneously reuses buffer names
Date: Tue, 12 Jun 2001 11:52:38 -0600

If I am visiting 2 tar files in different directories with the same name (e.g.
0123DS5-CX1.tar) that both contain a file with the same name (e.g.
0123DS5-CX1.doc), then visiting the archived file in the first Tar buffer
with `f' creates a buffer name "0123DS5-CX1.doc (0123DS5-CX1.tar)".  But
visiting the archived file in the second Tar buffer switches to that same
buffer instead of creating a new buffer named "0123DS5-CX1.doc
(0123DS5-CX1.tar)<2>".

Here's a patch that fixes it:

*** emacs-20.7/lisp/tar-mode.el.orig    Sun Jun 20 13:34:13 1999
--- emacs-20.7/lisp/tar-mode.el Tue Jun 12 11:40:09 2001
***************
*** 754,763 ****
      (let* ((tar-buffer (current-buffer))
           (tar-buffer-multibyte enable-multibyte-characters)
           (tarname (file-name-nondirectory (buffer-file-name)))
!          (bufname (concat (file-name-nondirectory name)
!                           " ("
!                           tarname
!                           ")"))
           (read-only-p (or buffer-read-only view-p))
           (buffer (get-buffer bufname))
           (just-created nil))
--- 754,764 ----
      (let* ((tar-buffer (current-buffer))
           (tar-buffer-multibyte enable-multibyte-characters)
           (tarname (file-name-nondirectory (buffer-file-name)))
!          (bufname (generate-new-buffer-name
!                    (concat (file-name-nondirectory name)
!                            " ("
!                            tarname
!                            ")")))
           (read-only-p (or buffer-read-only view-p))
           (buffer (get-buffer bufname))
           (just-created nil))


-- 
Kevin Rodgers <address@hidden>          Lead Software Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A114         GO BUFFS!
Englewood CO 80112-5776 USA             1+ (303) 397-2807[voice]/705-4258[fax]



reply via email to

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