From 9948eb4bb39e4467337202853868c7f1694de777 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 22 Dec 2024 13:11:20 +0100 Subject: [PATCH] update org-mime Signed-off-by: Andreas Gerler --- bba-orgmode.org | 2 +- elpa/org-mime-20230321.2341/org-mime-pkg.el | 14 ---- .../org-mime-autoloads.el | 33 ++++---- elpa/org-mime-20241001.415/org-mime-pkg.el | 9 +++ .../org-mime.el | 32 +++++--- elpa/org-mime-readme.txt | 78 ------------------- 6 files changed, 46 insertions(+), 122 deletions(-) delete mode 100644 elpa/org-mime-20230321.2341/org-mime-pkg.el rename elpa/{org-mime-20230321.2341 => org-mime-20241001.415}/org-mime-autoloads.el (75%) create mode 100644 elpa/org-mime-20241001.415/org-mime-pkg.el rename elpa/{org-mime-20230321.2341 => org-mime-20241001.415}/org-mime.el (97%) delete mode 100644 elpa/org-mime-readme.txt diff --git a/bba-orgmode.org b/bba-orgmode.org index 6761d4e7..7428d4a8 100644 --- a/bba-orgmode.org +++ b/bba-orgmode.org @@ -1849,7 +1849,7 @@ Use =C-c M= to send a multipart email with .org as text and exported html. #+BEGIN_SRC emacs-lisp - (load-file "~/.emacs.d/elpa/org-mime-20230321.2341/org-mime.el") + (load-file "~/.emacs.d/elpa/org-mime-20241001.415/org-mime.el") (add-hook 'org-mode-hook (lambda() (define-key org-mode-map "\C-c\S-m" 'org-mime-org-buffer-htmlize))) diff --git a/elpa/org-mime-20230321.2341/org-mime-pkg.el b/elpa/org-mime-20230321.2341/org-mime-pkg.el deleted file mode 100644 index 845ed625..00000000 --- a/elpa/org-mime-20230321.2341/org-mime-pkg.el +++ /dev/null @@ -1,14 +0,0 @@ -(define-package "org-mime" "20230321.2341" "org html export for text/html MIME emails" - '((emacs "25.1")) - :commit "d368bd4119bfcf2997a6a23bbf5f41e043164d29" :authors - '(("Eric Schulte")) - :maintainers - '(("Chen Bin" . "chenbin.sh@gmail.com")) - :maintainer - '("Chen Bin" . "chenbin.sh@gmail.com") - :keywords - '("mime" "mail" "email" "html") - :url "http://github.com/org-mime/org-mime") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/org-mime-20230321.2341/org-mime-autoloads.el b/elpa/org-mime-20241001.415/org-mime-autoloads.el similarity index 75% rename from elpa/org-mime-20230321.2341/org-mime-autoloads.el rename to elpa/org-mime-20241001.415/org-mime-autoloads.el index edfcf279..ecf01d46 100644 --- a/elpa/org-mime-20230321.2341/org-mime-autoloads.el +++ b/elpa/org-mime-20241001.415/org-mime-autoloads.el @@ -1,18 +1,19 @@ -;;; org-mime-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; +;;; org-mime-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + ;;; Code: -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + -;;;### (autoloads nil "org-mime" "org-mime.el" (0 0 0 0)) ;;; Generated autoloads from org-mime.el (autoload 'org-mime-htmlize "org-mime" "\ Export a portion of an email to html using `org-mode'. -If called with an active region only export that region, otherwise entire body." t nil) - +If called with an active region only export that region, otherwise entire body." t) (autoload 'org-mime-org-buffer-htmlize "org-mime" "\ Create an email buffer of the current org buffer. The email buffer will contain both html and in org formats as mime @@ -27,8 +28,7 @@ The following file keywords can be used to control the headers: #+MAIL_FROM: sender@some.place #+MAIL_IN_REPLY_TO: -The cursor ends in the TO field." t nil) - +The cursor ends in the TO field." t) (autoload 'org-mime-org-subtree-htmlize "org-mime" "\ Create an email buffer from current subtree. If HTMLIZE-FIRST-LEVEL is t, first level subtree of current node is htmlized. @@ -43,20 +43,19 @@ Following headline properties can determine the mail headers. :MAIL_FROM: sender@gmail.com :END: -\(fn &optional HTMLIZE-FIRST-LEVEL)" t nil) - +(fn &optional HTMLIZE-FIRST-LEVEL)" t) (register-definition-prefixes "org-mime" '("org-mime-")) - -;;;*** -;;;### (autoloads nil nil ("org-mime-pkg.el") (0 0 0 0)) +;;; End of scraped data + +(provide 'org-mime-autoloads) -;;;*** - ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 +;; no-native-compile: t +;; coding: utf-8-emacs-unix ;; End: + ;;; org-mime-autoloads.el ends here diff --git a/elpa/org-mime-20241001.415/org-mime-pkg.el b/elpa/org-mime-20241001.415/org-mime-pkg.el new file mode 100644 index 00000000..f621f052 --- /dev/null +++ b/elpa/org-mime-20241001.415/org-mime-pkg.el @@ -0,0 +1,9 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "org-mime" "20241001.415" + "Org html export for text/html MIME emails." + '((emacs "27.1")) + :url "https://github.com/org-mime/org-mime" + :commit "90aa9081ec00a1705552434cb45ff223aa9f8711" + :revdesc "90aa9081ec00" + :keywords '("mime" "mail" "email" "html") + :maintainers '(("Chen Bin" . "chenbin.sh@gmail.com"))) diff --git a/elpa/org-mime-20230321.2341/org-mime.el b/elpa/org-mime-20241001.415/org-mime.el similarity index 97% rename from elpa/org-mime-20230321.2341/org-mime.el rename to elpa/org-mime-20241001.415/org-mime.el index 0187b987..502ffdf2 100644 --- a/elpa/org-mime-20230321.2341/org-mime.el +++ b/elpa/org-mime-20241001.415/org-mime.el @@ -6,8 +6,9 @@ ;; Maintainer: Chen Bin ;; Keywords: mime, mail, email, html ;; Homepage: http://github.com/org-mime/org-mime -;; Version: 0.3.2 -;; Package-Requires: ((emacs "25.1")) +;; Package-Version: 20241001.415 +;; Package-Revision: 90aa9081ec00 +;; Package-Requires: ((emacs "27.1")) ;; This file is not part of GNU Emacs. @@ -43,7 +44,7 @@ ;; ;; `org-mime-org-subtree-htmlize' is similar to `org-mime-org-buffer-htmlize' ;; but works on current subtree. It can read following subtree properties: -;; MAIL_SUBJECT, MAIL_TO, MAIL_FROM, MAIL_CC, and MAIL_BCC. MAIL_IN_REPLY_TO +;; MAIL_SUBJECT, MAIL_TO, MAIL_FROM, MAIL_CC, MAIL_BCC, MAIL_IN_REPLY_TO ;; ;; Here is the sample of a subtree: ;; * mail one @@ -58,7 +59,7 @@ ;; ;; To avoid exporting the table of contents, you can setup ;; `org-mime-export-options' as below, -;; (setq org-mime-export-options '(:with-latex dvipng +;; (setq org-mime-export-options '(:with-latex imagemagick ;; :section-numbers nil ;; :with-author nil ;; :with-toc nil)) @@ -130,6 +131,11 @@ (require 'ox-html) (require 'message) +(defgroup org-mime nil + "Org html export for text/html MIME emails." + :group 'convenience + :prefix "org-mime") + (defcustom org-mime-beautify-quoted-mail-p t "Beautify quoted mail in more clean HTML, like Gmail." :group 'org-mime @@ -167,8 +173,8 @@ Default (nil) selects the original org file." :group 'org-mime :type 'sexp) -(defcustom org-mime-org-html-with-latex-default 'dvipng - "Default value of `org-html-with-latex'." +(defcustom org-mime-org-html-with-latex-default 'imagemagick + "Default value of `org-html-with-latex' calling `org-mime-htmlize'." :group 'org-mime :type 'sexp) @@ -178,7 +184,7 @@ Default (nil) selects the original org file." :group 'org-mime :type 'string) -(defvar org-mime-export-options '(:with-latex dvipng) +(defvar org-mime-export-options '(:with-latex imagemagick) "Default export options which may override org buffer/subtree options. You could avoid exporting section-number/author/toc. It overrides Org default settings, but still inferior to file-local settings.") @@ -452,8 +458,12 @@ CURRENT-FILE is used to calculate full path of images." (defun org-mime-insert-html-content (plain file html) "Insert PLAIN into FILE with HTML content." (let* ((files (org-mime-extract-non-image-files)) - ;; dvipng for inline latex because MathJax doesn't work in mail + ;; imagemagick for inline latex because MathJax doesn't work in mail ;; Also @see https://github.com/org-mime/org-mime/issues/16 + ;; + ;; It's reported imagemagick is better than dvipng, + ;; https://github.com/org-mime/org-mime/issues/92 + ;; ;; (setq org-html-with-latex nil) sometimes useful (org-html-with-latex org-mime-org-html-with-latex-default) ;; we don't want to convert org file links to html @@ -463,8 +473,6 @@ CURRENT-FILE is used to calculate full path of images." (org-export-preserve-breaks org-mime-preserve-breaks) ;; org 9 (org-html-htmlize-output-type 'inline-css) - ;; org 8 - (org-export-htmlize-output-type 'inline-css) (html-and-images (org-mime-replace-images html file)) (images (cdr html-and-images)) (html (org-mime-apply-html-hook (car html-and-images)))) @@ -572,7 +580,7 @@ If called with an active region only export that region, otherwise entire body." (org-text (buffer-substring html-start html-end)) ;; to hold attachments for inline html images (opts (org-mime-get-buffer-export-options)) - (plain (org-mime-export-ascii-maybe org-text)) + (plain (org-mime-export-ascii-maybe org-text opts)) (html (org-mime-export-string org-text opts)) (file (make-temp-name (expand-file-name "mail" temporary-file-directory)))) @@ -636,7 +644,7 @@ If called with an active region only export that region, otherwise entire body." rlt)) (defun org-mime-build-mail-other-headers (cc bcc from in-reply-to) - "Build mail header from CC, BCC, IN_REPLY_TO and FROM." + "Build mail header from CC, BCC, FROM, IN-REPLY-TO." (let* ((arr (list (cons "Cc" cc) (cons "Bcc" bcc) (cons "From" from ) (cons "In-Reply-To" in-reply-to ))) rlt) (dolist (e arr) diff --git a/elpa/org-mime-readme.txt b/elpa/org-mime-readme.txt deleted file mode 100644 index dc5a0f3b..00000000 --- a/elpa/org-mime-readme.txt +++ /dev/null @@ -1,78 +0,0 @@ -WYSIWYG, html mime composition using org-mode - -For mail composed using the orgstruct-mode minor mode, this -provides a function for converting all or part of your mail buffer -to embedded html as exported by org-mode. Call `org-mime-htmlize' -in a message buffer to convert either the active region or the -entire buffer to html. - -Similarly the `org-mime-org-buffer-htmlize' function can be called -from within an org-mode buffer to convert the buffer to html, and -package the results into an email handling with appropriate MIME -encoding. - -`org-mime-org-subtree-htmlize' is similar to `org-mime-org-buffer-htmlize' -but works on current subtree. It can read following subtree properties: -MAIL_SUBJECT, MAIL_TO, MAIL_FROM, MAIL_CC, and MAIL_BCC. - -Here is the sample of a subtree: -* mail one - :PROPERTIES: - :MAIL_SUBJECT: mail title - :MAIL_TO: person1@gmail.com - :MAIL_FROM: sender@gmail.com - :MAIL_CC: person2@gmail.com - :MAIL_BCC: person3@gmail.com - :END: - -To avoid exporting the table of contents, you can setup -`org-mime-export-options': - (setq org-mime-export-options '(:section-numbers nil - :with-author nil - :with-toc nil)) - -Or just setup your export options in the org buffer/subtree. These are -overridden by `org-mime-export-options' when it is non-nil. - - -Quick start: -Write a message in message-mode, make sure the mail body follows -org format. Before sending mail, run `M-x org-mime-htmlize' to convert the -body to html, then send the mail as usual. - -Setup (OPTIONAL): -You might want to bind this to a key with something like the -following message-mode binding - - (add-hook 'message-mode-hook - (lambda () - (local-set-key (kbd "C-c M-o") 'org-mime-htmlize))) - -and the following org-mode binding - - (add-hook 'org-mode-hook - (lambda () - (local-set-key (kbd "C-c M-o") 'org-mime-org-buffer-htmlize))) - -Extra Tips: -1. In order to embed images into your mail, use the syntax below, -[[/full/path/to/your.jpg]] - -2. It's easy to add your own emphasis markup. For example, to render text -between "@" in a red color, you can add a function to `org-mime-html-hook': - - (add-hook 'org-mime-html-hook - (lambda () - (while (re-search-forward "@\\([^@]*\\)@" nil t) - (replace-match "\\1")))) - -3. Now the quoted mail uses a modern style (like Gmail), so mail replies -looks clean and modern. If you prefer the old style, please set -`org-mime-beautify-quoted-mail' to nil. - -4. Please note this program can only embed exported HTML into mail. - Org-mode is responsible for rendering HTML. - - For example, see https://github.com/org-mime/org-mime/issues/38 - The solution is patching org-mode, - https://lists.gnu.org/archive/html/emacs-orgmode/2019-11/msg00016.html -- 2.47.3