home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / gnu / emacs / bug / 1561 < prev    next >
Encoding:
Text File  |  1992-12-12  |  1.4 KB  |  38 lines

  1. Newsgroups: gnu.emacs.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!math.arizona.edu!rsm
  3. From: rsm@math.arizona.edu (Robert S. Maier)
  4. Subject: modifying the minibuffer-local-completion-map
  5. Message-ID: <RSM.92Dec12111838@coral.math.arizona.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Mathematics Department, University of Arizona
  8. Distribution: gnu
  9. Date: Sat, 12 Dec 1992 18:18:38 GMT
  10. Approved: bug-gnu-emacs@prep.ai.mit.edu
  11. Lines: 25
  12.  
  13. In my .emacs file I've got the following useful line:
  14.  
  15.   (define-key minibuffer-local-completion-map "~" 'insert-home-directory)
  16.  
  17. where `insert-home-directory' is a function which simply replaces the
  18. current line by "~".  
  19.  
  20. This is nice, because when I'm editing system files and suddenly do C-x C-f
  21. to load in a file from a subdirectory of my home directory, 
  22. typing an initial ~ wipes out the current (system) directory from the 
  23. minibuffer.  The system directory may be rather long, so deleting it is 
  24. esthetically pleasing.
  25.  
  26. This trick works fine for find-file (i.e. C-x C-f) and friends.
  27. Unfortunately it doesn't work for insert-file (i.e. C-x C-i), or
  28. any function which calls read-file-name (which is coded in C).
  29. Can anyone tell me why not?
  30.  
  31. -- 
  32. Robert S. Maier   | Internet: rsm@math.arizona.edu, rsm@cs.arizona.edu
  33. Dept. of Math.    | UUCP: uunet!arizona!amethyst!rsm
  34. Univ. of Arizona  | Bitnet: maier@arizvms
  35. Tucson, AZ  85721 | FAX: +1 602 621 8322
  36. U.S.A.            | Voice(POTS): +1 602 621 6893  /  +1 602 621 2617
  37.  
  38.