emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Daniel P. Gomez" <gomez.danp@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug: Weird interaction between ox-extra and include :minlevel
Date: Thu, 12 Apr 2018 11:26:30 +0200	[thread overview]
Message-ID: <m2efjk3hdl.fsf@192.168.2.2> (raw)

Hi all,


TLDR: Using ox-extras :IGNORE: tags break #+INCLUDE :minlevel. 
Ideally ox-extras functionality could make it into ox.


I'm using Org Mode to structure my thesis, and one of the Org 
features that I rely on the most are the #+INCLUDE derivatives.

My setup is such that I have a main thesis.org file with the 
(simplified) following contents:

-- 
#+latexclass: thesis
#+setupfile: thesis.setup
#+exclude_tags: manuscript noexport

* Chapter 1
#+INCLUDE: chap1/chapter1.org :lines "3-"

etc..
--

And I have chapter files where, e.g., the Methods section is 
formatted differently whether it is included in the main body of 
the thesis or in a manuscript:
--
#+latexclass: manuscript
#+setupfile: manuscript.setup
#+exclude_tags: thesis noexport

etc..

# For thesis, include methods directly
* Methods :thesis:
#+INCLUDE: methods.org :lines "3-"


# For paper, wrap methods into a specific control sequence and 
  adjust headline levels.
* Methods :ignore:manuscript:

#+LATEX: \matmethods{
#+INCLUDE: methods.org :lines "3-" :minlevel 2
#+LATEX: }


* Insert Methods :ignore:manuscript:
#+LATEX: \showmatmethods{}
--

I don't know if this is the cleanest setup, but it works well for 
me because I get to reuse my files.
The one issue I have with this setup, is that besides relying on 
IGNORE tags, I also rely on :minlevel to adjust the headlines. 
However, because ox-extra promotes all subtrees, it breaks 
minlevel's functionality.

Would anyone have an idea on how to fix this? Is there any 
intention of bringing ox-extra functionality into main Org? 
Something like #+ignore_tags would be a powerful addition for fine 
grained export control, in my opinion.


Thank you

-- 
Daniel P. Gomez

             reply	other threads:[~2018-04-12  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12  9:26 Daniel P. Gomez [this message]
2018-04-12 13:28 ` Bug: Weird interaction between ox-extra and include :minlevel Nicolas Goaziou
2018-04-12 14:38   ` Daniel P Gomez
2018-04-15  7:44     ` 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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=m2efjk3hdl.fsf@192.168.2.2 \
    --to=gomez.danp@gmail.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 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).