From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: DiTAA graph not in local directory Date: Mon, 09 Nov 2009 10:34:22 +0100 Message-ID: <87fx8oqbxd.fsf@mundaneum.com> References: <87iqdnzpw7.fsf@mundaneum.com> <87vdhnr8ua.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Bernt & Carsten, Carsten wrote: > Bernt Hansen wrote: >> S=C3=A9bastien Vauban writes: >> >>> I try to generate the following DiTAA graph for LaTeX inclusion. >>> >>> It's in my Org file `~/dir1/dir2/ecm.org': >>> >>> --8<---------------cut here---------------start------------->8--- >>> * Context >>> >>> This comes from norang.ca. >>> >>> #+begin_ditaa communication.png -r -s 0.8 >>> +-----------+ +---------+ >>> | PLC | | | >>> | Network +<------>+ PLC + >>> | cRED | | c707 | >>> +-----------+ +----+----+ >>> #+end_ditaa >>> --8<---------------cut here---------------end--------------->8--- >>> >>> When exporting to LaTeX, the image is well generated, but in my `~/' >>> directory. Not in `~/dir1/dir2/', hence not found by LaTeX. >> >> That's not how my version of org-mode works. My exported communication.p= ng >> is local to the org file. I just created your example in >> ~/nobackup/tmp/foo.org and exported to latex and it creates >> communication.png in ~/nobackup/tmp/communication.png You're more lucky than I am=C2=A0;-) >> Org-mode version 6.32trans (release_6.32b.122.g41496) >> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-11-09 >> on raven, modified by Debian `M-x version' gives: "Org-mode version 6.32trans". I think I got it on last Thu or Fri morning. >> Now if I change the working directory with M-x cd and enter ~ >> then export it does what you see. Maybe your default directory is not >> the location of your org file? 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--- When looking for the current value of that variable, I have: --8<---------------cut here---------------start------------->8--- default-directory is a variable defined in `C source code'. Its value is "~/" Local in buffer *followup to Bernt Hansen on gmane.emacs.orgmode*; global v= alue 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--- Note that I am a bit puzzled, now, by the fact that variable has a buffer-local value, and that its global value is nil. Maybe I should do `setq-default' instead of `setq'? Anyway, I don't remember exactly why I did set that, but I think it's for e= asy opening of files (right prefix when `C-x C-f'). Regarding my Org files, I have 2 main usages: - organizational files, with items to do, scheduling dates and deadlines; - text files (without any active dates) that I purely want to write easily = and export nicely (in LaTeX). The "organizational files" are located either in `~/Personal' or in `~/Projects': --8<---------------cut here---------------start------------->8--- ;; directory with org files (used by the hooks for `remember.el') (setq org-directory (if (file-directory-p "~/Personal/") "~/Personal/" "~/")) ;; set which files to search for TODO entries and scheduled items ;; (avoiding hidden files) (setq org-agenda-files (append (directory-files org-directory t "^[^\\.].*\\.org$") (if (file-exists-p "~/Projects/") (directory-files "~/Projects/" t "^[^\\.].*\\.org$") nil))) --8<---------------cut here---------------end--------------->8--- The "text files" are anywhere on my disk, generally in subdirectories of `~/Projects'. The real directory of the file that's causing me "troubles" (in my above description) is, for example, `~/Projects/Insurance/Acme/docs/operations-manual'. > what is the publication context here? Are you pressing `C-c C-e d' from = the > buffer, or is this a project published with org-publish? I'm exporting with `C-c C-e l' to produce a LaTeX document in another buffe= r. Then, I move to it, and do `C-c C-c' to compile it to PDF, and view it. Carsten, you pinpoint another trouble that I've had months ago (when first using Org) and never changed, being accustomed to it, over time... If I do `C-c C-e d', I never get the PDF successfully compiled, as TeX says= it does not find my pictures (though, local to the document). My document is here: ~/Projects/Insurance/Acme/docs/operations-manual/Upload_documentation.org My static picture (for direct inclusion, not generated by Ditaa) is there as well: ~/Projects/Insurance/Acme/docs/operations-manual/cygwin-icon.png And the created files (when `C-c C-e d') are there: - ~/Projects/Insurance/Acme/docs/operations-manual/Upload_documentation.tex - ~/Upload_documentation.aux - ~/Upload_documentation.idx - ~/Upload_documentation.log - ~/Upload_documentation.out - ~/Upload_documentation.pdf - ~/Upload_documentation.toc - ~/procedure.png So, the TeX file is correctly located, but the auxiliary ones not. And TeX fails to produce the PDF with the following error: --8<---------------cut here---------------start------------->8--- LaTeX Warning: File `cygwin-icon.png' not found on input line 153. ! Package pdftex.def Error: File `cygwin-icon.png' not found. --8<---------------cut here---------------end--------------->8--- Maybe it's completely related to the above problem? Best regards and many thanks for your help, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode