فهرست منبع

New option to turn off export of the email address

Default is actually off.
Carsten Dominik 15 سال پیش
والد
کامیت
3f6a52dd8b
7فایلهای تغییر یافته به همراه36 افزوده شده و 3 حذف شده
  1. 4 0
      doc/ChangeLog
  2. 2 0
      doc/org.texi
  3. 14 0
      lisp/ChangeLog
  4. 3 1
      lisp/org-ascii.el
  5. 3 1
      lisp/org-docbook.el
  6. 9 0
      lisp/org-exp.el
  7. 1 1
      lisp/org-html.el

+ 4 - 0
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.

+ 2 - 0
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}

+ 14 - 0
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.

+ 3 - 1
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

+ 3 - 1
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)

+ 9 - 0
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)

+ 1 - 1
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 "\">&lt;"