find-file and write-file with specified path?

find-file and write-file with specified path?

Post by John Juliusso » Tue, 29 Jul 1997 04:00:00



Hello,

I can't figure out how to make the functions "find-file" or "write-file"

to start in another path than the default one.

I want to make a function "driveD-find-file" which starts in the
mini-buffer as
usual, but it should start with "d:" instead of the default-directory.

*minibubber*
------------------
Find-file: d:/_
------------------

Thanks
John

 
 
 

find-file and write-file with specified path?

Post by Emacs » Tue, 29 Jul 1997 04:00:00


Hello John!

Quote:>I can't figure out how to make the functions "find-file" or "write-file"
>to start in another path than the default one.

>I want to make a function "driveD-find-file" which starts in the
>mini-buffer as
>usual, but it should start with "d:" instead of the default-directory.

Try

(defun drive-d-find-file ()
  (interactive)
  (let ((old default-directory)
        (buff (current-buffer)))
    (setq default-directory "d:\\")
    (call-interactively 'find-file)
    (save-excursion (set-buffer buff) (setq default-directory old))))

Olaf

 
 
 

1. key binding to falways find a file in a specified directory

During the course of my work, I chiefly work between seven directories deep
down in different hierarchies
Finding a file in either of these involves writing the entire path (or when
sometimes , I am lucky getting the file from the dired list - seven dired
lists are a pain)

is there a way to have a shortcut so that emacs always finds the file in
these directories
any suggestions will be appreciated

2. AGFA SnapScan 600

3. Specifying where to find the installation files at runtime.

4. TyIn 2000 Voice/Fax/Modem

5. how to specify default directory for "find file"

6. Crosstab Help

7. hidden files in the 'find-file'-dialog

8. Fun and Games with Time

9. Ada mode find-file.el file

10. CC-Mode: How to find-file for #included files

11. How to make find-file ask confirmation when file does not exist?

12. How to get find-file to consider files in VPATH?

13. find-file multiple files