emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Subtree export problems
Date: Sun, 07 Feb 2016 01:14:51 +0100	[thread overview]
Message-ID: <87oabtxtok.fsf@gmx.us> (raw)
In-Reply-To: m2zivdh26q.fsf@tsdye.com

Hi Tom,

Thomas S. Dye <tsd@tsdye.com> writes:

>> How could it do anything else?  Try to narrow to the subtree 
>> and  run your code (see also org-export-as and how subtree 
>> export  works; it narrows).  You will see that your code 
>> returns nil. 
> 
> Interesting, thanks, that makes sense.  So, IIUC narrowing puts 
> the "keywords" at the top of the buffer out of scope.

I agree.

> I fiddled around a bit and came up with this, which seems to 
> work: ... 

Cool!  Perhaps something like org-with-wide-buffer would allow you 
to recapture your keywords/properties.  Otherwise you might be 
able to add a λ to org-export-before-processing-hook to add your 
own known keywords/properties to each headline.

>> You are using a hack to use something that you think looks like 
>> a  Org keyword, but which is not (in particular it’s unknown to 
>> ox  backends).  I think you can check 
>> org-export-get-environment and  org-export-define-backend to 
>> appreciate this. 
> 
> Am I right that what John Kitchin's code (jk-org-kwd) refers to 
> as "keyword" should be called "property" instead?  This makes 
> more sense to me in light of the above. 

Probably.  But it was formatted as a keyword (i.e. #+KEYWORD:).
 
> Also, I don't understand what you mean by "hack".  Should I be 
> wary of using John's functions?  I find them handy to mark bits 
> of information that the user (usually me) might want to change. 
> They save the need to rummage around a long document to find 
> where the information is actually used.  Should I use other 
> functions instead? 

I’d say "no".  I rely on plenty of hacks in my own documents (13 
filters in my standard Makefile conf.el).  There's nothing wrong 
with that as long as you know that you are playing with the fire. 
In this case you need to worry about the scope.  Probably other 
pitfalls exist.

Rasmus

-- 
When in doubt, do it!

      reply	other threads:[~2016-02-07  0:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06  0:34 Subtree export problems Thomas S. Dye
2016-02-06 14:17 ` Rasmus
2016-02-06 22:08   ` Aaron Ecay
2016-02-06 22:24     ` Rasmus
2016-02-06 23:39     ` Thomas S. Dye
2016-02-06 23:03   ` Thomas S. Dye
2016-02-07  0:14     ` Rasmus [this message]

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=87oabtxtok.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).