From mboxrd@z Thu Jan 1 00:00:00 1970 From: gvoysey Subject: Bug: relative paths for links not preserved with #+INCLUDE [9.1.6 (release_9.1.6-419-g4b2006 @ /Users/gvoysey/.emacs.d/straight/build/org/)] Date: Mon, 25 Jun 2018 23:17:23 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXeUB-0007qB-14 for emacs-orgmode@gnu.org; Mon, 25 Jun 2018 23:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXeU7-0000C2-RA for emacs-orgmode@gnu.org; Mon, 25 Jun 2018 23:17:42 -0400 Received: from relay68.bu.edu ([128.197.228.73]:44069) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fXeU7-0000Bu-La for emacs-orgmode@gnu.org; Mon, 25 Jun 2018 23:17:39 -0400 Received: from BU-AUTH (localhost.localdomain [127.0.0.1]) (authenticated bits=0) by relay68.bu.edu (8.14.3/8.14.3) with ESMTP id w5Q3HOS5014490 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK) for ; Mon, 25 Jun 2018 23:17:25 -0400 Received: by mail-lf0-f50.google.com with SMTP id a4-v6so5459859lff.5 for ; Mon, 25 Jun 2018 20:17:25 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org I use org as my lab notebook. Fairly often, I include figures and plots. I have the following style of file structure: Project =E2=94=9C=E2=94=80=E2=94=80 project.org =E2=94=94=E2=94=80=E2=94=80 subproject =E2=94=9C=E2=94=80=E2=94=80 figures =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 foo.png =E2=94=94=E2=94=80=E2=94=80 subproject.org I have been using #+INCLUDE to "lift" subproject.org up into project.org as a subheading, so I can export the whole thing at once. so project.org looks like: #+begin_src org * project here are my notes #+INCLUDE: "./subproject/subproject.org" #+end_src and subproject: #+begin_src org * notes see this plot: [[./figures/foo.png]] #+CAPTION: a cool figure. #+end_src When I export =3Dproject.org=3D as HTML or LaTeX, the figures are not included. When I instead export =3Dsubproject.org=3D directly, they are. Is there a way to insert file links to specify "relative to exactly this file no matter where you've found yourself", or is #+INCLUDE mangling filepaths kind of unavoidable? If the latter, what's the recommended course of action here? Emacs : GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511)) of 2018-05-28 Package: Org mode version 9.1.6 (release_9.1.6-419-g4b2006 @ /Users/gvoysey/.emacs.d/straight/build/org/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-fontify-whole-heading-line t org-after-todo-state-change-hook '(org-clock-out-if-current) org-latex-listings 'minted org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-odt-format-headline-function 'org-odt-format-headline-default-function org-latex-pdf-process '("%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f") org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-mode-hook '(toc-org-enable org-tempo-setup #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes (lambda nil (add-hook (quote before-save-hook) (quote org-mode--ensure-one-blank-line) nil (quote make-it-local)) ) turn-on-auto-fill org-bullets-mode org-indent-mode) org-export-with-smart-quotes t org-odt-format-drawer-function '(closure (hfy-user-sheet-assoc hfy-html-quote-regex hfy-html-quote-map hfy-face-to-css hfy-begin-span-handler hfy-end-span-handler archive-zip-extract nxml-auto-insert-xml-declaration-flag t) (_name contents) contents) org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function nil org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-latex-format-drawer-function '(closure (t) (_ contents) contents) org-babel-pre-tangle-hook '(save-buffer) org-latex-compiler "xelatex" org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-babel-load-languages '((shell . t) (emacs-lisp . t)) org-hide-emphasis-markers t org-ascii-format-drawer-function '(closure (t) (_name contents _width) contents) org-ellipsis " =E2=96=BF" org-occur-hook '(org-first-headline-recenter) org-agenda-mode-hook '((lambda nil (setq org-agenda-tags-column (- (window-width))))) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lin= es org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-tags-column -101 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-func= tion org-confirm-shell-link-function nil org-link-parameters '(("id" :follow org-id-open) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-lin= k) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-= link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs") ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link) ("file" :complete org-file-complete-link) ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path)))) ("help" :follow org--open-help-link) ("http" :follow (lambda (path) (browse-url (concat "http:" path)))) ("https" :follow (lambda (path) (browse-url (concat "https:" path)))) ("mailto" :follow (lambda (path) (browse-url (concat "mailto:" path)))) ("news" :follow (lambda (path) (browse-url (concat "news:" path)))) ("shell" :follow org--open-shell-link)) org-latex-format-headline-function 'org-latex-format-headline-default-func= tion org-agenda-block-separator "" org-link-translation-function 'toc-org-unhrefify org-capture-after-finalize-hook '(org-capture-goto-last-stored) org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function org-tab-before-tab-emulation-hook '(tempo-complete-tag) org-html-format-drawer-function '(closure (htmlize-buffer-places org-html-format-table-no-css t) (_name contents) contents) org-latex-packages-alist '(("" "minted")) org-html-format-headline-function 'org-html-format-headline-default-functi= on org-confirm-babel-evaluate nil org-default-notes-file "/Users/gvoysey/org/notes.org" org-latex-minted-options '(("breaklines" "true") ("breakanywhere" "true") ("fontsize" "\\small")) )