[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help] attachment description default to file name

From: Leon
Subject: Re: [help] attachment description default to file name
Date: Sat, 15 Jul 2006 15:30:55 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux)

Andreas Seltenreich <> writes:

> Leon <> writes:
>> When attaching a file, there is a "one line description:"? How can I
>> set it default to the file name? I find it useful because when I
>> download the attachment from webmail interface the description is the
>> file name to save.
> You could write a function that wraps around mml-attach-file and use
> that instead. E.g. (untested):
> --8<---------------cut here---------------start------------->8---
> (defun my-attach-file (file &optional type description disposition)
>   (interactive
>    (let* ((file (mml-minibuffer-read-file "Attach file: "))
>         (type (mml-minibuffer-read-type file))
>         (description
>          (read-string
>           (format "One line description (default %s): " file) nil nil file))
>         (disposition (mml-minibuffer-read-disposition type)))
>         (list file type description disposition)))
>   (mml-attach-file file type description disposition))
> --8<---------------cut here---------------end--------------->8---
> regards,
> andreas

Thank you, Andreas. It works.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]