From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: One org file, multiple exports, is it possible? Date: Mon, 24 May 2010 17:38:06 -1000 Message-ID: <646DB2B5-DFE0-422F-BD11-AA2117E76644@tsdye.com> References: <855B9DE3-A7FD-42B4-A863-DE036065EBD1@gmail.com> <6B0AFD3C-BF59-4DB6-823F-471107A380F4@tsdye.com> <81206149-B01D-4837-A7A5-0ABF94920FE1@gmail.com> <56FE52EC-18B8-46FE-B0B8-266DE70E0A38@tsdye.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=36037 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGky9-0004Cf-EQ for emacs-orgmode@gnu.org; Mon, 24 May 2010 23:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGky5-0006Ly-Hh for emacs-orgmode@gnu.org; Mon, 24 May 2010 23:38:15 -0400 Received: from oproxy2-pub.bluehost.com ([67.222.39.60]:51670) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OGky5-0006Lm-3y for emacs-orgmode@gnu.org; Mon, 24 May 2010 23:38:13 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: kmartino@pobox.com, emacs-orgmode@gnu.org Aloha Carsten, I think I need to know what is meant by "minimal .emacs." I've poked around quite a bit now and have discovered two things: 1) Two lines in Karl's org-publish-project-alist triggered the =20 unexpected behavior. These are the lines with the :include =20 and :exclude keywords. 2) The unexpected behavior only occurs when org-publish-project-alist =20= also contains a project of the form ("project-name" :components =20 ("project-name" "project-name" ...)). Here, I've only checked the =20 situation where the offending project involves sub-projects that are =20 not Karl's. I have two reservations about putting together a "minimal .emacs": 1) I'm using Eric Schulte's literate emacs starter kit, so my =20 initialization files are split up into many parts, only two of which I =20= fiddle with. I'm happily ignorant of what goes on before my two org =20 configuration files get processed by Eric's code. 2) The org-publish-project-alist variable in my configuration contains =20= paths that are (probably) unique to my system. That said, if a minimal .emacs is required, please give me some =20 direction and I'll do what I can. All the best, Tom On May 23, 2010, at 7:20 PM, Carsten Dominik wrote: > > On May 24, 2010, at 12:01 AM, Thomas S. Dye wrote: > >> Thanks Carsten, >> >> That was it. It works with just the select tags here, too. >> >> One more query. I get different export results depending on where =20= >> I specify the select tag. Given the following org-mode file, =20 >> specifying the select tag in the file header with #=20 >> +EXPORT_SELECT_TAGS: @WORK exports only the tree tagged with @WORK, =20= >> but specifying the select tag in the publishing setup with :select-=20= >> tags ("@WORK"), and without any specification in the file header, =20 >> exports two trees, the first untagged tree and the tree tagged with =20= >> @WORK. >> >> Is this the expected behavior? > > Of course not. And I cannot reproduce it either. Maybe you need to =20= > make me an exact test case, with minimal .emacs, and both testcase =20 > files. Make it as a zip archive, so that I am sure I have the same =20= > amount of whitespace at the beginning of the files etc. > > Thanks. > > - Carsten > >> >> ---------- org file ------------- >> >> * Untagged notes before tags >> Where do these go? >> >> * Work =20 >> notes=20 >> :@WORK: >> This should end up somewhere. >> >> * Home =20 >> notes=20 >> :@HOME: >> This should end up somewhere else. >> >> ---------- org file ------------- >> >> All the best, >> Tom >> >> On May 23, 2010, at 10:57 AM, Carsten Dominik wrote: >> >>> >>> On May 23, 2010, at 8:49 PM, Thomas S. Dye wrote: >>> >>>> Aloha all, >>>> >>>> Karl's setup specified keyword arguments for :select-tags but not =20= >>>> for :exclude-tags. When I tried this setup with only :select-=20 >>>> tags it worked as expected for the select tag that occurs first =20 >>>> in the Org-mode file, but the publishing project defined for the =20= >>>> select tag that occurs second in the Org-mode file did not work =20 >>>> as expected. In this case, trees with both select tags appear in =20= >>>> 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 =20 >>>> notes=20 >>>> :@WORK: >>>> This should end up in publish-work. >>>> >>>> * Home =20 >>>> notes=20 >>>> :@HOME: >>>> This should end up in publish-home. >>>> -------- org-mode file ---------- >>>> >>>> I'm wondering, is it really possible to get the expected results =20= >>>> specifying only select tags and not exclude tags? >>> >>> Works perfectly fine for me! >>> >>> Note that changing the publishing alist does not trigger =20 >>> republishing. Use C-u with the publishing command... >>> >>> - Carsten >>> >>> >>>> >>>> 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 =20 >>>>> should have >>>>> realized that the buffer setting was defeating that there. >>>>> >>>>>> You should *not* have a #+TITLE line in the buffer, and you =20 >>>>>> should *not* >>>>>> have subtree marked - then :title is used. >>>>> >>>>> Eric, thanks for the tip as well. I will check out org-jekyll =20 >>>>> even >>>>> though this worked because producing a blog or some kind of =20 >>>>> knowledge >>>>> base from my single-org-mode-life-file sounds great :) >>>>> >>>>> Thanks, >>>>> >>>>> Karl >>>>> >>>>> On Sun, May 23, 2010 at 12:17 PM, Carsten Dominik >>>>> wrote: >>>>>> >>>>>> On May 23, 2010, at 2:22 PM, Karl Martino wrote: >>>>>> >>>>>>> Hi Carsten, >>>>>>> >>>>>>> Thanks for help, unfortunately I tried ":title" and it is =20 >>>>>>> ignored. >>>>>> >>>>>> No, it does in fact work, I just tested it. Here is the setup =20= >>>>>> 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/=20 >>>>>> 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 =20 >>>>>> should *not* >>>>>> have subtree marked - then :title is used. >>>>>> >>>>>> >>>>>> - Carsten >>>>>> >>>>>>> >>>>>>> The issue with #+TITLE in the buffer is that it is the same =20 >>>>>>> file I am >>>>>>> exporting various times, just with different tag filters, and =20= >>>>>>> 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 =20 >>>>>>> Karl's Home >>>>>>> Journal. >>>>>>> >>>>>>> A workaround that just occurred to me: >>>>>>> >>>>>>> I could write a method that would change the #+TITLE value in =20= >>>>>>> the >>>>>>> buffer, then org-reload, before exporting the component in the =20= >>>>>>> list. >>>>>>> That should work. >>>>>>> >>>>>>> But am I missing something? >>>>>>> >>>>>>> Thanks again, org-mode is fantastic and has helped me wrangle =20= >>>>>>> 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 =20 >>>>>>>> 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 >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> --=20 >>>>> "Seek First to Understand, Then to be Understood=94 - 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 >>>> >>> >>> - Carsten >>> >>> >>> >> > > - Carsten > > >