Richard M. Stallman wrote:

   The problem seems to be these lines near the top of
   widget-complete-file

   (beg (save-excursion
                    (skip-chars-backward "^ ")
                    (point)))

   Are there actually situations where files are listed in custom
   variables with space seperators? Or is this code attempting to find
   the beginning of the widget? If the latter, there must be a better way
   to do that.

This change works when I try it.  Does it work for you?

*** wid-edit.el 24 Sep 2005 22:42:50 -0400      1.146
--- wid-edit.el 03 Oct 2005 00:50:32 -0400      
***************
*** 2991,2999 ****
   "Perform completion on file name preceding point."
   (interactive)
   (let* ((end (point))
!        (beg (save-excursion
!               (skip-chars-backward "^ ")
!               (point)))
         (pattern (buffer-substring beg end))
         (name-part (file-name-nondirectory pattern))
         (directory (file-name-directory pattern))
--- 2991,2997 ----
   "Perform completion on file name preceding point."
   (interactive)
   (let* ((end (point))
!        (beg (widget-field-start widget))
         (pattern (buffer-substring beg end))
         (name-part (file-name-nondirectory pattern))
         (directory (file-name-directory pattern))
Yes, it works for me.

There is still another problem with file name completion on MS Windows though. If you start with just an empty field and try widget-complete you get the error "Wrong type argument: stringp, nil". I would instead expect a list of available active drive letters (for example c:/ d:/).

The same thing happens with just for example the letter "C". But with "C:" things starts working.


_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to