Gnus development mailing list
 help / color / mirror / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: ding@gnus.org
Subject: gnus-dired-attach: default mime-type application/octet-stream, why
Date: Sun, 20 Jul 2014 23:24:04 +0200	[thread overview]
Message-ID: <87mwc37mh7.fsf@mat.ucm.es> (raw)

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

Hello

Why is the mime-type for gnus-dired-attach set for all attachments to
application/octet-stream? 

The relevant code is this 
      (while files-to-attach
	(mml-attach-file (car files-to-attach)
			 (or (mm-default-file-encoding (car files-to-attach))
			     "application/octet-stream") nil)
	(setq files-to-attach (cdr files-to-attach)))      

Which could be changed to 
(while files-to-attach
		(mml-attach-file (car files-to-attach)
			 (or (mm-default-file-encoding (car files-to-attach))
			     type) nil)


Another possibility is to have a wrapper which uses either the original
or the new function, something like this 

(defun gnus-dired-attach-arg (&optional arg)
"Wrapper to call either the orginal functions which uses type 
`application/octet-stream' or the new function which guesses the 
type, in the same way `mml-attach-file' does this."
  (interactive "P")
  (if arg
      (call-interactively 'gnus-dired-attach-guess)
    (call-interactively 'gnus-dired-attach)))


Any comments? I have a patch.

Uwe Brauer 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5556 bytes --]

             reply	other threads:[~2014-07-20 21:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-20 21:24 Uwe Brauer [this message]
2015-01-28  4:11 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mwc37mh7.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).