emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb c0b3090 362/449: Fix email subtree command


From: Stefan Monnier
Subject: [elpa] externals/gnorb c0b3090 362/449: Fix email subtree command
Date: Fri, 27 Nov 2020 23:16:12 -0500 (EST)

branch: externals/gnorb
commit c0b30903bd7f9c23c5c8c08ae7dcff13e5c7ea10
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Fix email subtree command
    
    * packages/gnorb/gnorb-org.el (gnorb-org-handle-mail): File was just
      getting tossed off into the ether -- how did this ever work?
      (gnorb-org-email-subtree): Need to special-case ODT file export, it
      does too much clever stuff for us to invoke it at a low level.
    * packages/gnorb/gnorb.el: Bump version.
---
 gnorb-org.el | 25 +++++++++++++++++--------
 gnorb.el     |  2 +-
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/gnorb-org.el b/gnorb-org.el
index 9335cf6..c99cfff 100644
--- a/gnorb-org.el
+++ b/gnorb-org.el
@@ -444,7 +444,7 @@ around that link before you call this message."
               (message-mode-hook (copy-sequence message-mode-hook))
               mails)
          (when file
-           (cons file attachments))
+           (setq attachments (cons file attachments)))
          (when recs
            (setq recs
                  (delq nil
@@ -563,13 +563,22 @@ default set of parameters."
                       "*Gnorb Export*"
                       ,@opts
                       ,gnorb-org-email-subtree-text-parameters))
-           (apply 'org-export-to-file
-                  `(,backend-symbol
-                    ,(org-export-output-file-name
-                      (cl-second (assoc backend-symbol 
gnorb-org-export-extensions))
-                      t gnorb-tmp-dir)
-                    ,@opts
-                    ,gnorb-org-email-subtree-file-parameters))))
+           (if (eq backend-symbol 'odt)
+               ;; Need to special-case odt output, as it does too
+               ;; many clever things.  The only downside to this is
+               ;; it's impossible to put the exported file in the
+               ;; /tmp/ directory -- it will go wherever it would
+               ;; have gone with manual export.
+               (apply #'org-odt-export-to-odt
+                      (append (cl-subseq gnorb-org-email-subtree-file-options 
0 3)
+                              (list gnorb-org-email-subtree-file-parameters)))
+            (apply 'org-export-to-file
+                   `(,backend-symbol
+                     ,(org-export-output-file-name
+                       (cl-second (assoc backend-symbol 
gnorb-org-export-extensions))
+                       t gnorb-tmp-dir)
+                     ,@opts
+                     ,gnorb-org-email-subtree-file-parameters)))))
         text file)
     (if (bufferp result)
        (setq text result)
diff --git a/gnorb.el b/gnorb.el
index a7b9d6d..e2edb2e 100644
--- a/gnorb.el
+++ b/gnorb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2014  Free Software Foundation, Inc.
 
-;; Version: 1.1.4
+;; Version: 1.1.5
 ;; Package-Requires: ((cl-lib "0.5"))
 
 ;; Maintainer: Eric Abrahamsen <eric@ericabrahamsen.net>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]