* bug#1315: uniquify-buffer-name bug on save
@ 2008-11-07 22:32 ` Reuben Thomas
2008-11-08 20:27 ` Glenn Morris
2008-11-15 22:40 ` bug#1315: marked as done (uniquify-buffer-name bug on save) Emacs bug Tracking System
0 siblings, 2 replies; 8+ messages in thread
From: Reuben Thomas @ 2008-11-07 22:32 UTC (permalink / raw)
To: bug-emacs
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)
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1315: uniquify-buffer-name bug on save
2008-11-07 22:32 ` bug#1315: uniquify-buffer-name bug on save Reuben Thomas
@ 2008-11-08 20:27 ` Glenn Morris
2008-11-08 20:40 ` Processed: " Emacs bug Tracking System
2008-11-08 22:15 ` Reuben Thomas
2008-11-15 22:40 ` bug#1315: marked as done (uniquify-buffer-name bug on save) Emacs bug Tracking System
1 sibling, 2 replies; 8+ messages in thread
From: Glenn Morris @ 2008-11-08 20:27 UTC (permalink / raw)
To: Reuben Thomas; +Cc: 1315
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Processed: Re: bug#1315: uniquify-buffer-name bug on save
2008-11-08 20:27 ` Glenn Morris
@ 2008-11-08 20:40 ` Emacs bug Tracking System
2008-11-08 22:15 ` Reuben Thomas
1 sibling, 0 replies; 8+ messages in thread
From: Emacs bug Tracking System @ 2008-11-08 20:40 UTC (permalink / raw)
To: Glenn Morris; +Cc: Emacs Bugs
Processing commands for control@emacsbugs.donarmstrong.com:
> tags 1315 unreproducible,moreinfo
bug#1315: uniquify-buffer-name bug on save
There were no tags set.
Tags added: unreproducible, moreinfo
> stop
Stopping processing here.
Please contact me if you need assistance.
Don Armstrong
(administrator, Emacs bugs database)
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1315: uniquify-buffer-name bug on save
2008-11-08 20:27 ` Glenn Morris
2008-11-08 20:40 ` Processed: " Emacs bug Tracking System
@ 2008-11-08 22:15 ` Reuben Thomas
2008-11-13 9:09 ` Glenn Morris
1 sibling, 1 reply; 8+ messages in thread
From: Reuben Thomas @ 2008-11-08 22:15 UTC (permalink / raw)
To: Glenn Morris; +Cc: 1315
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1315: uniquify-buffer-name bug on save
2008-11-08 22:15 ` Reuben Thomas
@ 2008-11-13 9:09 ` Glenn Morris
2008-11-13 22:24 ` Reuben Thomas
2008-11-13 22:35 ` Johan =?UTF-8?Q?Bockg=C3=A5rd
0 siblings, 2 replies; 8+ messages in thread
From: Glenn Morris @ 2008-11-13 9:09 UTC (permalink / raw)
To: Reuben Thomas; +Cc: 1315
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1315: uniquify-buffer-name bug on save
2008-11-13 9:09 ` Glenn Morris
@ 2008-11-13 22:24 ` Reuben Thomas
2008-11-13 22:35 ` Johan =?UTF-8?Q?Bockg=C3=A5rd
1 sibling, 0 replies; 8+ messages in thread
From: Reuben Thomas @ 2008-11-13 22:24 UTC (permalink / raw)
To: Glenn Morris; +Cc: 1315
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)
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1315: uniquify-buffer-name bug on save
2008-11-13 9:09 ` Glenn Morris
2008-11-13 22:24 ` Reuben Thomas
@ 2008-11-13 22:35 ` Johan =?UTF-8?Q?Bockg=C3=A5rd
1 sibling, 0 replies; 8+ messages in thread
From: Johan =?UTF-8?Q?Bockg=C3=A5rd @ 2008-11-13 22:35 UTC (permalink / raw)
To: bug-gnu-emacs
Glenn Morris <rgm@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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#1315: marked as done (uniquify-buffer-name bug on save)
2008-11-07 22:32 ` bug#1315: uniquify-buffer-name bug on save Reuben Thomas
2008-11-08 20:27 ` Glenn Morris
@ 2008-11-15 22:40 ` Emacs bug Tracking System
1 sibling, 0 replies; 8+ messages in thread
From: Emacs bug Tracking System @ 2008-11-15 22:40 UTC (permalink / raw)
To: Glenn Morris
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
Your message dated Sat, 15 Nov 2008 17:34:47 -0500
with message-id <l33ahsfwjc.fsf@fencepost.gnu.org>
and subject line Re: bug#1315: uniquify-buffer-name bug on save
has caused the Emacs bug report #1315,
regarding uniquify-buffer-name bug on save
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)
--
1315: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1315
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems
[-- Attachment #2: Type: message/rfc822, Size: 3430 bytes --]
From: Reuben Thomas <rrt@sc3d.org>
To: bug-emacs@gnu.org
Subject: uniquify-buffer-name bug on save
Date: Fri, 7 Nov 2008 23:32:38 +0100 (CET)
Message-ID: <alpine.DEB.2.00.0811072325180.17641@drom>
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)
[-- Attachment #3: Type: message/rfc822, Size: 1837 bytes --]
From: Glenn Morris <rgm@gnu.org>
To: 1315-done@emacsbugs.donarmstrong.com
Subject: Re: bug#1315: uniquify-buffer-name bug on save
Date: Sat, 15 Nov 2008 17:34:47 -0500
Message-ID: <l33ahsfwjc.fsf@fencepost.gnu.org>
2008-11-15 Glenn Morris <rgm@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)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-11-15 22:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <l33ahsfwjc.fsf@fencepost.gnu.org>
2008-11-07 22:32 ` bug#1315: uniquify-buffer-name bug on save Reuben Thomas
2008-11-08 20:27 ` Glenn Morris
2008-11-08 20:40 ` Processed: " Emacs bug Tracking System
2008-11-08 22:15 ` Reuben Thomas
2008-11-13 9:09 ` Glenn Morris
2008-11-13 22:24 ` Reuben Thomas
2008-11-13 22:35 ` Johan =?UTF-8?Q?Bockg=C3=A5rd
2008-11-15 22:40 ` bug#1315: marked as done (uniquify-buffer-name bug on save) Emacs bug Tracking System
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).