GNU bug report logs -
#1315
uniquify-buffer-name bug on save
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Fri, 7 Nov 2008 22:40:03 UTC
Severity: normal
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1315 in the body.
You can then email your comments to 1315 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1315
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Reuben Thomas <rrt <at> sc3d.org>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Using an Emacs snapshot from Ubuntu (package version 1:20081013-1, which
is presumably the date of the CVS snapshot).
When I save a buffer in a different directory but the same name, the path is
not re-uniquified, which means it confusingly bears parts of the old path.
--
http://rrt.sc3d.org/
sane, a. having tragedy in the heart and comedy in the head (Chesterton)
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1315
; Package
emacs
.
Full text and
rfc822 format available.
Message #8 received at 1315 <at> emacsbugs.donarmstrong.com (full text, mbox):
tags 1315 unreproducible,moreinfo
stop
Reuben Thomas wrote:
> When I save a buffer in a different directory but the same name, the path is
> not re-uniquified, which means it confusingly bears parts of the old path.
Details are lacking, and I cannot reproduce this. I did:
./src/emacs -Q -l uniquify \
--eval "(setq uniquify-buffer-name-style 'forward)" ./README ./etc/README
and I got two buffers names "etc/README" and "trunk/README".
In the latter, I did
C-x w /tmp/README
The name of the buffer changed to /tmp/README.
So please give a recipe starting from emacs -Q showing your problem.
Tags added: unreproducible, moreinfo
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Sat, 08 Nov 2008 20:40:07 GMT)
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1315
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Reuben Thomas <rrt <at> sc3d.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 1315 <at> emacsbugs.donarmstrong.com (full text, mbox):
On Sat, 8 Nov 2008, Glenn Morris wrote:
> So please give a recipe starting from emacs -Q showing your problem.
emacs -Q -l uniquify --eval "(setq uniquify-buffer-name-style 'forward)"
--eval "(setq uniquify-after-kill-buffer-p nil)" /usr/bin/run-mailcap
/usr/local/bin/run-mailcap
I then C-x w ~/run-mailcap
and the name is not changed. I presume this is because of the setting of
uniquify-after-kill-buffer-p, but I didn't kill a buffer, I saved it.
--
http://rrt.sc3d.org/ | What you don't know controls you
Tags removed: moreinfo, unreproducible
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Sun, 09 Nov 2008 04:10:03 GMT)
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1315
; Package
emacs
.
Full text and
rfc822 format available.
Message #20 received at 1315 <at> emacsbugs.donarmstrong.com (full text, mbox):
Please try this (lightly tested) patch against CVS trunk:
*** uniquify.el.~1.75.~ 2008-07-01 20:02:50.000000000 -0700
--- uniquify.el 2008-11-13 00:57:08.000000000 -0800
***************
*** 427,448 ****
;;; Hooks from the rest of Emacs
;; Buffer deletion
;; Rerationalize after a buffer is killed, to reduce coinciding buffer names.
;; This mechanism uses `kill-buffer-hook', which runs *before* deletion, so
;; it calls `uniquify-rerationalize-w/o-cb' to rerationalize the buffer list
;; ignoring the current buffer (which is going to be deleted anyway).
! (defun uniquify-maybe-rerationalize-w/o-cb ()
"Re-rationalize buffer names, ignoring current buffer.
For use on `kill-buffer-hook'."
! (if (and (cdr uniquify-managed)
! uniquify-buffer-name-style
! uniquify-after-kill-buffer-p)
! (uniquify-rerationalize-w/o-cb uniquify-managed)))
;; Ideally we'd like to add it buffer-locally, but that doesn't work
;; because kill-buffer-hook is not permanent-local :-(
! (add-hook 'kill-buffer-hook 'uniquify-maybe-rerationalize-w/o-cb)
;; The logical place to put all this code is in generate-new-buffer-name.
;; It's written in C, so we would add a generate-new-buffer-name-function
--- 427,452 ----
;;; Hooks from the rest of Emacs
+ (defun uniquify-maybe-rerationalize-w/o-cb ()
+ "Re-rationalize buffer names, ignoring current buffer."
+ (and (cdr uniquify-managed)
+ uniquify-buffer-name-style
+ (uniquify-rerationalize-w/o-cb uniquify-managed)))
+
;; Buffer deletion
;; Rerationalize after a buffer is killed, to reduce coinciding buffer names.
;; This mechanism uses `kill-buffer-hook', which runs *before* deletion, so
;; it calls `uniquify-rerationalize-w/o-cb' to rerationalize the buffer list
;; ignoring the current buffer (which is going to be deleted anyway).
! (defun uniquify-kill-buffer-function ()
"Re-rationalize buffer names, ignoring current buffer.
For use on `kill-buffer-hook'."
! (and uniquify-after-kill-buffer-p
! (uniquify-maybe-rerationalize-w/o-cb)))
;; Ideally we'd like to add it buffer-locally, but that doesn't work
;; because kill-buffer-hook is not permanent-local :-(
! (add-hook 'kill-buffer-hook 'uniquify-kill-buffer-function)
;; The logical place to put all this code is in generate-new-buffer-name.
;; It's written in C, so we would add a generate-new-buffer-name-function
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1315
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Reuben Thomas <rrt <at> sc3d.org>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #25 received at 1315 <at> emacsbugs.donarmstrong.com (full text, mbox):
On Thu, 13 Nov 2008, Glenn Morris wrote:
> Please try this (lightly tested) patch against CVS trunk:
Ace, works for me, doing the same test as before. I will copy the patched
uniquify.el into my working Emacs tree and report if I get any problems.
Thanks!
--
http://rrt.sc3d.org/ | Troy is in the Iliad, not in the sand (A. N. Wilson)
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1315
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
bojohan+news <at> dd.chalmers.se (Johan Bockgård)
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #30 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> ;; Ideally we'd like to add it buffer-locally, but that doesn't work
> ;; because kill-buffer-hook is not permanent-local :-(
It is now.
Reply sent to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Reuben Thomas <rrt <at> sc3d.org>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #35 received at 1315-done <at> emacsbugs.donarmstrong.com (full text, mbox):
2008-11-15 Glenn Morris <rgm <at> gnu.org>
* uniquify.el (uniquify-maybe-rerationalize-w/o-cb):
Remove uniquify-after-kill-buffer-p dependency.
(uniquify-kill-buffer-function): New function.
(kill-buffer-hook): Use uniquify-kill-buffer-function. (Bug#1315)
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Sun, 14 Dec 2008 15:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 191 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.