* DiTAA graph not in local directory @ 2009-11-06 14:31 Sébastien Vauban 2009-11-06 15:06 ` Bernt Hansen 2009-11-06 17:06 ` Carsten Dominik 0 siblings, 2 replies; 8+ messages in thread From: Sébastien Vauban @ 2009-11-06 14:31 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi, 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. Note that adding `./' to the ditaa command does not change anything... --8<---------------cut here---------------start------------->8--- #+begin_ditaa ./communication.png -r -s 0.8 --8<---------------cut here---------------end--------------->8--- What can I do to have the resulting graphic local to the Org file? Best regards, Seb -- Sébastien 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DiTAA graph not in local directory 2009-11-06 14:31 DiTAA graph not in local directory Sébastien Vauban @ 2009-11-06 15:06 ` Bernt Hansen 2009-11-09 9:34 ` Sébastien Vauban 2009-11-06 17:06 ` Carsten Dominik 1 sibling, 1 reply; 8+ messages in thread From: Bernt Hansen @ 2009-11-06 15:06 UTC (permalink / raw) To: Sébastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> 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. > > Note that adding `./' to the ditaa command does not change anything... > > --8<---------------cut here---------------start------------->8--- > #+begin_ditaa ./communication.png -r -s 0.8 > --8<---------------cut here---------------end--------------->8--- > > What can I do to have the resulting graphic local to the Org file? Hi Seb, That's not how my version of org-mode works. My exported communication.png 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 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 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? -Bernt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DiTAA graph not in local directory 2009-11-06 15:06 ` Bernt Hansen @ 2009-11-09 9:34 ` Sébastien Vauban 2009-11-09 14:37 ` Bernt Hansen 0 siblings, 1 reply; 8+ messages in thread From: Sébastien Vauban @ 2009-11-09 9:34 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Bernt & Carsten, Carsten wrote: > Bernt Hansen wrote: >> Sébastien 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.png >> 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 ;-) >> 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 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--- 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 easy 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 buffer. 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 -- Sébastien 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DiTAA graph not in local directory 2009-11-09 9:34 ` Sébastien Vauban @ 2009-11-09 14:37 ` Bernt Hansen 2009-11-10 9:01 ` Sébastien Vauban 0 siblings, 1 reply; 8+ messages in thread From: Bernt Hansen @ 2009-11-09 14:37 UTC (permalink / raw) To: Sébastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes: > Hi Bernt & Carsten, > > Carsten wrote: >> Bernt Hansen wrote: >>> Sébastien 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.png >>> 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 ;-) > > >>> 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--- 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. > 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 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--- > > 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 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 -Bernt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DiTAA graph not in local directory 2009-11-09 14:37 ` Bernt Hansen @ 2009-11-10 9:01 ` Sébastien Vauban 2009-11-10 12:41 ` Bernt Hansen 0 siblings, 1 reply; 8+ messages in thread From: Sébastien Vauban @ 2009-11-10 9:01 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ Hi Bernt, Bernt Hansen wrote: > Sébastien Vauban writes: >> Carsten wrote: >>> Bernt Hansen wrote: >>>> Sébastien Vauban writes: >>>> >>>>> I try to generate the following DiTAA graph for LaTeX inclusion. >>>>> >>>>> It's in my Org file `~/dir1/dir2/ecm.org'. >>>>> >>>>> When exporting to LaTeX, the image is well generated, but in my `~/' >>>>> directory. Not in `~/dir1/dir2/', hence not found by LaTeX. >>>> >>>> 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--- > > 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 for 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 "easily" 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 "/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 and the .png from Ditaa) are stored in `~/'. Ununderstandable... Best regards, Seb -- Sébastien 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DiTAA graph not in local directory 2009-11-10 9:01 ` Sébastien Vauban @ 2009-11-10 12:41 ` Bernt Hansen [not found] ` <87iqdiys4s.fsf@gmx.de> 0 siblings, 1 reply; 8+ messages in thread From: Bernt Hansen @ 2009-11-10 12:41 UTC (permalink / raw) To: Sébastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes: > Hi Bernt, > > Bernt Hansen wrote: >> Sébastien 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 for 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 "easily" > 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 > "/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 and 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$ `---- 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <87iqdiys4s.fsf@gmx.de>]
* Re: Re: DiTAA graph not in local directory [not found] ` <87iqdiys4s.fsf@gmx.de> @ 2009-11-10 21:55 ` Bernt Hansen 0 siblings, 0 replies; 8+ messages in thread From: Bernt Hansen @ 2009-11-10 21:55 UTC (permalink / raw) To: Sebastian Rose; +Cc: public-emacs-orgmode-mXXj517/zsQ, Sébastien Vauban Sebastian Rose <sebastian_rose@gmx.de> writes: > `org-reload' changes the buffers `default-directory' to the directory > Org's *.el files are located. I've sent a bug report to that concern. > > If I do `M-x org-reload' and then `C-c C-e p', the LaTeX/PDF export > failes and all the LaTeX fallout ends up in > ~/emacs/lisp/ext/org-mode/. > > Restarting emacs helps. > > > Might that be related somhow? Yes that looks like a bug. I do org-reload too but normally I open the file I'm working on _after_ that so I never noticed. org-reload probably needs to be fixed. -Bernt ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: DiTAA graph not in local directory 2009-11-06 14:31 DiTAA graph not in local directory Sébastien Vauban 2009-11-06 15:06 ` Bernt Hansen @ 2009-11-06 17:06 ` Carsten Dominik 1 sibling, 0 replies; 8+ messages in thread From: Carsten Dominik @ 2009-11-06 17:06 UTC (permalink / raw) To: Sébastien Vauban; +Cc: emacs-orgmode Hi Sebastian, 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? - Carsten On Nov 6, 2009, at 3:31 PM, Sébastien Vauban wrote: > Hi, > > 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. > > Note that adding `./' to the ditaa command does not change anything... > > --8<---------------cut here---------------start------------->8--- > #+begin_ditaa ./communication.png -r -s 0.8 > --8<---------------cut here---------------end--------------->8--- > > What can I do to have the resulting graphic local to the Org file? > > Best regards, > Seb > > -- > Sébastien Vauban > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-11-10 21:55 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-06 14:31 DiTAA graph not in local directory Sébastien Vauban 2009-11-06 15:06 ` Bernt Hansen 2009-11-09 9:34 ` Sébastien Vauban 2009-11-09 14:37 ` Bernt Hansen 2009-11-10 9:01 ` Sébastien Vauban 2009-11-10 12:41 ` Bernt Hansen [not found] ` <87iqdiys4s.fsf@gmx.de> 2009-11-10 21:55 ` Bernt Hansen 2009-11-06 17:06 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).