Gnus development mailing list
 help / color / mirror / Atom feed
* Attach file improvement
@ 2011-02-22 12:08 Hobbit
  2011-02-22 12:49 ` Hobbit
  0 siblings, 1 reply; 10+ messages in thread
From: Hobbit @ 2011-02-22 12:08 UTC (permalink / raw)
  To: ding

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

Gnus is a wonderful program. However, when you need to attach to your
mail some files in a many different charsets it's quickly becomes tiring
to type charset=<charset name> into

| type="text/plain" filename="~/file.txt" disposition=attachment description=description

by hand. So I wrote a patch for Gnus (lisp/mml.el), with which
attachment process looks like:

| C-c C-a
| Attach file: ~/file.txt
| Content type (default text/plain): <RET>
| Charset (default nil): cp855
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| One line description: descr
| Disposition (default inline): attachment

Could you merge it into a Gnus repository?

Patch for lisp/mml.el:

[-- Attachment #2: patch contents --]
[-- Type: application/octet-stream, Size: 1041 bytes --]

1207a1208,1216
> (defun mml-minibuffer-read-charset (&optional default)
>   (let ((charset (completing-read
>                   (format "Charset (default %s): " default)
>                   (mapcar 'symbol-name charset-list)
>                   nil t nil nil default)))
>     (if (not (equal charset ""))
>         charset
>       default)))
> 
1280c1289,1290
< (defun mml-attach-file (file &optional type description disposition)
---
> (defun mml-attach-file (file &optional type description
>                              disposition charset)
1290c1300,1301
< body) or \"attachment\" (separate from the body)."
---
> body) or \"attachment\" (separate from the body). CHARSET is file
> charset."
1293a1305,1307
>       (charset (when (member (car (split-string type "/"))
>                              '("text" "message"))
>                  (mml-minibuffer-read-charset)))
1296c1310
<      (list file type description disposition)))
---
>      (list file type description disposition charset)))
1303a1318
>               'charset charset

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-05 12:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-22 12:08 Attach file improvement Hobbit
2011-02-22 12:49 ` Hobbit
2011-02-22 21:03   ` Hobbit
2011-02-23  9:55     ` Lars Ingebrigtsen
2011-02-23 21:14       ` Hobbit
2011-02-25  3:26         ` Lars Ingebrigtsen
2011-02-28 14:59           ` Hobbit
2011-03-05 12:27             ` Lars Magne Ingebrigtsen
2011-02-28 18:59           ` Hobbit
2011-03-05 12:25             ` Lars Magne Ingebrigtsen

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).