* C-x 4 a ceased to work in *cvs-diff* buffer
@ 2004-06-06 10:55 Kai Grossjohann
2004-06-06 22:33 ` Richard Stallman
2004-10-10 3:33 ` Stefan
0 siblings, 2 replies; 7+ messages in thread
From: Kai Grossjohann @ 2004-06-06 10:55 UTC (permalink / raw)
I used to do `=' on a file in a *cvs* buffer, then position point on
a change in the resulting *cvs-diff* buffer, then hit C-x 4 a to
compose a ChangeLog entry.
Now this doesn't find the file anymore and asks me which file is
meant. It suggests the root directory of the working copy, instead
of the subdir that contains the file.
I first observed this behavior some weeks ago.
(I guess this bug only happens if the file is in a subdir of the
working copy.)
Kai
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-x 4 a ceased to work in *cvs-diff* buffer
2004-06-06 10:55 C-x 4 a ceased to work in *cvs-diff* buffer Kai Grossjohann
@ 2004-06-06 22:33 ` Richard Stallman
2004-10-10 3:33 ` Stefan
1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2004-06-06 22:33 UTC (permalink / raw)
Cc: emacs-devel
I used to do `=' on a file in a *cvs* buffer, then position point on
a change in the resulting *cvs-diff* buffer, then hit C-x 4 a to
compose a ChangeLog entry.
Now this doesn't find the file anymore and asks me which file is
meant. It suggests the root directory of the working copy, instead
of the subdir that contains the file.
I would guess that the recent redesign of M-x compile broke this.
Could the people involved please take a look?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-x 4 a ceased to work in *cvs-diff* buffer
2004-06-06 10:55 C-x 4 a ceased to work in *cvs-diff* buffer Kai Grossjohann
2004-06-06 22:33 ` Richard Stallman
@ 2004-10-10 3:33 ` Stefan
2004-10-10 12:07 ` Kai Grossjohann
1 sibling, 1 reply; 7+ messages in thread
From: Stefan @ 2004-10-10 3:33 UTC (permalink / raw)
Cc: emacs-devel
> I used to do `=' on a file in a *cvs* buffer, then position point on
> a change in the resulting *cvs-diff* buffer, then hit C-x 4 a to
> compose a ChangeLog entry.
> Now this doesn't find the file anymore and asks me which file is
> meant. It suggests the root directory of the working copy, instead
> of the subdir that contains the file.
> I first observed this behavior some weeks ago.
> (I guess this bug only happens if the file is in a subdir of the
> working copy.)
I can't reproduce this here. Could you give some more info?
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-x 4 a ceased to work in *cvs-diff* buffer
2004-10-10 3:33 ` Stefan
@ 2004-10-10 12:07 ` Kai Grossjohann
2004-10-10 12:20 ` Kai Grossjohann
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Kai Grossjohann @ 2004-10-10 12:07 UTC (permalink / raw)
Stefan <monnier@iro.umontreal.ca> writes:
> I can't reproduce this here. Could you give some more info?
Perhaps two hours ago I updated my working copy, and it still
happens. I proceeded as follows:
cvs update -dP
./kai.sh make
./kai.sh install
emacs -Q
M-x cvs-update RET ~/work/gnu/emacs RET
;; Hit = on the lisp/net/tramp.el line.
;; Go to the *cvs-diff* buffer/window and navigate to the + line.
C-x 4 a
;; Minibuffer shows: Use file tramp.el: ~/work/gnu/emacs/tramp.el
Here is the *cvs* buffer after M-x cvs-update RET:
Repository : kai@subversions.gnu.org:/cvsroot/emacs
Module : emacs
Working dir: ~/work/gnu/emacs/
In directory .:
Modified .cvsignore
Modified configure
Unknown foo
In directory lisp:
Modified lisp/.cvsignore
In directory lisp/emacs-lisp:
Unknown lisp/emacs-lisp/semantic.cache
In directory lisp/net:
Modified lisp/net/.cvsignore
Modified lisp/net/tramp.el
In directory lispref:
Unknown lispref/semantic.cache
In directory man:
Modified man/.cvsignore
In directory src:
Modified src/.cvsignore
--------------------- End ---------------------
-- last cmd: cvs -f diff -u -N lisp/net/tramp.el --
And here is the *cvs-diff* buffer for tramp.el:
pcl-cvs: descending directory lisp/net/
Index: tramp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.50
diff -u -r1.50 tramp.el
--- tramp.el 10 Aug 2004 20:49:45 -0000 1.50
+++ tramp.el 10 Oct 2004 11:57:11 -0000
@@ -2370,7 +2370,7 @@
(point) (progn (end-of-line) (point)))))
(equal tramp-buffer-file-attributes attr))
;; If file does not exist, say it is not modified.
- (t nil)))))))
+ (t t)))))))
(defadvice clear-visited-file-modtime (after tramp activate)
"Set `tramp-buffer-file-attributes' back to nil.
All of this was done on a FreeBSD 5.3 beta machine, though I'm now
posting from Debian GNU/Linux.
Does this provide the detail you need?
This was the first time ever I used "emacs -Q", I vaguely remember
that it is something like "emacs -q -no-site-file", only more so.
Kai
PS: You are probably wondering about my kai.sh script for building
Emacs. It is not very sophisticated, but just so that you know
what I've been doing, I'll include it here:
#!/bin/sh
what="$1"
case x$what in
x[cm]*)
make maintainer-clean
autoconf257
./configure --prefix=$HOME/sw/emacs --with-gtk
make bootstrap
;;
xi*)
rm -rf $HOME/sw/SAV.emacs
mv $HOME/sw/emacs $HOME/sw/SAV.emacs
make install tags
( cd $HOME/sw/emacs/share/emacs;
mv site-lisp site-lisp.SAV;
ln -s /usr/local/share/emacs/site-lisp )
;;
*)
echo "Usage: $0 <what>"
echo "<what> can be 'make' or 'install'"
exit 2
;;
esac
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-x 4 a ceased to work in *cvs-diff* buffer
2004-10-10 12:07 ` Kai Grossjohann
@ 2004-10-10 12:20 ` Kai Grossjohann
2004-10-10 21:45 ` Stefan
2004-10-23 20:06 ` Kai Grossjohann
2 siblings, 0 replies; 7+ messages in thread
From: Kai Grossjohann @ 2004-10-10 12:20 UTC (permalink / raw)
Kai Grossjohann <kai@emptydomain.de> writes:
> ;; Go to the *cvs-diff* buffer/window and navigate to the + line.
Perhaps it is unclear which line I meant. It is...
> And here is the *cvs-diff* buffer for tramp.el:
>
> pcl-cvs: descending directory lisp/net/
> Index: tramp.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/net/tramp.el,v
> retrieving revision 1.50
> diff -u -r1.50 tramp.el
> --- tramp.el 10 Aug 2004 20:49:45 -0000 1.50
> +++ tramp.el 10 Oct 2004 11:57:11 -0000
> @@ -2370,7 +2370,7 @@
> (point) (progn (end-of-line) (point)))))
> (equal tramp-buffer-file-attributes attr))
> ;; If file does not exist, say it is not modified.
> - (t nil)))))))
> + (t t)))))))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...this line. Point was at the beginning of the line when I hit C-x 4 a.
> (defadvice clear-visited-file-modtime (after tramp activate)
> "Set `tramp-buffer-file-attributes' back to nil.
Kai
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-x 4 a ceased to work in *cvs-diff* buffer
2004-10-10 12:07 ` Kai Grossjohann
2004-10-10 12:20 ` Kai Grossjohann
@ 2004-10-10 21:45 ` Stefan
2004-10-23 20:06 ` Kai Grossjohann
2 siblings, 0 replies; 7+ messages in thread
From: Stefan @ 2004-10-10 21:45 UTC (permalink / raw)
Cc: emacs-devel
>> I can't reproduce this here. Could you give some more info?
> Perhaps two hours ago I updated my working copy, and it still
> happens. I proceeded as follows:
[...]
> And here is the *cvs-diff* buffer for tramp.el:
> pcl-cvs: descending directory lisp/net/
> Index: tramp.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/net/tramp.el,v
> retrieving revision 1.50
> diff -u -r1.50 tramp.el
> --- tramp.el 10 Aug 2004 20:49:45 -0000 1.50
> +++ tramp.el 10 Oct 2004 11:57:11 -0000
Hmm... it seems pcl-cvs decided to run `cvs diff' in `single-dir' mode
(i.e. one invocation per directory). So presumably `cvs-execute-single-dir'
is set to t. Could you check why that is? It's probably because
`cvs-version' is not initialized to a proper value.
The other problem is that diff-mode does not take advantage of the
annotation `pcl-cvs: descending directory lisp/net/': the code is simply
missing (the annotation is currently only used by pcl-cvs itself and by
cvs-status.el).
Could you try the patch below that tweaks diff-mode to pay attention to the
pcl-cvs annotation?
Stefan
--- orig/lisp/diff-mode.el
+++ mod/lisp/diff-mode.el
@@ -1,6 +1,7 @@
;;; diff-mode.el --- a mode for viewing/editing context diffs
-;; Copyright (C) 1998,1999,2000,01,02,03,2004 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@cs.yale.edu>
;; Keywords: convenience patch diff
@@ -517,14 +518,16 @@
(list (if old (match-string 2) (match-string 4))
(if old (match-string 4) (match-string 2)))))))))
-(defun diff-find-file-name (&optional old)
+(defun diff-find-file-name (&optional old prefix)
"Return the file corresponding to the current patch.
-Non-nil OLD means that we want the old file."
+Non-nil OLD means that we want the old file.
+PREFIX is only used internally: don't use it."
(save-excursion
(unless (looking-at diff-file-header-re)
(or (ignore-errors (diff-beginning-of-file))
(re-search-forward diff-file-header-re nil t)))
(let ((fs (diff-hunk-file-names old)))
+ (if prefix (setq fs (mapcar (lambda (f) (concat prefix f)) fs)))
(or
;; use any previously used preference
(cdr (assoc fs diff-remembered-files-alist))
@@ -546,6 +549,13 @@
(and (string-match "\\.rej\\'" (or buffer-file-name ""))
(let ((file (substring buffer-file-name 0 (match-beginning 0))))
(when (file-exists-p file) file)))
+ ;; If we haven't found the file, maybe it's because we haven't paid
+ ;; attention to the PCL-CVS hint.
+ (and (not prefix)
+ (boundp 'cvs-pcl-cvs-dirchange-re)
+ (save-excursion
+ (re-search-backward cvs-pcl-cvs-dirchange-re nil t))
+ (diff-find-file-name old (match-string 1)))
;; if all else fails, ask the user
(let ((file (read-file-name (format "Use file %s: " (or (first fs) ""))
nil (first fs) t (first fs))))
@@ -1422,5 +1432,5 @@
;; use `combine-after-change-calls' to minimize the slowdown of font-lock.
;;
-;;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66
+;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66
;;; diff-mode.el ends here
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-x 4 a ceased to work in *cvs-diff* buffer
2004-10-10 12:07 ` Kai Grossjohann
2004-10-10 12:20 ` Kai Grossjohann
2004-10-10 21:45 ` Stefan
@ 2004-10-23 20:06 ` Kai Grossjohann
2 siblings, 0 replies; 7+ messages in thread
From: Kai Grossjohann @ 2004-10-23 20:06 UTC (permalink / raw)
Kai Grossjohann <kai@emptydomain.de> writes:
> Stefan <monnier@iro.umontreal.ca> writes:
>
>> I can't reproduce this here. Could you give some more info?
>
> Perhaps two hours ago I updated my working copy, and it still
> happens. I proceeded as follows:
Now it's gone. Duh. I didn't apply the patch that Stefan suggested
(forgot it).
Kai
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-10-23 20:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-06 10:55 C-x 4 a ceased to work in *cvs-diff* buffer Kai Grossjohann
2004-06-06 22:33 ` Richard Stallman
2004-10-10 3:33 ` Stefan
2004-10-10 12:07 ` Kai Grossjohann
2004-10-10 12:20 ` Kai Grossjohann
2004-10-10 21:45 ` Stefan
2004-10-23 20:06 ` Kai Grossjohann
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).