[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slow access to files using UNC path
From: |
Romain Francoise |
Subject: |
Re: Slow access to files using UNC path |
Date: |
Sat, 18 Sep 2004 13:53:27 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> 2004-09-12 Stefan Monnier <address@hidden>
> * vc-hooks.el (vc-ignore-dir-regexp): New var.
> (vc-registered): Use it.
> (vc-find-root): New fun.
> ***************
> *** 315,325 ****
> file was previously registered under a certain backend, then that
> backend is tried first."
> (let (handler)
> ! (if (boundp 'file-name-handler-alist)
> ! (setq handler (find-file-name-handler file 'vc-registered)))
> ! (if handler
> ! ;; handler should set vc-backend and return t if registered
> ! (funcall handler 'vc-registered file)
> ;; There is no file name handler.
> ;; Try vc-BACKEND-registered for each handled BACKEND.
> (catch 'found
> --- 335,347 ----
> file was previously registered under a certain backend, then that
> backend is tried first."
> (let (handler)
> ! (cond
> ! ((string-match vc-ignore-dir-regexp (file-name-directory file)) nil)
> ! ((and (boundp 'file-name-handler-alist)
> ! (setq handler (find-file-name-handler file 'vc-registered)))
> ! ;; handler should set vc-backend and return t if registered
> ! (funcall handler 'vc-registered file))
> ! (t
> ;; There is no file name handler.
> ;; Try vc-BACKEND-registered for each handled BACKEND.
> (catch 'found
This change is problematic for buffers where buffer-file-name is ""
(like ERC server buffers in my case), file-name-directory returns nil so
string-match signals an error. It makes it impossible to quit Emacs
(you need to kill all such buffers manually).
How about the following fix?
--- orig/lisp/vc-hooks.el
+++ mod/lisp/vc-hooks.el
@@ -336,7 +336,10 @@
backend is tried first."
(let (handler)
(cond
- ((string-match vc-ignore-dir-regexp (file-name-directory file)) nil)
+ ((and
+ (file-name-directory file)
+ (string-match vc-ignore-dir-regexp (file-name-directory file)))
+ nil)
((and (boundp 'file-name-handler-alist)
(setq handler (find-file-name-handler file 'vc-registered)))
;; handler should set vc-backend and return t if registered
--
Romain Francoise <address@hidden> | I've become someone else's
it's a miracle -- http://orebokech.com/ | nightmare...
- Re: Slow access to files using UNC path, (continued)
- Re: Slow access to files using UNC path, Stefan Monnier, 2004/09/01
- Re: Slow access to files using UNC path, Dhruva Krishnamurthy, 2004/09/08
- Re: Slow access to files using UNC path, Kim F. Storm, 2004/09/08
- Re: Slow access to files using UNC path, Miles Bader, 2004/09/08
- Re: Slow access to files using UNC path, Dhruva Krishnamurthy, 2004/09/08
- Re: Slow access to files using UNC path, Stefan, 2004/09/08
- Re: Slow access to files using UNC path, Dhruva Krishnamurthy, 2004/09/08
- Re: Slow access to files using UNC path, Stefan Monnier, 2004/09/08
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Re: Slow access to files using UNC path, Dhruva Krishnamurthy, 2004/09/13
- Re: Slow access to files using UNC path, Stefan Monnier, 2004/09/13
- Re: Slow access to files using UNC path,
Romain Francoise <=
- Re: Slow access to files using UNC path, Stefan, 2004/09/18
- Re: Slow access to files using UNC path, Romain Francoise, 2004/09/18
- Re: Slow access to files using UNC path, Adrian Aichner, 2004/09/18
- Message not available
- Re: Slow access to files using UNC path, Romain Francoise, 2004/09/18
- Re: Slow access to files using UNC path, Damien Elmes, 2004/09/19
- Re: Slow access to files using UNC path, Stefan, 2004/09/19
- Re: Slow access to files using UNC path, Damien Elmes, 2004/09/19
- Re: Slow access to files using UNC path, Richard Stallman, 2004/09/19
- Re: Slow access to files using UNC path, Stefan, 2004/09/20
- Re: Slow access to files using UNC path, Damien Elmes, 2004/09/21