unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* VC Dired Mode doesn't support recursive directory?
@ 2008-01-30 11:48 William Xu
  2008-01-30 15:59 ` Dan Nicolaescu
  0 siblings, 1 reply; 12+ messages in thread
From: William Xu @ 2008-01-30 11:48 UTC (permalink / raw)
  To: emacs-devel

1. M-x vc-directory gives me a list of changed files in current
   directory and one sub directory.

2. I marked all files, then `v v', it prompts this in the minibuffer: 

,----
| All members of a fileset must be under the same version-control system.
`----

The directory is a svn repo. I can do the above successfully on the
shell command line.

,----[ M-x emacs-version ]
| GNU Emacs 23.0.50.4 (i386-apple-darwin9.1.0, Carbon Version 1.6.0) of 2008-01-24 on zen
`----

-- 
William

http://williamxu.net9.org





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 11:48 VC Dired Mode doesn't support recursive directory? William Xu
@ 2008-01-30 15:59 ` Dan Nicolaescu
  2008-01-30 17:54   ` Stefan Monnier
  2008-01-31  3:21   ` William Xu
  0 siblings, 2 replies; 12+ messages in thread
From: Dan Nicolaescu @ 2008-01-30 15:59 UTC (permalink / raw)
  To: William Xu; +Cc: emacs-devel

William Xu <william.xwl@gmail.com> writes:

  > 1. M-x vc-directory gives me a list of changed files in current
  >    directory and one sub directory.
  > 
  > 2. I marked all files, then `v v', it prompts this in the minibuffer: 
  >
  > ,----
  > | All members of a fileset must be under the same version-control system.
  > `----

Were some of the files that you selected unregistered? If yes, then the
error you get is expected (although the wording could be improved to
make it more clear).






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 15:59 ` Dan Nicolaescu
@ 2008-01-30 17:54   ` Stefan Monnier
  2008-01-30 17:59     ` Dan Nicolaescu
  2008-01-31  3:21   ` William Xu
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2008-01-30 17:54 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: William Xu, emacs-devel

>> 1. M-x vc-directory gives me a list of changed files in current
>> directory and one sub directory.
>> 
>> 2. I marked all files, then `v v', it prompts this in the minibuffer: 
>> 
>> ,----
>> | All members of a fileset must be under the same version-control system.
>> `----

> Were some of the files that you selected unregistered? If yes, then the
> error you get is expected (although the wording could be improved to
> make it more clear).

BTW, I think there's a fundamental error in VC's handling of backends,
right now:  The backend should be a buffer-local property, not
a file-local property.


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 17:54   ` Stefan Monnier
@ 2008-01-30 17:59     ` Dan Nicolaescu
  2008-01-30 19:42       ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Nicolaescu @ 2008-01-30 17:59 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: William Xu, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > >> 1. M-x vc-directory gives me a list of changed files in current
  > >> directory and one sub directory.
  > >> 
  > >> 2. I marked all files, then `v v', it prompts this in the minibuffer: 
  > >> 
  > >> ,----
  > >> | All members of a fileset must be under the same version-control system.
  > >> `----
  > 
  > > Were some of the files that you selected unregistered? If yes, then the
  > > error you get is expected (although the wording could be improved to
  > > make it more clear).
  > 
  > BTW, I think there's a fundamental error in VC's handling of backends,
  > right now:  The backend should be a buffer-local property, not
  > a file-local property.

So what happens with files that are not in any buffer (like probably a
lot of files that would appear in vc-dired)?




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 17:59     ` Dan Nicolaescu
@ 2008-01-30 19:42       ` Stefan Monnier
  2008-01-30 19:46         ` Dan Nicolaescu
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2008-01-30 19:42 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: William Xu, emacs-devel

>> >> 1. M-x vc-directory gives me a list of changed files in current
>> >> directory and one sub directory.
>> >> 
>> >> 2. I marked all files, then `v v', it prompts this in the minibuffer: 
>> >> 
>> >> ,----
>> >> | All members of a fileset must be under the same version-control system.
>> >> `----
>> 
>> > Were some of the files that you selected unregistered? If yes, then the
>> > error you get is expected (although the wording could be improved to
>> > make it more clear).
>> 
>> BTW, I think there's a fundamental error in VC's handling of backends,
>> right now:  The backend should be a buffer-local property, not
>> a file-local property.

> So what happens with files that are not in any buffer (like probably a
> lot of files that would appear in vc-dired)?

Huh?  If they're in vc-dired, they're in a buffer.
That's the whole point: it ensures trivially that all the files selected
in a vc-dired are treated by the same backend.


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 19:42       ` Stefan Monnier
@ 2008-01-30 19:46         ` Dan Nicolaescu
  2008-01-30 21:36           ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Nicolaescu @ 2008-01-30 19:46 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: William Xu, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > >> >> 1. M-x vc-directory gives me a list of changed files in current
  > >> >> directory and one sub directory.
  > >> >> 
  > >> >> 2. I marked all files, then `v v', it prompts this in the minibuffer: 
  > >> >> 
  > >> >> ,----
  > >> >> | All members of a fileset must be under the same version-control system.
  > >> >> `----
  > >> 
  > >> > Were some of the files that you selected unregistered? If yes, then the
  > >> > error you get is expected (although the wording could be improved to
  > >> > make it more clear).
  > >> 
  > >> BTW, I think there's a fundamental error in VC's handling of backends,
  > >> right now:  The backend should be a buffer-local property, not
  > >> a file-local property.
  > 
  > > So what happens with files that are not in any buffer (like probably a
  > > lot of files that would appear in vc-dired)?
  > 
  > Huh?  If they're in vc-dired, they're in a buffer.

There seems to be a misunderstanding here. Why would the files be in a
buffer? One can edit something, quit emacs and then 2 weeks later run
vc-dired.  It's possible that none of the files that vc-dired shows to
be in a buffer.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 19:46         ` Dan Nicolaescu
@ 2008-01-30 21:36           ` Stefan Monnier
  2008-01-30 23:23             ` Dan Nicolaescu
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2008-01-30 21:36 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: William Xu, emacs-devel

>> >> >> 1. M-x vc-directory gives me a list of changed files in current
>> >> >> directory and one sub directory.
>> >> >> 
>> >> >> 2. I marked all files, then `v v', it prompts this in the minibuffer: 
>> >> >> 
>> >> >> ,----
>> >> >> | All members of a fileset must be under the same version-control system.
>> >> >> `----
>> >> 
>> >> > Were some of the files that you selected unregistered? If yes, then the
>> >> > error you get is expected (although the wording could be improved to
>> >> > make it more clear).
>> >> 
>> >> BTW, I think there's a fundamental error in VC's handling of backends,
>> >> right now:  The backend should be a buffer-local property, not
>> >> a file-local property.
>> 
>> > So what happens with files that are not in any buffer (like probably a
>> > lot of files that would appear in vc-dired)?
>> 
>> Huh?  If they're in vc-dired, they're in a buffer.

> There seems to be a misunderstanding here. Why would the files be in a
> buffer? One can edit something, quit emacs and then 2 weeks later run
> vc-dired.  It's possible that none of the files that vc-dired shows to
> be in a buffer.

But any VC operation is run from a buffer.  Either a file buffer or a VC
buffer.  The backend to use should depend on the buffer, not on the (set
of) file(s).


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 21:36           ` Stefan Monnier
@ 2008-01-30 23:23             ` Dan Nicolaescu
  2008-01-31  2:02               ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Nicolaescu @ 2008-01-30 23:23 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: William Xu, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > >> >> >> 1. M-x vc-directory gives me a list of changed files in current
  > >> >> >> directory and one sub directory.
  > >> >> >> 
  > >> >> >> 2. I marked all files, then `v v', it prompts this in the minibuffer: 
  > >> >> >> 
  > >> >> >> ,----
  > >> >> >> | All members of a fileset must be under the same version-control system.
  > >> >> >> `----
  > >> >> 
  > >> >> > Were some of the files that you selected unregistered? If yes, then the
  > >> >> > error you get is expected (although the wording could be improved to
  > >> >> > make it more clear).
  > >> >> 
  > >> >> BTW, I think there's a fundamental error in VC's handling of backends,
  > >> >> right now:  The backend should be a buffer-local property, not
  > >> >> a file-local property.
  > >> 
  > >> > So what happens with files that are not in any buffer (like probably a
  > >> > lot of files that would appear in vc-dired)?
  > >> 
  > >> Huh?  If they're in vc-dired, they're in a buffer.
  > 
  > > There seems to be a misunderstanding here. Why would the files be in a
  > > buffer? One can edit something, quit emacs and then 2 weeks later run
  > > vc-dired.  It's possible that none of the files that vc-dired shows to
  > > be in a buffer.
  > 
  > But any VC operation is run from a buffer.  Either a file buffer or a VC
  > buffer.  The backend to use should depend on the buffer, not on the (set
  > of) file(s).

Well, for vc-dired different files can belong to different backends. If
you are saying that its not a good idea, then we are in complete
agreement.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 23:23             ` Dan Nicolaescu
@ 2008-01-31  2:02               ` Stefan Monnier
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2008-01-31  2:02 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: William Xu, emacs-devel

>> But any VC operation is run from a buffer.  Either a file buffer or a VC
>> buffer.  The backend to use should depend on the buffer, not on the (set
>> of) file(s).

> Well, for vc-dired different files can belong to different backends. If
> you are saying that its not a good idea, then we are in complete
> agreement.

No, I'm saying that in order for VC-dired to make sense when files can
belong to several backends, the "current backend" should be per-buffer
rather than per-file.

So you can have a VC-dired buffer in CVS mode on /foo/bar while having
file /foo/bar/baz in another buffer and switching between CVS and RCS
backends in that buffer.


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-30 15:59 ` Dan Nicolaescu
  2008-01-30 17:54   ` Stefan Monnier
@ 2008-01-31  3:21   ` William Xu
  2008-01-31 15:55     ` Dan Nicolaescu
  1 sibling, 1 reply; 12+ messages in thread
From: William Xu @ 2008-01-31  3:21 UTC (permalink / raw)
  To: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> Were some of the files that you selected unregistered? If yes, then the
> error you get is expected (although the wording could be improved to
> make it more clear).

No, they are all already registered. 

I found the cause, it is because i have sort directory first in dired
buffer. Namely, I have the following in my .emacs: 

,----
| ;; Sort directories first
| (defun sof/dired-sort ()
|   "Dired sort hook to list directories first."
|   (save-excursion
|     (let (buffer-read-only)
|       (forward-line 2) ;; beyond dir. header
|       (sort-regexp-fields t "^.*$" "[ ]*." (point)
|                           (point-max))))
|   (set-buffer-modified-p nil))
| 
| (add-hook 'dired-after-readin-hook 'sof/dired-sort)
`----

Can VC Dired Mode handle this case?

-- 
William

http://williamxu.net9.org





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-31  3:21   ` William Xu
@ 2008-01-31 15:55     ` Dan Nicolaescu
  2008-02-01  3:16       ` William Xu
  0 siblings, 1 reply; 12+ messages in thread
From: Dan Nicolaescu @ 2008-01-31 15:55 UTC (permalink / raw)
  To: William Xu; +Cc: emacs-devel

William Xu <william.xwl@gmail.com> writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > 
  > > Were some of the files that you selected unregistered? If yes, then the
  > > error you get is expected (although the wording could be improved to
  > > make it more clear).
  > 
  > No, they are all already registered. 
  > 
  > I found the cause, it is because i have sort directory first in dired
  > buffer. Namely, I have the following in my .emacs: 
  > 
  > ,----
  > | ;; Sort directories first
  > | (defun sof/dired-sort ()
  > |   "Dired sort hook to list directories first."
  > |   (save-excursion
  > |     (let (buffer-read-only)
  > |       (forward-line 2) ;; beyond dir. header
  > |       (sort-regexp-fields t "^.*$" "[ ]*." (point)
  > |                           (point-max))))
  > |   (set-buffer-modified-p nil))
  > | 
  > | (add-hook 'dired-after-readin-hook 'sof/dired-sort)
  >
  > Can VC Dired Mode handle this case?

This seems to directly modify the dired buffer, so probably something
goes wrong there.

If you can reproduce the problem starting from emacs -Q without the code
above, the please report back.

Also vc-dired is very likely to get replaced soon...




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: VC Dired Mode doesn't support recursive directory?
  2008-01-31 15:55     ` Dan Nicolaescu
@ 2008-02-01  3:16       ` William Xu
  0 siblings, 0 replies; 12+ messages in thread
From: William Xu @ 2008-02-01  3:16 UTC (permalink / raw)
  To: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> This seems to directly modify the dired buffer, so probably something
> goes wrong there.
>
> If you can reproduce the problem starting from emacs -Q without the code
> above, the please report back.

No, it doesn't happen with -Q or simply by removing that hook.

> Also vc-dired is very likely to get replaced soon...

Okay, then I will fall back on the command line at the moment..

-- 
William

http://williamxu.net9.org





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-02-01  3:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-30 11:48 VC Dired Mode doesn't support recursive directory? William Xu
2008-01-30 15:59 ` Dan Nicolaescu
2008-01-30 17:54   ` Stefan Monnier
2008-01-30 17:59     ` Dan Nicolaescu
2008-01-30 19:42       ` Stefan Monnier
2008-01-30 19:46         ` Dan Nicolaescu
2008-01-30 21:36           ` Stefan Monnier
2008-01-30 23:23             ` Dan Nicolaescu
2008-01-31  2:02               ` Stefan Monnier
2008-01-31  3:21   ` William Xu
2008-01-31 15:55     ` Dan Nicolaescu
2008-02-01  3:16       ` William Xu

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).