* [patch] ido.el
@ 2003-11-29 4:56 Karl Chen
2003-12-05 13:17 ` Kim F. Storm
0 siblings, 1 reply; 3+ messages in thread
From: Karl Chen @ 2003-11-29 4:56 UTC (permalink / raw)
Cc: Emacs Developement List
This patch fixes a bug when default-directory or the given
directory doesn't end in a slash
--
Karl Chen 2003-11-28 20:53
Index: ido.el
===================================================================
--- ido.el (revision 5448)
+++ ido.el (working copy)
@@ -1372,6 +1372,9 @@
(fix-it (concat dir "/"))
(t nil)))
+(defsubst ido-directory-or-default (directory)
+ (file-name-as-directory (expand-file-name (or directory default-directory))))
+
(defun ido-set-current-directory (dir &optional subdir no-merge)
;; Set ido's current directory to DIR or DIR/SUBDIR
(setq dir (ido-final-slash dir t))
@@ -1832,7 +1835,7 @@
(defun ido-file-internal (method &optional fallback default prompt item initial)
;; Internal function for ido-find-file and friends
- (let ((ido-current-directory (expand-file-name (or default default-directory)))
+ (let ((ido-current-directory (ido-directory-or-default default))
filename)
(if (or (not ido-mode) (ido-is-slow-ftp-host))
@@ -3725,7 +3728,7 @@
(let (filename
ido-saved-vc-mt
(vc-master-templates (and (boundp 'vc-master-templates) vc-master-templates))
- (ido-current-directory (expand-file-name (or dir default-directory)))
+ (ido-current-directory (ido-directory-or-default dir default-directory))
(ido-work-directory-index -1)
(ido-work-file-index -1)
(ido-find-literal nil))
@@ -3743,7 +3746,7 @@
See `read-file-name' for additional parameters."
(let (filename
ido-saved-vc-mt
- (ido-current-directory (expand-file-name (or dir default-directory)))
+ (ido-current-directory (ido-directory-or-default dir))
(ido-work-directory-index -1)
(ido-work-file-index -1))
(setq filename
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] ido.el
2003-11-29 4:56 [patch] ido.el Karl Chen
@ 2003-12-05 13:17 ` Kim F. Storm
2003-12-05 17:57 ` Karl Chen
0 siblings, 1 reply; 3+ messages in thread
From: Kim F. Storm @ 2003-12-05 13:17 UTC (permalink / raw)
Cc: Emacs Developement List, Kim F. Storm
Karl Chen <quarl@hkn.eecs.berkeley.edu> writes:
Thanks. I'll install it in a few days...
> This patch fixes a bug when default-directory or the given
> directory doesn't end in a slash
>
> --
> Karl Chen 2003-11-28 20:53
>
>
> Index: ido.el
> ===================================================================
> --- ido.el (revision 5448)
> +++ ido.el (working copy)
> @@ -1372,6 +1372,9 @@
> (fix-it (concat dir "/"))
> (t nil)))
>
> +(defsubst ido-directory-or-default (directory)
> + (file-name-as-directory (expand-file-name (or directory default-directory))))
> +
> (defun ido-set-current-directory (dir &optional subdir no-merge)
> ;; Set ido's current directory to DIR or DIR/SUBDIR
> (setq dir (ido-final-slash dir t))
> @@ -1832,7 +1835,7 @@
>
> (defun ido-file-internal (method &optional fallback default prompt item initial)
> ;; Internal function for ido-find-file and friends
> - (let ((ido-current-directory (expand-file-name (or default default-directory)))
> + (let ((ido-current-directory (ido-directory-or-default default))
> filename)
>
> (if (or (not ido-mode) (ido-is-slow-ftp-host))
> @@ -3725,7 +3728,7 @@
> (let (filename
> ido-saved-vc-mt
> (vc-master-templates (and (boundp 'vc-master-templates) vc-master-templates))
> - (ido-current-directory (expand-file-name (or dir default-directory)))
> + (ido-current-directory (ido-directory-or-default dir default-directory))
> (ido-work-directory-index -1)
> (ido-work-file-index -1)
> (ido-find-literal nil))
> @@ -3743,7 +3746,7 @@
> See `read-file-name' for additional parameters."
> (let (filename
> ido-saved-vc-mt
> - (ido-current-directory (expand-file-name (or dir default-directory)))
> + (ido-current-directory (ido-directory-or-default dir))
> (ido-work-directory-index -1)
> (ido-work-file-index -1))
> (setq filename
>
>
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] ido.el
2003-12-05 13:17 ` Kim F. Storm
@ 2003-12-05 17:57 ` Karl Chen
0 siblings, 0 replies; 3+ messages in thread
From: Karl Chen @ 2003-12-05 17:57 UTC (permalink / raw)
Cc: Emacs Developement List, Kim F. Storm
There was a bug in the patch, here it is fixed:
Index: ido.el
===================================================================
--- ido.el (revision 5448)
+++ ido.el (working copy)
@@ -1372,6 +1372,9 @@
(fix-it (concat dir "/"))
(t nil)))
+(defsubst ido-directory-or-default (directory)
+ (file-name-as-directory (expand-file-name (or directory default-directory))))
+
(defun ido-set-current-directory (dir &optional subdir no-merge)
;; Set ido's current directory to DIR or DIR/SUBDIR
(setq dir (ido-final-slash dir t))
@@ -1832,7 +1835,7 @@
(defun ido-file-internal (method &optional fallback default prompt item initial)
;; Internal function for ido-find-file and friends
- (let ((ido-current-directory (expand-file-name (or default default-directory)))
+ (let ((ido-current-directory (ido-directory-or-default default))
filename)
(if (or (not ido-mode) (ido-is-slow-ftp-host))
@@ -3725,7 +3728,7 @@
(let (filename
ido-saved-vc-mt
(vc-master-templates (and (boundp 'vc-master-templates) vc-master-templates))
- (ido-current-directory (expand-file-name (or dir default-directory)))
+ (ido-current-directory (ido-directory-or-default dir))
(ido-work-directory-index -1)
(ido-work-file-index -1)
(ido-find-literal nil))
@@ -3743,7 +3746,7 @@
See `read-file-name' for additional parameters."
(let (filename
ido-saved-vc-mt
- (ido-current-directory (expand-file-name (or dir default-directory)))
+ (ido-current-directory (ido-directory-or-default dir))
(ido-work-directory-index -1)
(ido-work-file-index -1))
(setq filename
>>>>> "Kim" == Kim F Storm <no-spam@cua.dk> writes:
Kim>
Kim> Karl Chen <quarl@hkn.eecs.berkeley.edu> writes: Thanks.
Kim> I'll install it in a few days...
Kim>
Kim>
>> This patch fixes a bug when default-directory or the given
>> directory doesn't end in a slash
--
Karl Chen 2003-12-05 09:55
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-12-05 17:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-29 4:56 [patch] ido.el Karl Chen
2003-12-05 13:17 ` Kim F. Storm
2003-12-05 17:57 ` Karl Chen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.