From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: elisp: isn't default-directory always the dir of current file?? Date: Mon, 2 Mar 2009 11:32:06 +0100 Message-ID: References: <19d2e227-6275-4b23-90f3-98c914a95156@o8g2000pre.googlegroups.com> <015bc5de-e438-4f92-b647-717776e51dc7@e1g2000pra.googlegroups.com> <070cfb3c-7d5c-444f-91fa-2948024b1ef7@n33g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235989981 12237 80.91.229.12 (2 Mar 2009 10:33:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2009 10:33:01 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xah Lee Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 02 11:34:17 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Le5TT-000311-4Y for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Mar 2009 11:34:16 +0100 Original-Received: from localhost ([127.0.0.1]:60899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Le5S8-0004Wk-14 for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Mar 2009 05:32:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Le5RS-0004Tq-G6 for help-gnu-emacs@gnu.org; Mon, 02 Mar 2009 05:32:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Le5RR-0004SD-G8 for help-gnu-emacs@gnu.org; Mon, 02 Mar 2009 05:32:09 -0500 Original-Received: from [199.232.76.173] (port=54681 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Le5RQ-0004S3-FQ for help-gnu-emacs@gnu.org; Mon, 02 Mar 2009 05:32:08 -0500 Original-Received: from yx-out-1718.google.com ([74.125.44.155]:57781) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Le5RQ-0001YX-0C for help-gnu-emacs@gnu.org; Mon, 02 Mar 2009 05:32:08 -0500 Original-Received: by yx-out-1718.google.com with SMTP id 34so1349235yxf.66 for ; Mon, 02 Mar 2009 02:32:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0uiYVLAiNakuZKwhCBb6itpN/VuPWgez1KICNny2kXM=; b=WFOXtQ7kD3jWZqDDlZROFSmdndKbt77MeNrMTJjJd/Zuq5qsA7/JJ71dcAj44+LGeG p4Olrnq4BXfjvJyg2mq/R8zpXCHYrbiJWBdxVumQCIDyHuQ41U1W2vORXYRkkyGKgtG4 nUn4kM02Z0PQWRSyJnNFqAzxJ/ZC+wJb/TTK8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Ra1e33ZiE2wv+R31MJSXDGkIFoFSsq/am+yS0RcN50rj4lQmHZiJOpEfhD8hbhjJeS 5XTp6D7WoLW6jwaQpdoLhZDjylhC1WUNFmCZlRtuBC/qKXHMpcmJMriWn97Vc1VisFhH uMrqL/ct8AD7iBlrhOxvWYxPbYoNn3i/hZZjY= Original-Received: by 10.231.20.5 with SMTP id d5mr3165672ibb.54.1235989926335; Mon, 02 Mar 2009 02:32:06 -0800 (PST) In-Reply-To: <070cfb3c-7d5c-444f-91fa-2948024b1ef7@n33g2000pri.googlegroups.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:62517 Archived-At: On Mon, Mar 2, 2009 at 8:46 AM, Xah Lee wrote: >> but that didn't. The following works though: >> (add-to-list 'load-path (file-name-directory load-file-name)) > > Ugh, this is quite painful. Spend 2+ hours on this. > > If i use this: > (add-to-list 'load-path (file-name-directory load-file-name)) > > it works if the file is loaded by elisp. But doesn't work if the file > is run with eval-buffer. Use buffer-file-name if load-file-name is nil.