diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-03-26 07:59:10 +0100 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-03-26 08:05:14 +0100 |
commit | 3f6a52dd8bf23b38be70b17b30868b884f4f00a2 (patch) | |
tree | 919af3b1a5279d8644b67d56960b18c09b01e8d1 | |
parent | d1289ba9066b12ab024485227a164156d976c350 (diff) | |
download | org-mode-3f6a52dd8bf23b38be70b17b30868b884f4f00a2.tar.gz |
New option to turn off export of the email address
Default is actually off.
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/org.texi | 2 | ||||
-rwxr-xr-x | lisp/ChangeLog | 14 | ||||
-rw-r--r-- | lisp/org-ascii.el | 4 | ||||
-rw-r--r-- | lisp/org-docbook.el | 4 | ||||
-rw-r--r-- | lisp/org-exp.el | 9 | ||||
-rw-r--r-- | lisp/org-html.el | 2 |
7 files changed, 36 insertions, 3 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 2e5708f..1943f78 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2010-03-26 Carsten Dominik <carsten.dominik@gmail.com> + + * org.texi (Publishing options): Document the :email option. + 2010-03-25 Carsten Dominik <carsten.dominik@gmail.com> * org.texi (Refiling notes): Document refile logging. diff --git a/doc/org.texi b/doc/org.texi index b514f2e..42685d4 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -10247,6 +10247,7 @@ respective variable for details. @vindex org-export-with-fixed-width @vindex org-export-with-timestamps @vindex org-export-author-info +@vindex org-export-email @vindex org-export-creator-info @vindex org-export-with-tables @vindex org-export-highlight-first-table-line @@ -10295,6 +10296,7 @@ respective variable for details. @item @code{:fixed-width} @tab @code{org-export-with-fixed-width} @item @code{:timestamps} @tab @code{org-export-with-timestamps} @item @code{:author-info} @tab @code{org-export-author-info} +@item @code{:email-info} @tab @code{org-export-email-info} @item @code{:creator-info} @tab @code{org-export-creator-info} @item @code{:tables} @tab @code{org-export-with-tables} @item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line} diff --git a/lisp/ChangeLog b/lisp/ChangeLog index faac97c..479aa80 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2010-03-26 Carsten Dominik <carsten.dominik@gmail.com> + + * org-ascii.el (org-export-as-ascii): Export email only if the + author wants it. + + * org-docbook.el (org-export-as-docbook): Export email only if the + author wants it. + + * org-html.el (org-export-as-html): Export email only if the + author wants it. + + * org-exp.el (org-export-email-info): New option. + (org-export-plist-vars): Add entry for `org-export-email'. + 2010-03-25 Carsten Dominik <carsten.dominik@gmail.com> * org-table.el (org-table-goto-line): Fix typo. diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el index c8f3e2c..633958c 100644 --- a/lisp/org-ascii.el +++ b/lisp/org-ascii.el @@ -297,7 +297,9 @@ publishing directory." (if (and (or author email) org-export-author-info) (insert(concat (nth 1 lang-words) ": " (or author "") - (if email (concat " <" email ">") "") + (if (and org-export-email-info + email (string-match "\\S-" email)) + (concat " <" email ">") "") "\n"))) (cond diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el index 492a660..3301762 100644 --- a/lisp/org-docbook.el +++ b/lisp/org-docbook.el @@ -611,7 +611,9 @@ publishing directory." </info>\n" (org-docbook-expand title) firstname othername surname - (if email (concat "<email>" email "</email>") "") + (if (and org-export-email-info + email (string-match "\\S-" email)) + (concat "<email>" email "</email>") "") ))) (org-init-section-numbers) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index cd89539..c48f5d5 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -316,6 +316,14 @@ e.g. \"author-info:nil\"." :group 'org-export-general :type 'boolean) +(defcustom org-export-email-info nil + "Non-nil means insert author name and email into the exported file. + +This option can also be set with the +OPTIONS line, +e.g. \"email-info:t\"." + :group 'org-export-general + :type 'boolean) + (defcustom org-export-creator-info t "Non-nil means the postamble should contain a creator sentence. This sentence is \"HTML generated by org-mode XX in emacs XXX\"." @@ -607,6 +615,7 @@ table.el tables." (:fixed-width ":" org-export-with-fixed-width) (:timestamps "<" org-export-with-timestamps) (:author-info "author" org-export-author-info) + (:email-info "email" org-export-email) (:creator-info "creator" org-export-creator-info) (:time-stamp-file "timestamp" org-export-time-stamp-file) (:tables "|" org-export-with-tables) diff --git a/lisp/org-html.el b/lisp/org-html.el index 0ec1700..d75d8f5 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1410,7 +1410,7 @@ lang=\"%s\" xml:lang=\"%s\"> (when (and org-export-author-info author) (insert "<p class=\"author\"> " (nth 1 lang-words) ": " author "\n") - (when email + (when (and org-export-email-info email (string-match "\\S-" email)) (if (listp (split-string email ",+ *")) (mapc (lambda(e) (insert "<a href=\"mailto:" e "\"><" |