emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.com>
To: kmartino@pobox.com
Cc: emacs-orgmode@gnu.org, carsten.dominik@gmail.com
Subject: Re: One org file, multiple exports, is it possible?
Date: Sun, 23 May 2010 08:49:27 -1000	[thread overview]
Message-ID: <6B0AFD3C-BF59-4DB6-823F-471107A380F4@tsdye.com> (raw)
In-Reply-To: <AANLkTimQ1HGjo0oFkKNQIfh-A6hpbCOwJaHy94RHxo_1@mail.gmail.com>

Aloha all,

Karl's setup specified keyword arguments for :select-tags but not  
for :exclude-tags.  When I tried this setup with only :select-tags it  
worked as expected for the select tag that occurs first in the Org- 
mode file, but the publishing project defined for the select tag that  
occurs second in the Org-mode file did not work as expected. In this  
case, trees with both select tags appear in the output file.

I solved my problem by also specifying exclude tags.

Here is the setup that worked for me.

-------- .emacs fragment ----------

   (add-to-list 'org-publish-project-alist
                '("work"
                  :base-directory "~/org/temp/"
                  :base-extension "org"
                  :publishing-directory "~/org/temp/publish-work/"
                  :publishing-function org-publish-org-to-latex
                  :select-tags     ("@WORK")
                  :exclude-tags ("@HOME")
                  :title "Work Notes"
                  :include ("index.org")
                  :exclude "\\.org$"
                  ))

   (add-to-list 'org-publish-project-alist
                '("home"
                  :base-directory "~/org/temp/"
                  :base-extension "org"
                  :publishing-directory "~/org/temp/publish-home/"
                  :publishing-function org-publish-org-to-latex
                  :select-tags     ("@HOME")
                  :exclude-tags ("@WORK")
                  :title "Home Phone"
                  :include ("index.org")
                  :exclude "\\.org$"
                  ))

-------- .emacs fragment ----------

-------- org-mode file ----------
* Work  
notes                                                          :@WORK:
This should end up in publish-work.

* Home  
notes                                                          :@HOME:
This should end up in publish-home.
-------- org-mode file ----------

I'm wondering, is it really possible to get the expected results  
specifying only select tags and not exclude tags?

All the best,
Tom

On May 23, 2010, at 6:31 AM, Karl Martino wrote:

> Hi,
>
> Ah! This worked once I tried this tip Carsten - thanks!  I should have
> realized that the buffer setting was defeating that there.
>
>> You should *not* have a #+TITLE line in the buffer, and you should  
>> *not*
>> have  subtree marked - then :title is used.
>
> Eric, thanks for the tip as well.  I will check out org-jekyll even
> though this worked because producing a blog or some kind of knowledge
> base from my single-org-mode-life-file sounds great :)
>
> Thanks,
>
> Karl
>
> On Sun, May 23, 2010 at 12:17 PM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>>
>> On May 23, 2010, at 2:22 PM, Karl Martino wrote:
>>
>>> Hi Carsten,
>>>
>>> Thanks for help, unfortunately I tried ":title" and it is ignored.
>>
>> No, it does in fact work, I just tested it.  Here is the setup I  
>> used:
>>
>> (setq org-publish-project-alist
>>      '(("ttt"
>>         :base-directory "~/lib/emacs/work/org-mode/t/pub/src"
>>         :base-extension "org"
>>         :publishing-directory "~/lib/emacs/work/org-mode/t/pub/ 
>> target"
>>         :section-numbers nil
>>         :table-of-contents nil
>>         ;;      :plain-source t
>>         ;;      :htmlized-source t
>>         :exclude "-source"
>>         :title "Test :title property"
>>         :auto-sitemap t
>>         :makeindex t
>>         :publishing-function (org-publish-org-to-html
>> org-publish-org-to-org))))
>>
>> You should *not* have a #+TITLE line in the buffer, and you should  
>> *not*
>> have  subtree marked - then :title is used.
>>
>>
>> - Carsten
>>
>>>
>>> The issue with #+TITLE in the buffer is that it is the same file I  
>>> am
>>> exporting various times, just with different tag filters, and the
>>> title then remains the same for each export, where I want it to
>>> reflect the subset of the file, ie Karl's Work Journal, or Karl's  
>>> Home
>>> Journal.
>>>
>>> A workaround that just occurred to me:
>>>
>>> I could write a method that would change the #+TITLE value in the
>>> buffer, then org-reload, before exporting the component in the list.
>>> That should work.
>>>
>>> But am I missing something?
>>>
>>> Thanks again, org-mode is fantastic and has helped me wrangle a  
>>> lot of
>>> complexity into something portable and easy to use.  It's been a
>>> lifesaver for me :)
>>>
>>> Thanks,
>>>
>>> Karl
>>>
>>>>> (setq org-publish-project-alist
>>>>>     '(
>>>>>       ("highlights"
>>>>>        :base-directory "~/notes/org/"
>>>>>        :base-extension "org"
>>>>>        :publishing-directory "~/notes/export"
>>>>>        :publishing-function org-publish-org-to-html
>>>>>        :select-tags     ("highlight")
>>>>>        :include ("index.org")
>>>>
>>>> I have not tried it, but if you do not have #+TITLE in the buffer,
>>>> then
>>>>          :title "This is my title"
>>>>
>>>> in the publishing plist might work.  Give it a try.
>>>>
>>>> - Carsten
>>>>
>>>>>        )
>>>>>       ("work"
>>>>>        :base-directory "~/notes/org/"
>>>>>        :base-extension "org"
>>>>>        :publishing-directory "~/notes/export/work/"
>>>>>        :publishing-function org-publish-org-to-html
>>>>>        :select-tags     ("@WORK")
>>>>>        :include ("index.org")
>>>>>        :exclude "\\.org$"
>>>>>        )
>>>>>       ("home"
>>>>>        :base-directory "~/notes/org/"
>>>>>        :base-extension "org"
>>>>>        :publishing-directory "~/notes/export/home/"
>>>>>        :publishing-function org-publish-org-to-html
>>>>>        :select-tags     ("@HOME")
>>>>>        :include ("index.org")
>>>>>        :exclude "\\.org$"
>>>>>        :link-up
>>>>>        )
>>>>>       ))
>>>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> - Carsten
>>
>>
>>
>>
>
>
>
> -- 
> "Seek First to Understand, Then to be Understood” - Steven Covey
>
> www.paradox1x.org, www.phillyfuture.org, @kmartino
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2010-05-23 18:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-22 23:46 One org file, multiple exports, is it possible? Karl Martino
2010-05-23  0:47 ` Karl Martino
2010-05-23  4:59 ` Carsten Dominik
2010-05-23 12:22   ` Karl Martino
2010-05-23 15:58     ` Eric Schulte
2010-05-23 16:17     ` Carsten Dominik
2010-05-23 16:31       ` Karl Martino
2010-05-23 18:49         ` Thomas S. Dye [this message]
2010-05-23 20:57           ` Carsten Dominik
2010-05-23 22:01             ` Thomas S. Dye
2010-05-24  5:20               ` Carsten Dominik
2010-05-24 16:36                 ` Thomas S. Dye
2010-05-25  3:38                 ` Thomas S. Dye
2010-05-25  3:50                   ` Bernt Hansen
2010-05-25 16:20                     ` Thomas S. Dye
2010-05-25 16:52                       ` Nick Dokos
2010-05-25 17:51                         ` Thomas S. Dye
2010-05-28  3:40                         ` Thomas S. Dye
2010-05-25 17:26                       ` Mark Elston
2010-05-25 17:53                         ` Thomas S. Dye
2010-05-26 18:42                     ` Thomas S. Dye
2010-05-26 21:37                       ` Nick Dokos
2010-05-26 22:28                         ` Thomas S. Dye
2010-05-27  1:40                           ` Nick Dokos

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=6B0AFD3C-BF59-4DB6-823F-471107A380F4@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kmartino@pobox.com \
    /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).