* Re: Directory name completion blocks when it shouldn't [not found] ` <m2vekme8vg.fsf@chrislap.local> @ 2006-12-17 5:37 ` Richard Stallman 2006-12-18 1:12 ` Richard Stallman 0 siblings, 1 reply; 7+ messages in thread From: Richard Stallman @ 2006-12-17 5:37 UTC (permalink / raw) Cc: emacs-pretest-bug, ihs_4664 [I sent this message a week ago but did not get a response.] read-file-name-internal ignores the value of PREDICATE if ACTION is nil (ACTION is t if we are listing possible completions, and nil if are actually doing the completion) I wonder if that is a bug. Unfortunately there is no comment which explains why the code does this. I looked for calls to read-file-name that pass a predicate. Aside from this one, I found one other, in compile.el. The comment there suggests that in this case too it is a problem that read-file-name ignores the predicate. Is it feasible to fix read-file-name to obey the predicate in the completion case? It could be that the reason it doesn't do so was the difficulty of implementing that case efficiently. Would someone please try? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Directory name completion blocks when it shouldn't 2006-12-17 5:37 ` Directory name completion blocks when it shouldn't Richard Stallman @ 2006-12-18 1:12 ` Richard Stallman 2006-12-19 20:16 ` Chris Moore 0 siblings, 1 reply; 7+ messages in thread From: Richard Stallman @ 2006-12-18 1:12 UTC (permalink / raw) Is it feasible to fix read-file-name to obey the predicate in the completion case? It could be that the reason it doesn't do so was the difficulty of implementing that case efficiently. Since no one else seemed interested in this, I did it. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Directory name completion blocks when it shouldn't 2006-12-18 1:12 ` Richard Stallman @ 2006-12-19 20:16 ` Chris Moore 2006-12-20 6:14 ` Michael Albinus 0 siblings, 1 reply; 7+ messages in thread From: Chris Moore @ 2006-12-19 20:16 UTC (permalink / raw) Cc: emacs-pretest-bug, ihs_4664, emacs-devel Richard Stallman <rms@gnu.org> writes: > Is it feasible to fix read-file-name to obey the predicate > in the completion case? It could be that the reason it doesn't > do so was the difficulty of implementing that case efficiently. > > Since no one else seemed interested in this, I did it. I think you've introduced a new bug - lisp/net/ange-ftp.el.gz line 3980: (defun ange-ftp-file-name-completion (file dir) is being called like: (ange-ftp-file-name-completion "" "/a:/" 'file-exists-p) and lisp/net/tramp.el.gz line 2859: (defun tramp-handle-file-name-completion (filename directory) is being called like: (tramp-handle-file-name-completion "" "/a:/" 'file-exists-p) in both cases the functions expect 2 arguments, and they're being passed 3. I reported this earlier today: Message-Id: <m2zm9km3rc.fsf@chrislap.local> To: emacs-pretest-bug@gnu.org Subject: TRAMP: error when completing filename without realising that this was related to the recent "Directory name completion blocks when it shouldn't" fix. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Directory name completion blocks when it shouldn't 2006-12-19 20:16 ` Chris Moore @ 2006-12-20 6:14 ` Michael Albinus 2006-12-20 10:28 ` Sascha Wilde 0 siblings, 1 reply; 7+ messages in thread From: Michael Albinus @ 2006-12-20 6:14 UTC (permalink / raw) Cc: emacs-pretest-bug, ihs_4664, emacs-devel Chris Moore <dooglus@gmail.com> writes: > I think you've introduced a new bug - > > lisp/net/ange-ftp.el.gz line 3980: > (defun ange-ftp-file-name-completion (file dir) > is being called like: > (ange-ftp-file-name-completion "" "/a:/" 'file-exists-p) > > and > > lisp/net/tramp.el.gz line 2859: > (defun tramp-handle-file-name-completion (filename directory) > is being called like: > (tramp-handle-file-name-completion "" "/a:/" 'file-exists-p) > > in both cases the functions expect 2 arguments, and they're being > passed 3. Shall be fixed now in both ange-ftp.el and tramp.el. Best regards, Michael. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Directory name completion blocks when it shouldn't 2006-12-20 6:14 ` Michael Albinus @ 2006-12-20 10:28 ` Sascha Wilde 2006-12-20 13:24 ` Michael Albinus 0 siblings, 1 reply; 7+ messages in thread From: Sascha Wilde @ 2006-12-20 10:28 UTC (permalink / raw) Cc: Chris Moore, ihs_4664, emacs-devel, rms, emacs-pretest-bug Michael Albinus <michael.albinus@gmx.de> wrote: > Chris Moore <dooglus@gmail.com> writes: > >> I think you've introduced a new bug - >> >> lisp/net/ange-ftp.el.gz line 3980: >> (defun ange-ftp-file-name-completion (file dir) >> is being called like: >> (ange-ftp-file-name-completion "" "/a:/" 'file-exists-p) >> >> and >> >> lisp/net/tramp.el.gz line 2859: >> (defun tramp-handle-file-name-completion (filename directory) >> is being called like: >> (tramp-handle-file-name-completion "" "/a:/" 'file-exists-p) >> >> in both cases the functions expect 2 arguments, and they're being >> passed 3. > > Shall be fixed now in both ange-ftp.el and tramp.el. Seems to be still buggy: C-x C-f /et TAB results in: Debugger entered--Lisp error: (wrong-type-argument stringp ("etc/")) file-exists-p(("etc/")) try-completion("et" (("etc/")) file-exists-p) tramp-completion-handle-file-name-completion("et" "/" file-exists-p) apply(tramp-completion-handle-file-name-completion ("et" "/" file-exists-p)) tramp-completion-file-name-handler(file-name-completion "et" "/" file-exists-p) read-file-name-internal("~/.worklog//et" "~/.worklog/" nil) minibuffer-complete() call-interactively(minibuffer-complete) read-file-name("Find file: " nil "/home/wilde/.worklog/" nil) find-file-read-args("Find file: " nil) call-interactively(find-file) cheers sascha -- Sascha Wilde : "Ist es nicht schon schlimm genug, dass ICH hier rumtrolle?" : (Henning Leise in d.o.c.) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Directory name completion blocks when it shouldn't 2006-12-20 10:28 ` Sascha Wilde @ 2006-12-20 13:24 ` Michael Albinus 2006-12-20 14:08 ` Sascha Wilde 0 siblings, 1 reply; 7+ messages in thread From: Michael Albinus @ 2006-12-20 13:24 UTC (permalink / raw) Cc: ihs_4664, emacs-devel, emacs-pretest-bug [-- Attachment #1: Type: text/plain, Size: 882 bytes --] Sascha Wilde <wilde@sha-bang.de> writes: > Seems to be still buggy: > > C-x C-f /et TAB > > results in: > > Debugger entered--Lisp error: (wrong-type-argument stringp ("etc/")) > file-exists-p(("etc/")) > try-completion("et" (("etc/")) file-exists-p) > tramp-completion-handle-file-name-completion("et" "/" file-exists-p) > apply(tramp-completion-handle-file-name-completion ("et" "/" file-exists-p)) > tramp-completion-file-name-handler(file-name-completion "et" "/" file-exists-p) > read-file-name-internal("~/.worklog//et" "~/.worklog/" nil) > minibuffer-complete() > call-interactively(minibuffer-complete) > read-file-name("Find file: " nil "/home/wilde/.worklog/" nil) > find-file-read-args("Find file: " nil) > call-interactively(find-file) Please try the appended patch (currently I have no CVS access). > cheers > sascha Best regards, Michael. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 1195 bytes --] *** /tmp/tramp.el.~1~ Wed Dec 20 14:22:49 2006 --- /tmp/tramp.el Wed Dec 20 14:22:49 2006 *************** *** 2868,2874 **** filename (mapcar (lambda (x) (cons x nil)) (file-name-all-completions filename directory)) ! predicate))) ;; cp, mv and ln --- 2868,2875 ---- filename (mapcar (lambda (x) (cons x nil)) (file-name-all-completions filename directory)) ! '(lambda (x) ! (funcall predicate (expand-file-name (car x) directory)))))) ;; cp, mv and ln *************** *** 4635,4641 **** (try-completion filename (mapcar 'list (file-name-all-completions filename directory)) ! predicate)) ;; I misuse a little bit the tramp-file-name structure in order to handle ;; completion possibilities for partial methods / user names / host names. --- 4636,4643 ---- (try-completion filename (mapcar 'list (file-name-all-completions filename directory)) ! '(lambda (x) ! (funcall predicate (expand-file-name (car x) directory))))) ;; I misuse a little bit the tramp-file-name structure in order to handle ;; completion possibilities for partial methods / user names / host names. [-- Attachment #3: Type: text/plain, Size: 161 bytes --] _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Directory name completion blocks when it shouldn't 2006-12-20 13:24 ` Michael Albinus @ 2006-12-20 14:08 ` Sascha Wilde 0 siblings, 0 replies; 7+ messages in thread From: Sascha Wilde @ 2006-12-20 14:08 UTC (permalink / raw) Cc: Chris Moore, ihs_4664, rms, emacs-pretest-bug, emacs-devel Michael Albinus <michael.albinus@gmx.de> wrote: > Sascha Wilde <wilde@sha-bang.de> writes: > >> Seems to be still buggy: >> >> C-x C-f /et TAB >> >> results in: >> >> Debugger entered--Lisp error: (wrong-type-argument stringp ("etc/")) >> file-exists-p(("etc/")) [...] > Please try the appended patch (currently I have no CVS access). This fixes it. Thanks! cheers sascha -- Sascha Wilde Well, *my* brain likes to think it's vastly more powerful than any finite Turing machine but it hasn't proven that to me... -- Christopher Koppler in comp.lang.lisp ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-12-20 14:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <871wng3yyw.fsf@leeloo.anubex.internal> [not found] ` <m3wt57vkvv.fsf@kfs-l.imdomain.dk> [not found] ` <el1l03$j4p$1@sea.gmane.org> [not found] ` <E1GrSYo-0004AE-I3@fencepost.gnu.org> [not found] ` <m2vekme8vg.fsf@chrislap.local> 2006-12-17 5:37 ` Directory name completion blocks when it shouldn't Richard Stallman 2006-12-18 1:12 ` Richard Stallman 2006-12-19 20:16 ` Chris Moore 2006-12-20 6:14 ` Michael Albinus 2006-12-20 10:28 ` Sascha Wilde 2006-12-20 13:24 ` Michael Albinus 2006-12-20 14:08 ` Sascha Wilde
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).