Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!tut.cis.ohio-state.edu!sun.com!peck From: peck@sun.com (Jeff Peck) Newsgroups: gnu.emacs.bug Subject: editing filename via find-alternate-file Message-ID: <8909191823.AA21569@denali.sun.com> Date: 19 Sep 89 18:23:57 GMT Sender: zhu@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 16 Most of my usage of find-alternate-file arise from having misspelled a file or directory name, or i want to go back to a different version. In each case, i typically want to just edit the filename a little bit. The standard find-alternate-file does not supply the filename in the default so i would have to retype it. I suggest that the filename be included in the default. (M-b C-k will remove it easily enough). [This also makes a handy way to verify what your current filename is] (defun find-alter-file (filename) "Like find-alternate-file, but presents current filename for editing." (interactive (list (read-file-name "Find alternate file: " (or (buffer-file-name) default-directory)))) (find-alternate-file filename))