From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Corneli Newsgroups: gmane.emacs.help Subject: Re: find-file, default path Date: Tue, 19 Jul 2005 10:46:20 -0500 Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1121788549 29699 80.91.229.2 (19 Jul 2005 15:55:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Jul 2005 15:55:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 19 17:55:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DuuRL-0007JD-0o for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Jul 2005 17:55:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DuuTK-0005EH-If for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Jul 2005 11:57:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DuuSb-00054o-Ic for help-gnu-emacs@gnu.org; Tue, 19 Jul 2005 11:56:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DuuSN-0004yR-8x for help-gnu-emacs@gnu.org; Tue, 19 Jul 2005 11:56:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DuuSN-0004vG-3G for help-gnu-emacs@gnu.org; Tue, 19 Jul 2005 11:56:31 -0400 Original-Received: from [146.6.139.124] (helo=dell3.ma.utexas.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DuuRj-0002Oh-Ug for help-gnu-emacs@gnu.org; Tue, 19 Jul 2005 11:55:52 -0400 Original-Received: from lab50.ma.utexas.edu (mail@lab50.ma.utexas.edu [128.83.133.155]) by dell3.ma.utexas.edu (8.11.0.Beta3/8.10.2) with ESMTP id j6JFkKS18372; Tue, 19 Jul 2005 10:46:20 -0500 Original-Received: from jcorneli by lab50.ma.utexas.edu with local (Exim 3.36 #1 (Debian)) id 1DuuIW-000420-00; Tue, 19 Jul 2005 10:46:20 -0500 Original-To: help-gnu-emacs@gnu.org In-reply-to: (message from Jan Guido Donath on Tue, 19 Jul 2005 14:35:13 +0200) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28016 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28016 Since `find-file' takes an argument, all you have to do is build the argument using the default path and then pass the argument to `find-file'. The way to make this easy is to use `read-file-name'. E.g. some variant on (defun find-file-home-directory () (interactive) (find-file (read-file-name "File: " "/Users/arided/"))) BTW, I think after you find a file that isn't in the bin dir, `find-file' will have a new default path.