From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: DiTAA graph not in local directory Date: Tue, 10 Nov 2009 07:41:42 -0500 Message-ID: <87k4xyv9fd.fsf@gollum.intra.norang.ca> References: <87iqdnzpw7.fsf@mundaneum.com> <87vdhnr8ua.fsf@gollum.intra.norang.ca> <87fx8oqbxd.fsf@mundaneum.com> <87eio7ojb1.fsf@gollum.intra.norang.ca> <87639ikb2p.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7q2u-0008BQ-Cj for emacs-orgmode@gnu.org; Tue, 10 Nov 2009 07:42:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7q2p-00084m-BM for emacs-orgmode@gnu.org; Tue, 10 Nov 2009 07:42:03 -0500 Received: from [199.232.76.173] (port=50601 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7q2p-00084b-72 for emacs-orgmode@gnu.org; Tue, 10 Nov 2009 07:41:59 -0500 Received: from plane.gmane.org ([80.91.229.3]:39257) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N7q2o-0001mM-Jm for emacs-orgmode@gnu.org; Tue, 10 Nov 2009 07:41:59 -0500 Received: from public by plane.gmane.org with local (Exim 4.63) (envelope-from ) id 1N7q2f-0005nc-5i for emacs-orgmode@gnu.org; Tue, 10 Nov 2009 13:41:49 +0100 In-Reply-To: <87639ikb2p.fsf@mundaneum.com> (=?utf-8?Q?=22S=C3=A9bastien?= Vauban"'s message of "Tue\, 10 Nov 2009 10\:01\:34 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org S=C3=A9bastien Vauban writes: > Hi Bernt, > > Bernt Hansen wrote: >> S=C3=A9bastien Vauban writes: >>> I have, since long, the following chunk in my `.emacs', for setting the >>> `default-directory': >>> >>> --8<---------------cut here---------------start------------->8--- >>> ;; change the default directory (if it exists) >>> ;; (it is also the default directory when attaching files to mails) >>> (let ((my-default-directory "~/")) >>> (setq default-directory >>> (if (file-directory-p my-default-directory) >>> my-default-directory >>> (getenv "HOME")))) >>> --8<---------------cut here---------------end--------------->8--- >> >> I think this function is the cause of your problems. I think you are >> changing the default directory for whatever buffer is active when you >> execute that. If that buffer happens to be the org file you want to >> export you are changing where the resulting export files go. > > I commented the above in my `.emacs' file and restarted Emacs. > > >>> Anyway, I don't remember exactly why I did set that, but I think it's f= or easy >>> opening of files (right prefix when `C-x C-f'). >> >> I just use C-x C-f ~/ >> >> and whatever current directory was active is dropped. I don't think you >> need your setq default-directory at all - you just need to teach your >> fingers to add ~/ after C-x C-f > > Yes, I'll do that now... In fact, I implemented this, years ago, for "eas= ily" > attaching documents to emails. > > >>> When looking for the current value of that variable > > I now have: > > --8<---------------cut here---------------start------------->8--- > default-directory is a variable defined in `C source code'. > Its value is=20 > "/home/sva/Projects/Insurance/Acme/docs/operations-manual/" > Local in buffer Upload_documentation.tex; global value is nil > > Automatically becomes buffer-local when set in any fashion. > This variable is safe as a file local variable if its value > satisfies the predicate `stringp'. > > Documentation: > Name of default directory of current buffer. Should end with slash. > To interactively change the default directory, use command `cd'. > --8<---------------cut here---------------end--------------->8--- > > from both the Org file and the TeX file. Correct, thus. > > Though, I have exactly the same problem as yesterday: only the TeX file is > produced locally when `C-c C-e d', and all the other files (.aux, .log an= d the > .png from Ditaa) are stored in `~/'. > > Ununderstandable... That's weird. I created a test.org file in /tmp/foo/bar/baz/test.org and made a small ditaa diagram (foo.png) with two rectangles in it. C-c C-e d creates ,---- | bernt@gollum:/tmp/foo/bar/baz$ ls | foo.png test.org test.pdf test.tex | bernt@gollum:/tmp/foo/bar/baz$=20 `---- and nothing else. I don't get .aux, .log etc in there. For me all files are in the same directory as the .org file. ,---- | default-directory is a variable defined in `C source code'. | Its value is "/tmp/foo/bar/baz/" | Local in buffer test.org; global value is nil `---- I'm afraid I'm out of ideas on this one. -Bernt