[gnus git] branch master updated: =1= Add support for Org inlined/attached text
Julien Danjou <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 2d2f709ab067c5688f325fc64c618988ed6fd178 (commit)
from 904dc0b88a6ba559b3050384008c7c6b59c0af38 (commit)
- Log -----------------------------------------------------------------
commit 2d2f709ab067c5688f325fc64c618988ed6fd178
Author: Julien Danjou <[email protected]>
Date: Thu Jan 20 13:59:49 2011 +0100
Add support for Org inlined/attached text
Signed-off-by: Julien Danjou <[email protected]>
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7cb885e..08c158a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-20 Julien Danjou <[email protected]>
+
+ * mm-uu.el (mm-uu-type-alist): Add org block.
+ (mm-uu-org-src-code-block-extract): New function.
+
+ * mm-view.el (mm-display-org-inline): New function.
+
+ * mm-decode.el (mm-automatic-display): Add text/org.
+
+ * mailcap.el (mailcap-mime-extensions): Add .org.
+
2011-01-19 Katsumi Yamaoka <[email protected]>
* gnus-art.el (gnus-article-highlight): Remove argument passed to
diff --git a/lisp/mailcap.el b/lisp/mailcap.el
index b6cef39..e50e61b 100644
--- a/lisp/mailcap.el
+++ b/lisp/mailcap.el
@@ -910,7 +910,8 @@ If NO-DECODE is non-nil, don't decode STRING."
(".zip" . "application/zip")
(".ai" . "application/postscript")
(".jpe" . "image/jpeg")
- (".jpeg" . "image/jpeg"))
+ (".jpeg" . "image/jpeg")
+ (".org" . "text/org"))
"An alist of file extensions and corresponding MIME content-types.
This exists for you to customize the information in Lisp. It is
merged with values from mailcap files by `mailcap-parse-mimetypes'.")
diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el
index 6275534..bbe7150 100644
--- a/lisp/mm-decode.el
+++ b/lisp/mm-decode.el
@@ -238,6 +238,7 @@ before the external MIME handler is invoked."
("application/emacs-lisp" mm-display-elisp-inline identity)
("application/x-emacs-lisp" mm-display-elisp-inline identity)
("text/dns" mm-display-dns-inline identity)
+ ("text/org" mm-display-org-inline identity)
("text/html"
mm-inline-text-html
(lambda (handle)
@@ -313,7 +314,8 @@ when selecting a different article."
"application/pkcs7-signature" "application/x-pkcs7-mime"
"application/pkcs7-mime"
;; Mutt still uses this even though it has already been withdrawn.
- "application/pgp\\'")
+ "application/pgp\\'"
+ "text/org")
"A list of MIME types to be displayed automatically."
:type '(repeat regexp)
:group 'mime-display)
diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el
index 432b23c..6966122 100644
--- a/lisp/mm-uu.el
+++ b/lisp/mm-uu.el
@@ -186,7 +186,15 @@ This can be either \"inline\" or \"attachment\".")
"^\\\\end{document}"
mm-uu-latex-extract
nil
- mm-uu-latex-test))
+ mm-uu-latex-test)
+ (org-src-code-block
+ "^[ \t]*#\\+begin_"
+ "^[ \t]*#\\+end_"
+ mm-uu-org-src-code-block-extract)
+ (org-meta-line
+ "^[ \t]*#\\+[[:alpha:]]+: "
+ "$"
+ mm-uu-org-src-code-block-extract))
"A list of specifications for non-MIME attachments.
Each element consist of the following entries: label,
start-regexp, end-regexp, extract-function, test-function.
@@ -383,6 +391,10 @@ apply the face `mm-uu-extract'."
(list mm-dissect-disposition
(cons 'filename file-name))))
+(defun mm-uu-org-src-code-block-extract ()
+ (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
+ '("text/org")))
+
(defvar gnus-newsgroup-name)
(defun mm-uu-emacs-sources-test ()
diff --git a/lisp/mm-view.el b/lisp/mm-view.el
index 61d5b32..c1e270b 100644
--- a/lisp/mm-view.el
+++ b/lisp/mm-view.el
@@ -632,6 +632,11 @@
(defun mm-display-dns-inline (handle)
(mm-display-inline-fontify handle 'dns-mode))
+(defun mm-display-org-inline (handle)
+ "Show an Org mode text from HANDLE inline."
+ (mm-display-inline-fontify handle 'org-mode))
+
+
;; id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
;; us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
(defvar mm-pkcs7-signed-magic
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 11 +++++++++++
lisp/mailcap.el | 3 ++-
lisp/mm-decode.el | 4 +++-
lisp/mm-uu.el | 14 +++++++++++++-
lisp/mm-view.el | 5 +++++
5 files changed, 34 insertions(+), 3 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project