* Attaching compressed files with jka-compr on
@ 2001-02-08 17:06 Charles Sebold
2001-02-08 17:22 ` ShengHuo ZHU
0 siblings, 1 reply; 2+ messages in thread
From: Charles Sebold @ 2001-02-08 17:06 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
I just sent a .tar.bz2 file to someone (attached it to a message with
mml-attach-file), and I realized that, with jka-compr loaded, it
bunzip2'ed the message, rebzip2'ed it, and then sent it. (Actually,
upon further investigation, it may have done all this as part of the
FCC; I'm no longer sure.)
Anyway, rather than have that happen, I thought I'd try to turn
auto-compression-mode off while all this is going on.
Here is my patch (against Oort Gnus 0.01, synced from CVS this morning):
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Context diff to disable jka-compr temporarily --]
[-- Type: text/x-patch, Size: 1206 bytes --]
*** source/gnus/lisp/message.el Wed Feb 7 14:23:00 2001
--- emacs/gnus/message.el Thu Feb 8 10:55:54 2001
***************
*** 2275,2280 ****
--- 2275,2285 ----
(let ((inhibit-read-only t))
(put-text-property (point-min) (point-max) 'read-only nil))
(message-fix-before-sending)
+ ;; turn off auto-compression-mode before managing attachments
+ (if (and (fboundp 'jka-compr-installed-p) (jka-compr-installed-p))
+ (progn
+ (setq jka-compr-temp-uninstalled-p t)
+ (auto-compression-mode 0)))
(run-hooks 'message-send-hook)
(message message-sending-message)
(let ((alist message-send-method-alist)
***************
*** 2302,2307 ****
--- 2307,2318 ----
(message-do-fcc)
(save-excursion
(run-hooks 'message-sent-hook))
+ ;; Now turn auto-compression-mode back on if it was before
+ (if (and (boundp 'jka-compr-temp-uninstalled-p)
+ jka-compr-temp-uninstalled-p)
+ (progn
+ (setq jka-compr-temp-uninstalled-p nil)
+ (auto-compression-mode 1)))
(message "Sending...done")
;; Mark the buffer as unmodified and delete auto-save.
(set-buffer-modified-p nil)
[-- Attachment #3: Type: text/plain, Size: 479 bytes --]
I would love to hear if it is appopriate or not, and what I should have
done if not. Originally I did this and added it to the appropriate
hooks but then I thought others might find this useful as well.
--
Charles Sebold
Random Answer to an Emacs Very Frequently Asked Question:
The bidirectional gnu.emacs.help mail gateway at gnu.org only does mail->news.
--
15th of Shevat, 5761
--
Meekness: Uncommon patience in planning a revenge that is worth while.
-- Ambrose Bierce
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Attaching compressed files with jka-compr on
2001-02-08 17:06 Attaching compressed files with jka-compr on Charles Sebold
@ 2001-02-08 17:22 ` ShengHuo ZHU
0 siblings, 0 replies; 2+ messages in thread
From: ShengHuo ZHU @ 2001-02-08 17:22 UTC (permalink / raw)
Charles Sebold <csebold@ezl.com> writes:
> I just sent a .tar.bz2 file to someone (attached it to a message with
> mml-attach-file), and I realized that, with jka-compr loaded, it
> bunzip2'ed the message, rebzip2'ed it, and then sent it. (Actually,
> upon further investigation, it may have done all this as part of the
> FCC; I'm no longer sure.)
>
> Anyway, rather than have that happen, I thought I'd try to turn
> auto-compression-mode off while all this is going on.
>
> Here is my patch (against Oort Gnus 0.01, synced from CVS this morning):
>
> I would love to hear if it is appopriate or not, and what I should have
> done if not. Originally I did this and added it to the appropriate
> hooks but then I thought others might find this useful as well.
What you saw are just bogus messages. Actually, jka-compr-handler has
been inhibited in this case (see mm-insert-file-contents). But since
I didn't check why jka-compr still prints out the messages, I might be
wrong. Further investigation helps.
ShengHuo
--
(setq gnus-posting-styles
'((".*" (signature (format "(setq gnus-posting-styles
'%S)" gnus-posting-styles)))))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-02-08 17:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-08 17:06 Attaching compressed files with jka-compr on Charles Sebold
2001-02-08 17:22 ` ShengHuo ZHU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).