Gunnar Evermann <ge204(a)eng.cam.ac.uk> writes:
nbecker(a)fred.net writes:
> I don't know about the fix, but I have experienced this same bug -
> it's rather nasty.
Could you please test the fix? (remember to re-bytecompile the fle).
I tested it. Here's the recipe:
C-x C-f test.txt (test.txt is a new file)
a b c C-x C-s
C-x k RET
C-x b test.txt
M-x grep a ./test.txt RET
RET or click button2 (This should open test.txt<2> but it
moves to test.txt instead).
Fraser's fix worked fine so I'm going to apply following
patch. Fraser, thank you very much for fixing this. If you
come up with a fix next time, please submit a unified diff
with plain ChangeLog entry to xemacs-patches like this.
Thanks.
2000-10-11 Fraser Young <fyoung(a)anytimenow.com>
* compile.el (compilation-find-file): Reset buffer
when its wrong.
Index: compile.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-packages/libs/xemacs-base/compile.el,v
retrieving revision 1.16
diff -u -r1.16 compile.el
--- compile.el 2000/08/04 08:43:14 1.16
+++ compile.el 2000/10/11 05:25:02
@@ -1656,6 +1656,7 @@
(if (compare-file-to-buffer buffer filename)
(switch-to-buffer buffer)
(progn
+ (setq buffer nil) ; its the wrong buffer, so forget it
(if (file-name-absolute-p filename)
;; The file name is absolute. Use its explicit directory as
;; the first in the search path, and strip it from FILENAME.
--
Yoshiki Hayashi