all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Hansen <rhansen@bbn.com>
To: emacs-orgmode@gnu.org
Cc: Richard Hansen <rhansen@bbn.com>
Subject: [PATCH 1/2] test INCLUDE pathname expansion with subdirectories
Date: Thu, 24 Sep 2015 18:20:40 -0400	[thread overview]
Message-ID: <1443133241-501-1-git-send-email-rhansen@bbn.com> (raw)
In-Reply-To: <56047142.1060404@bbn.com>

* lisp/test-ox.el (test-org-export/expand-include): Modify the
INCLUDE test to ensure that a.org including subdir/b.org including
c.org causes subdir/c.org to be read, not c.org.

TINYCHANGE
---
 testing/examples/include.org                    | 2 +-
 testing/examples/{include2.org => include3.org} | 0
 testing/examples/subdir/include2.org            | 1 +
 testing/lisp/test-ox.el                         | 8 ++++----
 4 files changed, 6 insertions(+), 5 deletions(-)
 rename testing/examples/{include2.org => include3.org} (100%)
 create mode 100644 testing/examples/subdir/include2.org

diff --git a/testing/examples/include.org b/testing/examples/include.org
index f4dcc20..7122716 100644
--- a/testing/examples/include.org
+++ b/testing/examples/include.org
@@ -4,7 +4,7 @@ Small Org file with an include keyword.
 (+ 2 1)
 #+END_SRC
 
-#+INCLUDE: "include2.org"
+#+INCLUDE: "subdir/include2.org"
 
 * Heading
 body
diff --git a/testing/examples/include2.org b/testing/examples/include3.org
similarity index 100%
rename from testing/examples/include2.org
rename to testing/examples/include3.org
diff --git a/testing/examples/subdir/include2.org b/testing/examples/subdir/include2.org
new file mode 100644
index 0000000..68df86e
--- /dev/null
+++ b/testing/examples/subdir/include2.org
@@ -0,0 +1 @@
+#+INCLUDE: "../include3.org"
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index ccffa89..1af5c21 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -925,7 +925,7 @@ text
       (insert-file
        (expand-file-name "examples/include.org" org-test-dir))
       (replace-regexp-in-string
-       (regexp-quote "#+INCLUDE: \"include2.org\"")
+       (regexp-quote "#+INCLUDE: \"subdir/include2.org\"")
        "Success!" (buffer-string)))
     (org-test-with-temp-text
 	(format "#+INCLUDE: \"%s/examples/include.org\"" org-test-dir)
@@ -992,7 +992,7 @@ text
     "#+BEGIN_CENTER\nSuccess!\n#+END_CENTER\n"
     (org-test-with-temp-text
 	(format
-	 "#+INCLUDE: \"%s/examples/include2.org\" CENTER"
+	 "#+INCLUDE: \"%s/examples/include3.org\" CENTER"
 	 org-test-dir)
       (org-export-expand-include-keyword)
       (buffer-string))))
@@ -1132,11 +1132,11 @@ Footnotes[fn:2], foot[fn:test], digit only[3], and [fn:inline:anonymous footnote
   (should-not
    (equal
     (org-test-with-temp-text
-	(format "#+INCLUDE: \"%s/examples/include2.org\" src emacs-lisp" org-test-dir)
+	(format "#+INCLUDE: \"%s/examples/include3.org\" src emacs-lisp" org-test-dir)
       (org-export-expand-include-keyword)
       (buffer-string))
     (org-test-with-temp-text
-	(format "#+INCLUDE: \"%s/examples/include2.org\" src emacs-lisp :minlevel 1" org-test-dir)
+	(format "#+INCLUDE: \"%s/examples/include3.org\" src emacs-lisp :minlevel 1" org-test-dir)
       (org-export-expand-include-keyword)
       (buffer-string))))
   ;; INCLUDE assigns the relative :minlevel conditional on narrowing.
-- 
2.5.3

  reply	other threads:[~2015-09-24 22:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-19  0:22 [PATCH] fix SETUPFILE pathname expansion with subdirectories Richard Hansen
2015-09-19  8:16 ` Nicolas Goaziou
2015-09-19 20:18   ` Richard Hansen
2015-09-19 22:07   ` [PATCH v2] " Richard Hansen
2015-09-19 22:43     ` Kyle Meyer
2015-09-19 23:14       ` Richard Hansen
2015-09-20  5:07         ` Kyle Meyer
2015-09-20  5:28           ` [PATCH v3] " Richard Hansen
2015-09-22 22:28             ` Richard Hansen
2015-09-24  8:22               ` Nicolas Goaziou
2015-09-24 21:55                 ` Richard Hansen
2015-09-24 22:20                   ` Richard Hansen [this message]
2015-09-24 22:20                     ` [PATCH 2/2] fix SETUPFILE pathname expansion from within an INCLUDE Richard Hansen
2015-09-25 11:58                       ` Nicolas Goaziou
2015-09-25 11:51                   ` [PATCH v3] fix SETUPFILE pathname expansion with subdirectories Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1443133241-501-1-git-send-email-rhansen@bbn.com \
    --to=rhansen@bbn.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.