* One org file, multiple exports, is it possible? @ 2010-05-22 23:46 Karl Martino 2010-05-23 0:47 ` Karl Martino 2010-05-23 4:59 ` Carsten Dominik 0 siblings, 2 replies; 24+ messages in thread From: Karl Martino @ 2010-05-22 23:46 UTC (permalink / raw) To: emacs-orgmode Hello, I am a long time org-mode user, this my first time posting to the email list, and before I ask my question I first want to say thanks to all those who are helping maintain and grow this terrific software. I maintain a single org-mode file with half my life in it. It contains my journal, my task list, contacts, and notes on various projects. I use tags to indicate what content is associated to what content. What I would like to do is publish multiple html exports of this file, filtered by tag. A file that comprises of journal entries that are tagged for work. Another with journal entries that are tagged as personal highlights I want to take special note of. This file's path is at ~/notes/org/index.org. I'd like to export the filtered version of this file to ~/notes/export/index.html ~/notes/export/index_[tagname].html and to change each filtered export's title. So far in my reading of the docs, this does not seem possible. It seems you cannot indicate the export result file name. But I can indicate path. So following is a sample org-publish-project-alist that that filters by tag and puts the result in different publishing directories. But I still can't figure out how to change the title on those exported pages. Can anyone provide me with any pointers? (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") ) ("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 ) )) I am using org-version 6.33f and Emacs 23.1.9 on OS-X. Thank you in advance, Karl -- "Seek First to Understand, Then to be Understood” - Steven Covey paradox1x.org, phillyfuture.org, @kmartino ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 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 1 sibling, 0 replies; 24+ messages in thread From: Karl Martino @ 2010-05-23 0:47 UTC (permalink / raw) To: emacs-orgmode Hello, I should have added, I realize that there are options to export separate subtrees using EXPORT_FILE_NAME and EXPORT_TITLE properties. I hope I described how this is similar to that but different. I a have content spread across subtrees I want to gather by tag and export using similar variables to these. I *could* reorganize my file to use seperate subtrees, but it seems a shame to do so since having an internal blog-like structure for my journal that I can filter by tag just maps real well to how I work and think. Thanks, Karl On Sat, May 22, 2010 at 7:46 PM, Karl Martino <kmartino@pobox.com> wrote: > Hello, > > I am a long time org-mode user, this my first time posting to the email list, > and before I ask my question I first want to say thanks to all those who are > helping maintain and grow this terrific software. > > I maintain a single org-mode file with half my life in it. It > contains my journal, my task list, contacts, and notes on various projects. I > use tags to indicate what content is associated to what content. > > What I would like to do is publish multiple html exports of this file, filtered > by tag. A file that comprises of journal entries that are tagged for > work. Another with journal entries that are tagged as personal highlights I want > to take special note of. > > This file's path is at ~/notes/org/index.org. I'd like to export the filtered > version of this file to ~/notes/export/index.html > ~/notes/export/index_[tagname].html and to change each filtered export's title. > > So far in my reading of the docs, this does not seem possible. It seems you > cannot indicate the export result file name. But I can indicate path. So > following is a sample org-publish-project-alist that that filters by tag and > puts the result in different publishing directories. But I still can't figure > out how to change the title on those exported pages. Can anyone provide me with > any pointers? > > (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") > ) > ("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 > ) > )) > > I am using org-version 6.33f and Emacs 23.1.9 on OS-X. > > Thank you in advance, > > Karl > > -- > "Seek First to Understand, Then to be Understood” - Steven Covey > > paradox1x.org, phillyfuture.org, @kmartino > -- "Seek First to Understand, Then to be Understood” - Steven Covey www.paradox1x.org, www.phillyfuture.org, @kmartino ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 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 1 sibling, 1 reply; 24+ messages in thread From: Carsten Dominik @ 2010-05-23 4:59 UTC (permalink / raw) To: kmartino; +Cc: emacs-orgmode On May 23, 2010, at 1:46 AM, Karl Martino wrote: > Hello, > > I am a long time org-mode user, this my first time posting to the > email list, > and before I ask my question I first want to say thanks to all those > who are > helping maintain and grow this terrific software. > > I maintain a single org-mode file with half my life in it. It > contains my journal, my task list, contacts, and notes on various > projects. I > use tags to indicate what content is associated to what content. > > What I would like to do is publish multiple html exports of this > file, filtered > by tag. A file that comprises of journal entries that are tagged for > work. Another with journal entries that are tagged as personal > highlights I want > to take special note of. > > This file's path is at ~/notes/org/index.org. I'd like to export > the filtered > version of this file to ~/notes/export/index.html > ~/notes/export/index_[tagname].html and to change each filtered > export's title. > > So far in my reading of the docs, this does not seem possible. It > seems you > cannot indicate the export result file name. But I can indicate > path. So > following is a sample org-publish-project-alist that that filters by > tag and > puts the result in different publishing directories. But I still > can't figure > out how to change the title on those exported pages. Can anyone > provide me with > any pointers? > > (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 > ) > )) > > I am using org-version 6.33f and Emacs 23.1.9 on OS-X. > > Thank you in advance, > > Karl > > -- > "Seek First to Understand, Then to be Understood” - Steven Covey > > paradox1x.org, 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 ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 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 0 siblings, 2 replies; 24+ messages in thread From: Karl Martino @ 2010-05-23 12:22 UTC (permalink / raw) To: emacs-orgmode Hi Carsten, Thanks for help, unfortunately I tried ":title" and it is ignored. 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 >> ) >> )) >> ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 2010-05-23 12:22 ` Karl Martino @ 2010-05-23 15:58 ` Eric Schulte 2010-05-23 16:17 ` Carsten Dominik 1 sibling, 0 replies; 24+ messages in thread From: Eric Schulte @ 2010-05-23 15:58 UTC (permalink / raw) To: kmartino; +Cc: emacs-orgmode Hi Karl, Maybe the following little function will work. If called from an org-mode file, it will try to export each subtree, respecting the values of EXPORT_FILE_NAME and EXPORT_TITLE. --8<---------------cut here---------------start------------->8--- (defun org-export-parts () (interactive) (org-map-entries (lambda () (outline-mark-subtree) (org-export-as-html nil)))) --8<---------------cut here---------------end--------------->8--- it shouldn't be difficult to augment the above to set exporting options based on the values of subtree tags. If this isn't sufficient, and you want really powerful templating of different classes of html files you could try out jekyll [1], and some of the org-jekyll solutions [2]. Hope this helps -- Eric Footnotes: [1] http://jekyllrb.com/ [2] http://orgmode.org/worg/org-tutorials/org-jekyll.php ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 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 1 sibling, 1 reply; 24+ messages in thread From: Carsten Dominik @ 2010-05-23 16:17 UTC (permalink / raw) To: kmartino; +Cc: emacs-orgmode 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 ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 2010-05-23 16:17 ` Carsten Dominik @ 2010-05-23 16:31 ` Karl Martino 2010-05-23 18:49 ` Thomas S. Dye 0 siblings, 1 reply; 24+ messages in thread From: Karl Martino @ 2010-05-23 16:31 UTC (permalink / raw) To: emacs-orgmode, carsten.dominik 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 ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 2010-05-23 16:31 ` Karl Martino @ 2010-05-23 18:49 ` Thomas S. Dye 2010-05-23 20:57 ` Carsten Dominik 0 siblings, 1 reply; 24+ messages in thread From: Thomas S. Dye @ 2010-05-23 18:49 UTC (permalink / raw) To: kmartino; +Cc: emacs-orgmode, carsten.dominik 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 ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 2010-05-23 18:49 ` Thomas S. Dye @ 2010-05-23 20:57 ` Carsten Dominik 2010-05-23 22:01 ` Thomas S. Dye 0 siblings, 1 reply; 24+ messages in thread From: Carsten Dominik @ 2010-05-23 20:57 UTC (permalink / raw) To: Thomas S. Dye; +Cc: kmartino, emacs-orgmode 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 > 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? Works perfectly fine for me! Note that changing the publishing alist does not trigger 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 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 > - Carsten ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 2010-05-23 20:57 ` Carsten Dominik @ 2010-05-23 22:01 ` Thomas S. Dye 2010-05-24 5:20 ` Carsten Dominik 0 siblings, 1 reply; 24+ messages in thread From: Thomas S. Dye @ 2010-05-23 22:01 UTC (permalink / raw) To: Carsten Dominik; +Cc: kmartino, emacs-orgmode 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 I specify the select tag. Given the following org-mode file, specifying the select tag in the file header with #+EXPORT_SELECT_TAGS: @WORK exports only the tree tagged with @WORK, but specifying the select tag in the publishing setup with :select-tags ("@WORK"), and without any specification in the file header, exports two trees, the first untagged tree and the tree tagged with @WORK. Is this the expected behavior? ---------- org file ------------- * Untagged notes before tags Where do these go? * Work notes :@WORK: This should end up somewhere. * Home notes :@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 >> 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? > > Works perfectly fine for me! > > Note that changing the publishing alist does not trigger > 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 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 >> > > - Carsten > > > ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 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 0 siblings, 2 replies; 24+ messages in thread From: Carsten Dominik @ 2010-05-24 5:20 UTC (permalink / raw) To: Thomas S. Dye; +Cc: kmartino, emacs-orgmode 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 I > specify the select tag. Given the following org-mode file, > specifying the select tag in the file header with # > +EXPORT_SELECT_TAGS: @WORK exports only the tree tagged with @WORK, > but specifying the select tag in the publishing setup with :select- > tags ("@WORK"), and without any specification in the file header, > exports two trees, the first untagged tree and the tree tagged with > @WORK. > > Is this the expected behavior? Of course not. And I cannot reproduce it either. Maybe you need to make me an exact test case, with minimal .emacs, and both testcase files. Make it as a zip archive, so that I am sure I have the same amount of whitespace at the beginning of the files etc. Thanks. - Carsten > > ---------- org file ------------- > > * Untagged notes before tags > Where do these go? > > * Work > notes :@WORK: > This should end up somewhere. > > * Home > notes :@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 >>> 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? >> >> Works perfectly fine for me! >> >> Note that changing the publishing alist does not trigger >> 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 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 >>> >> >> - Carsten >> >> >> > - Carsten ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 2010-05-24 5:20 ` Carsten Dominik @ 2010-05-24 16:36 ` Thomas S. Dye 2010-05-25 3:38 ` Thomas S. Dye 1 sibling, 0 replies; 24+ messages in thread From: Thomas S. Dye @ 2010-05-24 16:36 UTC (permalink / raw) To: Carsten Dominik; +Cc: kmartino, emacs-orgmode Aloha Carsten, Thanks for looking into this. I'm trying to document the different ways to export part of an org file to LaTeX in the hope of augmenting the tutorial on Worg. I thought I understood the tag selection logic, so the results I got puzzled me. Now that I know the expected behavior, I'll look more closely to see why I'm not getting it. Hopefully, I'll be able to puzzle it through myself and won't have to pester you and the list with my idea of a minimal .emacs, etc. I appreciate your offer to take another look if I'm not successful. 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 >> I specify the select tag. Given the following org-mode file, >> specifying the select tag in the file header with # >> +EXPORT_SELECT_TAGS: @WORK exports only the tree tagged with @WORK, >> but specifying the select tag in the publishing setup with :select- >> tags ("@WORK"), and without any specification in the file header, >> exports two trees, the first untagged tree and the tree tagged with >> @WORK. >> >> Is this the expected behavior? > > Of course not. And I cannot reproduce it either. Maybe you need to > make me an exact test case, with minimal .emacs, and both testcase > files. Make it as a zip archive, so that I am sure I have the same > amount of whitespace at the beginning of the files etc. > > Thanks. > > - Carsten > >> >> ---------- org file ------------- >> >> * Untagged notes before tags >> Where do these go? >> >> * Work >> notes >> :@WORK: >> This should end up somewhere. >> >> * Home >> notes >> :@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 >>>> 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? >>> >>> Works perfectly fine for me! >>> >>> Note that changing the publishing alist does not trigger >>> 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 >>>>> 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 >>>> >>> >>> - Carsten >>> >>> >>> >> > > - Carsten > > > ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 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 1 sibling, 1 reply; 24+ messages in thread From: Thomas S. Dye @ 2010-05-25 3:38 UTC (permalink / raw) To: Carsten Dominik; +Cc: kmartino, emacs-orgmode 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 unexpected behavior. These are the lines with the :include and :exclude keywords. 2) The unexpected behavior only occurs when org-publish-project-alist also contains a project of the form ("project-name" :components ("project-name" "project-name" ...)). Here, I've only checked the situation where the offending project involves sub-projects that are 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 initialization files are split up into many parts, only two of which I fiddle with. I'm happily ignorant of what goes on before my two org configuration files get processed by Eric's code. 2) The org-publish-project-alist variable in my configuration contains paths that are (probably) unique to my system. That said, if a minimal .emacs is required, please give me some 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 >> I specify the select tag. Given the following org-mode file, >> specifying the select tag in the file header with # >> +EXPORT_SELECT_TAGS: @WORK exports only the tree tagged with @WORK, >> but specifying the select tag in the publishing setup with :select- >> tags ("@WORK"), and without any specification in the file header, >> exports two trees, the first untagged tree and the tree tagged with >> @WORK. >> >> Is this the expected behavior? > > Of course not. And I cannot reproduce it either. Maybe you need to > make me an exact test case, with minimal .emacs, and both testcase > files. Make it as a zip archive, so that I am sure I have the same > amount of whitespace at the beginning of the files etc. > > Thanks. > > - Carsten > >> >> ---------- org file ------------- >> >> * Untagged notes before tags >> Where do these go? >> >> * Work >> notes >> :@WORK: >> This should end up somewhere. >> >> * Home >> notes >> :@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 >>>> 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? >>> >>> Works perfectly fine for me! >>> >>> Note that changing the publishing alist does not trigger >>> 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 >>>>> 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 >>>> >>> >>> - Carsten >>> >>> >>> >> > > - Carsten > > > ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 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-26 18:42 ` Thomas S. Dye 0 siblings, 2 replies; 24+ messages in thread From: Bernt Hansen @ 2010-05-25 3:50 UTC (permalink / raw) To: Thomas S. Dye; +Cc: kmartino, emacs-orgmode, Carsten Dominik "Thomas S. Dye" <tsd@tsdye.com> writes: > Aloha Carsten, > > I think I need to know what is meant by "minimal .emacs." I have a minimal.emacs which is a stripped down .emacs that only has what I need to invoke org-mode for reproducing a problem. ,----[ minimal.emacs ] | (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp")) | (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) | (setq org-agenda-files '("/tmp/test.org")) | (require 'org-install) | (require 'org-habit) | | (global-set-key "\C-cl" 'org-store-link) | (global-set-key "\C-ca" 'org-agenda) | (global-set-key "\C-cb" 'org-iswitchb) `---- and I load this with emacs -Q -l ~/minimal.emacs. I'll normally edit it to add whatever is needed to reproduce the problem in org-mode. Using a stripped down minimal .emacs files removes broken custom settings as the cause of the issue and makes it easy to reproduce for other people. HTH, Bernt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 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:26 ` Mark Elston 2010-05-26 18:42 ` Thomas S. Dye 1 sibling, 2 replies; 24+ messages in thread From: Thomas S. Dye @ 2010-05-25 16:20 UTC (permalink / raw) To: Bernt Hansen; +Cc: kmartino, emacs-orgmode, Carsten Dominik Thanks Bernt, So, "broken custom settings" appear to be the cause of the unexpected behavior. Two questions: 1) Do programmers have a name for this situation, where custom settings seemed to work perfectly for a long time but then failed noticeably with the introduction of new, correct code into the .emacs? 2) Is there a useful strategy for finding the minimal .emacs that illustrates the failure? I might have 100 customizations in the various starter kit configuration files. If combinations of customizations are a possibility, I'm looking at quite a bit of random experimentation without some kind of strategy. All the best, Tom On May 24, 2010, at 5:50 PM, Bernt Hansen wrote: > "Thomas S. Dye" <tsd@tsdye.com> writes: > >> Aloha Carsten, >> >> I think I need to know what is meant by "minimal .emacs." > > I have a minimal.emacs which is a stripped down .emacs that only has > what I need to invoke org-mode for reproducing a problem. > > ,----[ minimal.emacs ] > | (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp")) > | (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\) > $" . org-mode)) > | (setq org-agenda-files '("/tmp/test.org")) > | (require 'org-install) > | (require 'org-habit) > | > | (global-set-key "\C-cl" 'org-store-link) > | (global-set-key "\C-ca" 'org-agenda) > | (global-set-key "\C-cb" 'org-iswitchb) > `---- > > and I load this with emacs -Q -l ~/minimal.emacs. I'll normally > edit it > to add whatever is needed to reproduce the problem in org-mode. > > Using a stripped down minimal .emacs files removes broken custom > settings as the cause of the issue and makes it easy to reproduce for > other people. > > HTH, > Bernt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: One org file, multiple exports, is it possible? 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 1 sibling, 2 replies; 24+ messages in thread From: Nick Dokos @ 2010-05-25 16:52 UTC (permalink / raw) To: Thomas S. Dye Cc: kmartino, Bernt Hansen, nicholas.dokos, emacs-orgmode, Carsten Dominik Thomas S. Dye <tsd@tsdye.com> wrote: > Thanks Bernt, > > So, "broken custom settings" appear to be the cause of the unexpected > behavior. Two questions: > > 1) Do programmers have a name for this situation, where custom > settings seemed to work perfectly for a long time but then failed > noticeably with the introduction of new, correct code into the .emacs? > I don't think so. > 2) Is there a useful strategy for finding the minimal .emacs that > illustrates the failure? I might have 100 customizations in the > various starter kit configuration files. If combinations of > customizations are a possibility, I'm looking at quite a bit of random > experimentation without some kind of strategy. > Bisection is about the only reasonable strategy, short of oracular guesswork. I have a single .emacs that's (mostly) a sequence of (conditional) loads/requires of individual package config files. I just comment out the whole thing, verify correct operation, and then uncomment out the first/second half and try again. With 100 packages, 7 cycles will get you down to a single package and then you just do the same thing within the package config file. Given a reproducer that you can run in batch mode, this goes fairly quickly. HTH, Nick ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: One org file, multiple exports, is it possible? 2010-05-25 16:52 ` Nick Dokos @ 2010-05-25 17:51 ` Thomas S. Dye 2010-05-28 3:40 ` Thomas S. Dye 1 sibling, 0 replies; 24+ messages in thread From: Thomas S. Dye @ 2010-05-25 17:51 UTC (permalink / raw) To: nicholas.dokos; +Cc: kmartino, Bernt Hansen, emacs-orgmode, Carsten Dominik Thanks Nick, I appreciate your frequent servings of sane advice. I don't think I have a batch mode reproducer in me, but bisection makes a lot of sense and the organization of the config files is somewhat logical so I do have a de facto bisection at hand. All the best, Tom On May 25, 2010, at 6:52 AM, Nick Dokos wrote: > Thomas S. Dye <tsd@tsdye.com> wrote: > >> Thanks Bernt, >> >> So, "broken custom settings" appear to be the cause of the unexpected >> behavior. Two questions: >> >> 1) Do programmers have a name for this situation, where custom >> settings seemed to work perfectly for a long time but then failed >> noticeably with the introduction of new, correct code into >> the .emacs? >> > > I don't think so. > >> 2) Is there a useful strategy for finding the minimal .emacs that >> illustrates the failure? I might have 100 customizations in the >> various starter kit configuration files. If combinations of >> customizations are a possibility, I'm looking at quite a bit of >> random >> experimentation without some kind of strategy. >> > > Bisection is about the only reasonable strategy, short of oracular > guesswork. I have a single .emacs that's (mostly) a sequence of > (conditional) loads/requires of individual package config files. I > just > comment out the whole thing, verify correct operation, and then > uncomment out the first/second half and try again. With 100 > packages, 7 > cycles will get you down to a single package and then you just do the > same thing within the package config file. Given a reproducer that you > can run in batch mode, this goes fairly quickly. > > HTH, > Nick ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: One org file, multiple exports, is it possible? 2010-05-25 16:52 ` Nick Dokos 2010-05-25 17:51 ` Thomas S. Dye @ 2010-05-28 3:40 ` Thomas S. Dye 1 sibling, 0 replies; 24+ messages in thread From: Thomas S. Dye @ 2010-05-28 3:40 UTC (permalink / raw) To: nicholas.dokos; +Cc: kmartino, Bernt Hansen, emacs-orgmode, Carsten Dominik Aloha all, The problems I described in this thread were apparently not due to "broken custom settings." After pulling the latest org-mode just now the problems are gone, even though the custom settings haven't changed. It's pleasing to regain some confidence in my non-minimal .emacs. Thanks to the programmers for your good efforts. All the best, Tom On May 25, 2010, at 6:52 AM, Nick Dokos wrote: > Thomas S. Dye <tsd@tsdye.com> wrote: > >> Thanks Bernt, >> >> So, "broken custom settings" appear to be the cause of the unexpected >> behavior. Two questions: >> >> 1) Do programmers have a name for this situation, where custom >> settings seemed to work perfectly for a long time but then failed >> noticeably with the introduction of new, correct code into >> the .emacs? >> > > I don't think so. > >> 2) Is there a useful strategy for finding the minimal .emacs that >> illustrates the failure? I might have 100 customizations in the >> various starter kit configuration files. If combinations of >> customizations are a possibility, I'm looking at quite a bit of >> random >> experimentation without some kind of strategy. >> > > Bisection is about the only reasonable strategy, short of oracular > guesswork. I have a single .emacs that's (mostly) a sequence of > (conditional) loads/requires of individual package config files. I > just > comment out the whole thing, verify correct operation, and then > uncomment out the first/second half and try again. With 100 > packages, 7 > cycles will get you down to a single package and then you just do the > same thing within the package config file. Given a reproducer that you > can run in batch mode, this goes fairly quickly. > > HTH, > Nick ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: One org file, multiple exports, is it possible? 2010-05-25 16:20 ` Thomas S. Dye 2010-05-25 16:52 ` Nick Dokos @ 2010-05-25 17:26 ` Mark Elston 2010-05-25 17:53 ` Thomas S. Dye 1 sibling, 1 reply; 24+ messages in thread From: Mark Elston @ 2010-05-25 17:26 UTC (permalink / raw) To: emacs-orgmode On 5/25/2010 9:20 AM, Thomas S. Dye wrote: > Thanks Bernt, > > So, "broken custom settings" appear to be the cause of the unexpected > behavior. Two questions: > > 1) Do programmers have a name for this situation, where custom settings > seemed to work perfectly for a long time but then failed noticeably with > the introduction of new, correct code into the .emacs? Well, in an organization I used to work at we called it 'bit rot' though it wasn't necessarily about Emacs ... :) Mark ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: One org file, multiple exports, is it possible? 2010-05-25 17:26 ` Mark Elston @ 2010-05-25 17:53 ` Thomas S. Dye 0 siblings, 0 replies; 24+ messages in thread From: Thomas S. Dye @ 2010-05-25 17:53 UTC (permalink / raw) To: Mark Elston; +Cc: emacs-orgmode Thanks Mark, That's evocative. Now I'm off to see how I let those bits rot. All the best, Tom On May 25, 2010, at 7:26 AM, Mark Elston wrote: > On 5/25/2010 9:20 AM, Thomas S. Dye wrote: >> Thanks Bernt, >> >> So, "broken custom settings" appear to be the cause of the unexpected >> behavior. Two questions: >> >> 1) Do programmers have a name for this situation, where custom >> settings >> seemed to work perfectly for a long time but then failed noticeably >> with >> the introduction of new, correct code into the .emacs? > > Well, in an organization I used to work at we called it 'bit rot' > though it wasn't necessarily about Emacs ... :) > > Mark > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: One org file, multiple exports, is it possible? 2010-05-25 3:50 ` Bernt Hansen 2010-05-25 16:20 ` Thomas S. Dye @ 2010-05-26 18:42 ` Thomas S. Dye 2010-05-26 21:37 ` Nick Dokos 1 sibling, 1 reply; 24+ messages in thread From: Thomas S. Dye @ 2010-05-26 18:42 UTC (permalink / raw) To: Bernt Hansen; +Cc: kmartino, emacs-orgmode, Carsten Dominik Aloha all, First, many thanks to Carsten, Bernt, Nick and Mark for help with my recent publishing woes. After much semi-informed tinkering, I think I've isolated one problem. As background, this problem cropped up for me when I incorporated Karl Martino's setup for exporting parts of an org file to different targets. With the following minimal .emacs, org-publish-get-project-from- filename reports (wrong-type-argument stringp ("index.org")). This function is called when I select [P] publish current project from *Org Export/Publishing Help*. I've included a backtrace below. I discovered this behavior after I incorporated Karl's publication project into my lengthy org-publish-projects-alist. Then, I was unable to publish any of my projects using [P] publish current project. They all returned the same error-- (wrong-type-argument stringp ("index.org")). Hopefully, here follow the pertinent details: Org-mode version 6.36trans (release_6.36.96.g5b68) dk$ /Applications/emacs.app/Contents/MacOS/Emacs -Q -l ~/.minimal.emacs & ---- .minimal.emacs ----- (add-to-list 'load-path (expand-file-name "~/.emacs.d/src/org/lisp")) (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) (setq org-agenda-files '("/tmp/test.org")) (require 'org-install) (require 'org-habit) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) ; going non-minimal here on (require 'org-publish) (setq org-publish-project-alist '( ; Karl Martino's setup modified for my paths ("work" :base-directory "~/org/temp/" :base-extension "org" :publishing-directory "~/org/temp/publish-work/" :publishing-function org-publish-org-to-latex :select-tags ("@WORK") :title "Work Notes" :include ("index.org") :exclude "\\.org$" ) )) ---- .minimal.emacs ----- Debugger entered--Lisp error: (wrong-type-argument stringp ("index.org")) string-match(("index.org") "/Users/dk/org/temp/index.org") (and i (string-match i filename)) (or (and i (string-match i filename)) (and (not ...) (string-match xm filename))) (if (or (and i ...) (and ... ...)) (progn (setq project-name ...) (throw ... project-name))) (when (or (and i ...) (and ... ...)) (setq project-name (car prj)) (throw (quote p-found) project-name)) (let* ((r ...) (b ...) (x ...) (e ...) (i ...) (xm ...)) (when (or ... ...) (setq project-name ...) (throw ... project-name))) (if (plist-get (cdr prj) :components) nil (let* (... ... ... ... ... ...) (when ... ... ...))) (unless (plist-get (cdr prj) :components) (let* (... ... ... ... ... ...) (when ... ... ...))) (while --cl-dolist-temp-- (setq prj (car --cl-dolist-temp--)) (unless (plist-get ... :components) (let* ... ...)) (setq --cl-dolist- temp-- (cdr --cl-dolist-temp--))) (let ((--cl-dolist-temp-- org-publish-project-alist) prj) (while -- cl-dolist-temp-- (setq prj ...) (unless ... ...) (setq --cl-dolist- temp-- ...)) nil) (catch (quote --cl-block-nil--) (let (... prj) (while --cl-dolist- temp-- ... ... ...) nil)) (cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil))) (block nil (let (... prj) (while --cl-dolist-temp-- ... ... ...) nil)) (dolist (prj org-publish-project-alist) (unless (plist- get ... :components) (let* ... ...))) (catch (quote p-found) (dolist (prj org-publish-project-alist) (unless ... ...))) (let* ((filename ...) project-name) (catch (quote p-found) (dolist ... ...)) (when up (dolist ... ...)) (assoc project-name org- publish-project-alist)) org-publish-get-project-from-filename("/Users/dk/org/temp/ index.org" up) (let ((project ...) (org-publish-use-timestamps-flag ...)) (if (not project) (error "File %s is not part of any known project" ...)) (org- publish project)) (save-window-excursion (let (... ...) (if ... ...) (org-publish project))) org-publish-current-project(nil) call-interactively(org-publish-current-project) (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set- process-sentinel p ...) (message "Background process \"%s\": started" p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...))) (let* ((bg ...) subtree-p (help "[t] insert the export option template\n[v] limit export to visible part of outline tree\n[1] only export the current subtree\n[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\n\n[a/n/u] export as ASCII/ Latin-1/UTF-8 [A/N/U] to temporary buffer\n\n[h] export as HTML [H] to temporary buffer [R] export region\n[b] export as HTML and open in browser\n\n[l] export as LaTeX [L] to temporary buffer\n[p] export as LaTeX and process to PDF [d] ... and open PDF file\n\n[D] export as DocBook [V] export as DocBook, process to PDF, and open\n\n[m] export as Freemind mind map\n[x] export as XOXO\n[g] export using Wes Hardaker's generic exporter\n \n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files [c] ...as one combined file\n\n[F] publish current file [P] publish current project\n[X] publish a project... [E] publish every projects") (cmds ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window- excursion ... ... ... ... ... ... ...)) (and bpos (goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error "No command associated with key %c" r1)) (if (and bg ... ... ...) (let ... ... ...) (if subtree-p ...) (call-interactively ...) (when ... ...))) org-export(nil) call-interactively(org-export nil nil) All the best, Tom On May 24, 2010, at 5:50 PM, Bernt Hansen wrote: > "Thomas S. Dye" <tsd@tsdye.com> writes: > >> Aloha Carsten, >> >> I think I need to know what is meant by "minimal .emacs." > > I have a minimal.emacs which is a stripped down .emacs that only has > what I need to invoke org-mode for reproducing a problem. > > ,----[ minimal.emacs ] > | (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp")) > | (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\) > $" . org-mode)) > | (setq org-agenda-files '("/tmp/test.org")) > | (require 'org-install) > | (require 'org-habit) > | > | (global-set-key "\C-cl" 'org-store-link) > | (global-set-key "\C-ca" 'org-agenda) > | (global-set-key "\C-cb" 'org-iswitchb) > `---- > > and I load this with emacs -Q -l ~/minimal.emacs. I'll normally > edit it > to add whatever is needed to reproduce the problem in org-mode. > > Using a stripped down minimal .emacs files removes broken custom > settings as the cause of the issue and makes it easy to reproduce for > other people. > > HTH, > Bernt ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: One org file, multiple exports, is it possible? 2010-05-26 18:42 ` Thomas S. Dye @ 2010-05-26 21:37 ` Nick Dokos 2010-05-26 22:28 ` Thomas S. Dye 0 siblings, 1 reply; 24+ messages in thread From: Nick Dokos @ 2010-05-26 21:37 UTC (permalink / raw) To: Thomas S. Dye Cc: kmartino, Bernt Hansen, nicholas.dokos, emacs-orgmode, Carsten Dominik Thomas S. Dye <tsd@tsdye.com> wrote: > ("work" > :base-directory "~/org/temp/" > :base-extension "org" > :publishing-directory "~/org/temp/publish-work/" > :publishing-function org-publish-org-to-latex > :select-tags ("@WORK") > :title "Work Notes" > :include ("index.org") <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > :exclude "\\.org$" > ) > )) > ---- .minimal.emacs ----- > > Debugger entered--Lisp error: (wrong-type-argument stringp > ("index.org")) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This is complaining that ``("index.org")'' is not a string, and indeed it isn't: it's a list with one element. Should the :include line above be :include "index.org" perhaps? But I'm shooting from the hip here, so take it with the appropriate grain of salt. Nick ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: One org file, multiple exports, is it possible? 2010-05-26 21:37 ` Nick Dokos @ 2010-05-26 22:28 ` Thomas S. Dye 2010-05-27 1:40 ` Nick Dokos 0 siblings, 1 reply; 24+ messages in thread From: Thomas S. Dye @ 2010-05-26 22:28 UTC (permalink / raw) To: nicholas.dokos; +Cc: kmartino, Bernt Hansen, emacs-orgmode, Carsten Dominik [-- Attachment #1.1: Type: text/plain, Size: 2711 bytes --] On May 26, 2010, at 11:37 AM, Nick Dokos wrote: > Thomas S. Dye <tsd@tsdye.com> wrote: > > >> ("work" >> :base-directory "~/org/temp/" >> :base-extension "org" >> :publishing-directory "~/org/temp/publish-work/" >> :publishing-function org-publish-org-to-latex >> :select-tags ("@WORK") >> :title "Work Notes" >> :include ("index.org") <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >> :exclude "\\.org$" >> ) >> )) >> ---- .minimal.emacs ----- >> >> Debugger entered--Lisp error: (wrong-type-argument stringp >> ("index.org")) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > This is complaining that ``("index.org")'' is not a string, and indeed > it isn't: it's a list with one element. Should the :include line above > be > > :include "index.org" > > perhaps? But I'm shooting from the hip here, so take it with the > appropriate > grain of salt. > > Nick Hi Nick, The documentation for org-publish-projects-alist suggests that :include wants a list: > The :include property may be used to include extra files. Its > value may be a list of filenames to include. The filenames are > considered relative to the base directory. When I tried :include "index.org" I got this: Debugger entered--Lisp error: (wrong-type-argument sequencep 105) concat("~/org/temp/" 105) (expand-file-name (concat base-dir f)) ... I'm not going to pretend I know what I'm talking about here, but AFAICT the variable i in the following code needs some attention before it goes to string-match. According to the documentation, plist- get just returns the value assigned to a property (or nil) without doing anything to it, so i should be a list when it is passed to string-match. string-match wants REGEXP here, apparently not as a list. I couldn't persuade emacs to cough up the definition of REGEXP, but my brief forays into the emacs and org-mode source code lead me to believe it is probably a string. > (defun org-publish-get-project-from-filename (filename &optional up) > "Return the project FILENAME belongs." > (let* ((filename (expand-file-name filename)) > project-name) > > (catch 'p-found > (dolist (prj org-publish-project-alist) > (unless (plist-get (cdr prj) :components) > ;; [[info:org:Selecting%20files]] shows how this is supposed to > work: > (let* ((r (plist-get (cdr prj) :recursive)) > (b (expand-file-name (plist-get (cdr prj) :base-directory))) > (x (plist-get (cdr prj) :base-extension)) > (e (plist-get (cdr prj) :exclude)) > (i (plist-get (cdr prj) :include)) > (xm (concat "^" b (if r ".+" "[^/]+") "\\.\\(" x "\\)$"))) > (when (or > (and i (string-match i filename)) All the best, Tom [-- Attachment #1.2: Type: text/html, Size: 7401 bytes --] [-- Attachment #2: Type: text/plain, Size: 201 bytes --] _______________________________________________ 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 ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Re: One org file, multiple exports, is it possible? 2010-05-26 22:28 ` Thomas S. Dye @ 2010-05-27 1:40 ` Nick Dokos 0 siblings, 0 replies; 24+ messages in thread From: Nick Dokos @ 2010-05-27 1:40 UTC (permalink / raw) To: Thomas S. Dye Cc: Bernt Hansen, nicholas.dokos, kmartino, emacs-orgmode, Carsten Dominik Thomas S. Dye <tsd@tsdye.com> wrote: > On May 26, 2010, at 11:37 AM, Nick Dokos wrote: > ... > perhaps? But I'm shooting from the hip here, so take it with the appropriate > grain of salt. > > > Hi Nick, > > The documentation for org-publish-projects-alist suggests that :include wants a list: > > The :include property may be used to include extra files. Its > value may be a list of filenames to include. The filenames are > considered relative to the base directory. > > When I tried :include "index.org" I got this: > > Debugger entered--Lisp error: (wrong-type-argument sequencep 105) > concat("~/org/temp/" 105) > (expand-file-name (concat base-dir f)) > ... > Yep, shot from the hip and hit my foot. You are right. > I'm not going to pretend I know what I'm talking about here, but AFAICT the variable i in the following code needs some attention before it goes to > string-match. According to the documentation, plist-get just returns the value assigned to a property (or nil) without doing anything to it, so i > should be a list when it is passed to string-match. string-match wants REGEXP here, apparently not as a list. I couldn't persuade emacs to cough up > the definition of REGEXP, but my brief forays into the emacs and org-mode source code lead me to believe it is probably a string. > > (defun org-publish-get-project-from-filename (filename &optional up) > "Return the project FILENAME belongs." > (let* ((filename (expand-file-name filename)) > project-name) > > (catch 'p-found > (dolist (prj org-publish-project-alist) > (unless (plist-get (cdr prj) :components) > ;; [[info:org:Selecting%20files]] shows how this is supposed to work: > (let* ((r (plist-get (cdr prj) :recursive)) > (b (expand-file-name (plist-get (cdr prj) :base-directory))) > (x (plist-get (cdr prj) :base-extension)) > (e (plist-get (cdr prj) :exclude)) > (i (plist-get (cdr prj) :include)) > (xm (concat "^" b (if r ".+" "[^/]+") "\\.\\(" x "\\)$"))) > (when (or > (and i (string-match i filename)) > I think you are right that there is a problem here. Here is an excerpt from the relevant commit: ,---- | commit 339d6fe4bbf7b9858c6323d01f32d0c73a4cd3a8 | Author: Sebastian Rose <sebastian_rose@gmx.de> | Date: Thu May 13 13:43:53 2010 +0200 | | Publishing, cashing and timestamps | | Carsten Dominik <carsten.dominik@gmail.com> writes: | > Hi Sebastian, | > | > sorry for being slow. Could you do me a favor and send me the cache patch one | > more time - if possible updated to the current master. | > | > I am just not sure I have the right patch in my hands. | | Hi Carsten, | | no problem. The patch is attached. | | Here is a list of my ChangeLog entries, redated to today: | | 2010-05-13 Sebastian Rose <sebastian_rose@gmx.de> | | ... | | * org-publish.el (org-publish-get-project-from-filename) does | not depend on a list of files anymore. Instead of laoding all | files of all, we walk `org-publish-project-alist' until we | find a project, where the properties :base-directory, :recursive, | :base-extension, :include and :exclude match. | | ... `---- Maybe Sebastian (I added him to the CC:) can take a look? Thanks, Nick ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2010-05-28 3:41 UTC | newest] Thread overview: 24+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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.