emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Inconsistent behaviour when #+setupfile is used recursively
@ 2011-07-13  7:49 Stefan Vollmar
  2011-07-25 13:46 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Vollmar @ 2011-07-13  7:49 UTC (permalink / raw)
  To: emacs-orgmode Mode

[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]

Hi,

we use Org-mode for software documentation and have come across the following behaviour with version 7.6 (release_7.6.71.g22fa9):

our documentation is located in the directory doc/usage, e.g. doc/usage/index.org or doc/usage/tutorial.org, whereas Org-Mode's setupfiles are stored in doc/common/org, e.g. doc/common/org/setup-toc-large or doc/common/org/setup-common. When we include a setupfile from doc/usage/index.org using

#+setupfile: ../common/org/setup-toc-large

everything works fine. The path of the setupfile is relative to the path of index.org.

However, when setup-toc-large itself includes another setupfile with setup-common using a relative path, the path is still treated as relative to index.org, not relative to setup-toc-large. Therefore, when using the line

#+setupfile: setup-common

within setup-toc-large, Org-Mode fails to find setup-common. When changing the above line to

#+setupfile: ../common/org/setup-common

the documentation builds successfully. 

We would expect Org-mode to search for an include file relative to the file that contains the setupfile-statement. Maybe a simple solution would be to temporarily set the current working dir to the path of the including file (around line 17620 in org.el)? Many thanks in advance!

Warm regards,
 Stefan
-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
E-Mail: vollmar@nf.mpg.de   http://www.nf.mpg.de








[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4409 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Inconsistent behaviour when #+setupfile is used recursively
  2011-07-13  7:49 Inconsistent behaviour when #+setupfile is used recursively Stefan Vollmar
@ 2011-07-25 13:46 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2011-07-25 13:46 UTC (permalink / raw)
  To: Stefan Vollmar; +Cc: emacs-orgmode Mode

Hi Stefan,

Stefan Vollmar <vollmar@nf.mpg.de> writes:

> we use Org-mode for software documentation and have come across the
> following behaviour with version 7.6 (release_7.6.71.g22fa9):
>
> our documentation is located in the directory doc/usage,
> e.g. doc/usage/index.org or doc/usage/tutorial.org, whereas Org-Mode's
> setupfiles are stored in doc/common/org,
> e.g. doc/common/org/setup-toc-large or doc/common/org/setup-common. When we
> include a setupfile from doc/usage/index.org using
>
> #+setupfile: ../common/org/setup-toc-large
>
> everything works fine. The path of the setupfile is relative to the path of index.org.
>
> However, when setup-toc-large itself includes another setupfile with
> setup-common using a relative path, the path is still treated as relative
> to index.org, not relative to setup-toc-large. Therefore, when using the
> line
>
> #+setupfile: setup-common
>
> within setup-toc-large, Org-Mode fails to find setup-common. 

This is fixed in latest git.  Thanks for signaling this bug.

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-25 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13  7:49 Inconsistent behaviour when #+setupfile is used recursively Stefan Vollmar
2011-07-25 13:46 ` Bastien

Code repositories for project(s) associated with this 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).