Re: [O] Custom tag exportation - Agenda export?
Pierre-Luc Gauthier writes: > So my question is, > How can I export this tag filtered agenda view to, say a pdf with > LaTeX customizations and all that nice stuff. > The goal would be to be able to leave the house with a beautifully > typeset document containing all @Errands tagged headers *and* content? > > If I use org-agenda-write and write a PDF file, I get basically the > same screen as my view, no content, just the headers and in a rather > crude layout. > > I guess what I need (conceptually) is a way to get all headers having > said tag (or being a child of) be compiled in a file. Then I know all > the cool export stuff (e.g.: HTML, LaTeX, etc) will be accessible. > The function org-map-entries could help here. For instance... --8<---cut here---start->8--- (org-map-entries '(concat (org-get-heading) "\n" (org-get-entry)) "@Errands" 'agenda)) --8<---cut here---end--->8--- ...will return a list of strings containing the heading and entry text for all of your entries tagged "@Errands". Then you could iterate through that list and insert each item as a top level heading in a new org file. The following, for instance, will extract all relevant headings and insert them in a temporary buffer ("/tmp/export.org"): --8<---cut here---start->8--- (with-current-buffer (find-file-noselect "/tmp/export.org") (delete-region (point-min) (point-max)) (insert "* ") (insert (mapconcat 'identity (org-map-entries '(concat (org-get-heading) "\n" (org-get-entry)) "@Errands" 'agenda) "\n* ")) (org-align-all-tags)) --8<---cut here---end--->8--- This could be further refined. E.g., you could extract specific heading components with the function org-heading-components and then place them directly in a LaTeX file. Best, Matt
Re: [O] Custom tag exportation - Agenda export?
'thinking out loud here: Maybe I could make a errandsExport.org file in whish I could include all my agenda files and then filter only the Errands tag. Then I could add all the LaTeX options I want for this export file e.g. #+TITLE: My errands document I do have problems including all org-agenda-files files. I tried : #+INCLUDE: (org-agenda-files) which obviously does not work but I do not know how to tackle this (I'm guessing) rather simple issue. How could I expand this org-agenda-files variable for org to include it's content? Is this an OK way to go about it? Also, I have not found a way to filter tags out of an org file at export. I know about #+SELECT_TAGS: and #+EXCLUDE_TAGS: but what if you *only* want trees with the "Errands" tag? Is there a way to exclude all and then select a specific tag? Thanks for any pointers :-) -- Pierre-Luc Gauthier 2017-10-09 14:31 GMT-04:00 Pierre-Luc Gauthier : > Is it possible to have agenda view templates to export a specific tag > hierarchy with all the usual org-export options (e.g.: title, toc, > LaTeX stuff, etc) ? > > So my question is, > How can I export this tag filtered agenda view to, say a pdf with > LaTeX customizations and all that nice stuff. > The goal would be to be able to leave the house with a beautifully > typeset document containing all @Errands tagged headers *and* content? > > If I use org-agenda-write and write a PDF file, I get basically the > same screen as my view, no content, just the headers and in a rather > crude layout. > > I guess what I need (conceptually) is a way to get all headers having > said tag (or being a child of) be compiled in a file. Then I know all > the cool export stuff (e.g.: HTML, LaTeX, etc) will be accessible.
[O] Custom tag exportation - Agenda export?
Praying : "Please let this first post of mine on this mailing list not be a duplicate…" Hi there, Is it possible to have agenda view templates to export a specific tag hierarchy with all the usual org-export options (e.g.: title, toc, LaTeX stuff, etc) ? I have about 30 or so tags in org-tag-persistent-alist that I use in hierarchy in most of my org file. e.g. : ;; Errands (:startgrouptag) ("@Errands") (:grouptags) ("HardwareStore") ("GroceryStore") ("Bank") (:endgrouptag) I also have about ten+ org files registered in org-agenda-files all of them using those tags. All of this is working fine and as expected. e.g.: Being able to view all subtags of @Errands in my agenda view which resembles : "Headlines with TAGS match: @Errands" So my question is, How can I export this tag filtered agenda view to, say a pdf with LaTeX customizations and all that nice stuff. The goal would be to be able to leave the house with a beautifully typeset document containing all @Errands tagged headers *and* content? If I use org-agenda-write and write a PDF file, I get basically the same screen as my view, no content, just the headers and in a rather crude layout. I guess what I need (conceptually) is a way to get all headers having said tag (or being a child of) be compiled in a file. Then I know all the cool export stuff (e.g.: HTML, LaTeX, etc) will be accessible. I hope I was clear enough. Thanks for your help. -- Pierre-Luc Gauthier