From: Hobbit <werehobbit@yandex.ru>
To: ding@gnus.org
Subject: Attach file improvement
Date: Tue, 22 Feb 2011 14:08:05 +0200 [thread overview]
Message-ID: <87d3mkb7bu.fsf@myhost.localdomain> (raw)
[-- 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
next reply other threads:[~2011-02-22 12:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 12:08 Hobbit [this message]
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
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=87d3mkb7bu.fsf@myhost.localdomain \
--to=werehobbit@yandex.ru \
--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).