0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-12 15:10:04 +00:00
org-mode/contrib/lisp
Nicolas Goaziou 5313dc9d09 org-export: Allow user to explicitely ignore parts of parse tree
* contrib/lisp/org-export.el (org-export-collect-tree-properties):
  Do not overwrite any user's ignore list.
* testing/contrib/lisp/test-org-export.el: Add test.

A good way to populate `:ignore-list' is through the use of
`org-export-filter-parse-tree-functions', with the help of
`org-element-map' and `org-export-ignore-element'.  As an example, the
following code will skip every headline containing the word "note"
in its title during a LaTeX export:

(defun user-skip-note-headlines (data backend info)
  ;; For now LaTeX back-end is called `e-latex'.
  (when (eq backend 'test)
    ;; Traverse the parse tree, adding to ignore list any headline
    ;; matching criteria.
    (org-element-map
     data 'headline
     (lambda (headline)
       (when (string-match "\\<note\\>"
                           (org-element-property :raw-value headline))
         (org-export-ignore-element headline info)))
     info))
  ;; Return original DATA.
  data)

Then install it in parse-tree filters:

(add-to-list 'user-skip-note-headlines org-export-filter-parse-tree-functions)

Back-end delevopers will install it via `org-BACKEND-filters-alist'
where BACKEND stands for the name of the back-end considered.  Se
`org-export-filters-alist' for more information.
2012-02-25 14:55:21 +01:00
..
htmlize.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-annotate-file.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org-bookmark.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-checklist.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-choose.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-collector.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-contacts.el Copyright year fixes for contrib/. 2012-01-04 15:48:18 +01:00
org-contribdir.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org-depend.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org-drill.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-element.el org-element: Function mapped through org-element-map accepts only one argument 2012-02-25 14:53:35 +01:00
org-elisp-symbol.el More copyright year fixes. 2012-01-04 15:11:23 +01:00
org-eval-light.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-eval.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-exp-bibtex.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org-expiry.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-export-generic.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-export.el org-export: Allow user to explicitely ignore parts of parse tree 2012-02-25 14:55:21 +01:00
org-git-link.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org-interactive-query.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-invoice.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-jira.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org-learn.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org-mac-iCal.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-mac-link-grabber.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-mairix.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-man.el Renamed CONTRIB directory to "contrib". 2008-04-07 17:36:12 +02:00
org-mime.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-mtags.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-notmuch.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-panel.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-registry.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-screen.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-secretary.el Copyright year fixes for contrib/. 2012-01-04 15:48:18 +01:00
org-static-mathjax.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-sudoku.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-toc.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-track.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org-velocity.el Copyright year fixes for contrib/. 2012-01-04 15:48:18 +01:00
org-wikinodes.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
org-xhtml.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
org2rem.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00
orgtbl-sqlinsert.el Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
test-org-export-preproc.el Fix trailing whitespaces for *.el files in contrib/. 2012-01-04 16:21:56 +01:00