Discussion:
change content type of attachment before sending
Uwe Brauer
2015-11-01 08:31:11 UTC
Permalink
Hi

Sometimes I by error want to sent a simple text file
but erroneously

as application/octet-stream instead of text/x-tex.

Can I change the content type before sending (I can of course edit the
attachment line but this is not what I mean)


thanks

Uwe Brauer
Andreas Schwab
2015-11-01 09:19:56 UTC
Permalink
Post by Uwe Brauer
Can I change the content type before sending
mml-attach-file prompts you for the type.

Andreas.
--
Andreas Schwab, ***@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Uwe Brauer
2015-11-01 14:50:00 UTC
Permalink
Post by Andreas Schwab
mml-attach-file prompts you for the type.
I know that. What I meant is:

Suppose I filled in the prompts and later recognized that I chose the
wrong type, how can I change the type (without editing the TAG)
Post by Andreas Schwab
Andreas.
Adam Sjøgren
2015-11-01 14:56:08 UTC
Permalink
Post by Uwe Brauer
Suppose I filled in the prompts and later recognized that I chose the
wrong type, how can I change the type (without editing the TAG)
How about deleting the tag and attaching the file again?

What is wrong with editing the tag?!


Best regards,

Adam
--
"Oh, we all like motorcycles, to some degree." Adam Sjøgren
***@koldfront.dk
Uwe Brauer
2015-11-01 17:25:22 UTC
Permalink
Post by Adam Sjøgren
Post by Uwe Brauer
Suppose I filled in the prompts and later recognized that I chose the
wrong type, how can I change the type (without editing the TAG)
How about deleting the tag and attaching the file again?
Because than I have to type (may be) the whole path of the directory.
Usually I use gnus-dired-attach, but there I don't know how to chose the type
Post by Adam Sjøgren
What is wrong with editing the tag?!
But what if I don't know the type? The beauty of the interactive call is that it
offers various possibilities which I never remember by heart.
Post by Adam Sjøgren
Best regards,
Adam
Adam Sjøgren
2015-11-01 17:49:02 UTC
Permalink
Post by Uwe Brauer
Post by Adam Sjøgren
How about deleting the tag and attaching the file again?
Because than I have to type (may be) the whole path of the directory.
Usually I use gnus-dired-attach, but there I don't know how to chose the type
So the underlying problem is that gnus-dired-attach doesn't prompt you
for the type?
Post by Uwe Brauer
Post by Adam Sjøgren
What is wrong with editing the tag?!
But what if I don't know the type?
Then you'll have a hard time choosing it from an interactive list.


Best regards,

Adam
--
"perldoc er din ven. Og vores." Adam Sjøgren
***@koldfront.dk
Uwe Brauer
2015-11-01 19:59:39 UTC
Permalink
Post by Adam Sjøgren
Post by Uwe Brauer
Post by Adam Sjøgren
How about deleting the tag and attaching the file again?
So the underlying problem is that gnus-dired-attach doesn't prompt you
for the type?
Right, once I try to cook something up, modify gnus-dired-attach, but it
never worked.
Post by Adam Sjøgren
Post by Uwe Brauer
Post by Adam Sjøgren
What is wrong with editing the tag?!
But what if I don't know the type?
Then you'll have a hard time choosing it from an interactive list.
This is why it is good to have a choice offered, as does mml-attach-file,

So it would be good to have a function say
mml-attach-change-type which acts on the TAG but offers what
mml-attach-file offers.
Adam Sjøgren
2015-11-01 20:18:24 UTC
Permalink
Post by Uwe Brauer
Post by Adam Sjøgren
Post by Uwe Brauer
Post by Adam Sjøgren
What is wrong with editing the tag?!
But what if I don't know the type?
Then you'll have a hard time choosing it from an interactive list.
This is why it is good to have a choice offered, as does mml-attach-file,
Uhm, no.
Post by Uwe Brauer
So it would be good to have a function say
mml-attach-change-type which acts on the TAG but offers what
mml-attach-file offers.
Wouldn't it be even better to fix the problem at the root,
gnus-dired-attach?


Best regards,

Adam
--
"file://osv er en del af http fra ruder konges tid." Adam Sjøgren
***@koldfront.dk
Eric S Fraga
2015-11-02 07:02:00 UTC
Permalink
On Sunday, 1 Nov 2015 at 17:25, Uwe Brauer wrote:

[...]
Post by Uwe Brauer
But what if I don't know the type? The beauty of the interactive call
is that it offers various possibilities which I never remember by
heart.
I am confused. In your OP, you said you wanted to erroneously set the
type, e.g. to application/octet-stream. Either you know what you want
to set to (erroneously) or the problem is a more fundamental one in your
mailcap settings? That is, if I misunderstood you and you in fact want
to correct erroneous file types, the problem is not with mml-xxx but
with your system's settings which mml uses to determine file types.
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 24.5.1 + Ma Gnus v0.14 + evil-git-ff74cfb
: BBDB version 3.1.2 (2015-10-12 16:00:52+00:00)
Uwe Brauer
2015-11-02 13:56:09 UTC
Permalink
On Sunday, 1 Nov 2015 at 17:25, Uwe Brauer wrote: [...]
Post by Uwe Brauer
But what if I don't know the type? The beauty of the interactive
call is that it offers various possibilities which I never
remember by heart.
I am confused. In your OP, you said you wanted to erroneously set
the type, e.g. to application/octet-stream. Either you know what
you want to set to (erroneously) or the problem is a more
fundamental one in your mailcap settings? That is, if I
misunderstood you and you in fact want to correct erroneous file
types, the problem is not with mml-xxx but with your system's
settings which mml uses to determine file types.
Ok here is the longer story. It concerns Xemacs and GNU emacs, tex files
and latin-1 and UTF-8 encoding.

Xemacs 21.5.X still uses Mule, while GNU emacs has moved to UFT-8
internally as far as I know.

Now the problem is the following:

- I send a latex file with latin-1 chars, buffer coding is set to
latin-1, via gnus as text/x-tex type to a Xemacs user: the
coding is corrupted.

- I send a latex file with latin-1 chars, buffer coding is set to
UTF-8, via gnus as text/x-tex type to a Xemacs user: the
coding is ok.

Now

- the user sends it back, but now it is the other way around: if he
sends using buffer coding is set to latin-1 via gnus as text/x-tex type
to me: the coding is ok

- The user sends it back, buffer coding is set to
UTF-8 via gnus as text/x-tex type me: the
coding is corrupted.

GNU emacs ---UTF8-> Xemacs OK
Xemacs ---latin-1-> GNU emacs ok

The problem can be circumvent using application/octet-stream then both
buffer codings are fine.
But I don't want that for every latex file.

That is why I want to be able to change the mml type, in case I made a
mistake, or using the dired function (since this much more comfortable
to use) which would allow me to chose the coding


Uwe Brauer
Eric S Fraga
2015-11-02 16:34:01 UTC
Permalink
Post by Uwe Brauer
Ok here is the longer story. It concerns Xemacs and GNU emacs, tex files
and latin-1 and UTF-8 encoding.
Okay, so I did understand your OP correctly. In this case, how many
different types of files will you want to set? Not many, probably only
application/octet-stream, so doing it manually seems like the right
solution...

Anyway, good luck with your search for a solution! At least there's a
possibility you'll achieve it as it's gnus+emacs and not something else
:-)
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 24.5.1 + Ma Gnus v0.14 + evil-git-ff74cfb
: BBDB version 3.1.2 (2015-10-12 16:00:52+00:00)
Loading...