Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* [help] attachment description default to file name
@ 2006-06-21 14:14 Leon
  2006-07-15 13:31 ` Andreas Seltenreich
  0 siblings, 1 reply; 3+ messages in thread
From: Leon @ 2006-06-21 14:14 UTC (permalink / raw)


Hi all,

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.

Thanks.
-- 
Leon

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

* Re: [help] attachment description default to file name
  2006-06-21 14:14 [help] attachment description default to file name Leon
@ 2006-07-15 13:31 ` Andreas Seltenreich
  2006-07-15 14:30   ` Leon
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Seltenreich @ 2006-07-15 13:31 UTC (permalink / raw)


Leon <sdl.web@gmail.com> 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

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

* Re: [help] attachment description default to file name
  2006-07-15 13:31 ` Andreas Seltenreich
@ 2006-07-15 14:30   ` Leon
  0 siblings, 0 replies; 3+ messages in thread
From: Leon @ 2006-07-15 14:30 UTC (permalink / raw)


Andreas Seltenreich <seltenreich@gmx.de> writes:

> Leon <sdl.web@gmail.com> 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.

-- 
Leon

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

end of thread, other threads:[~2006-07-15 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 14:14 [help] attachment description default to file name Leon
2006-07-15 13:31 ` Andreas Seltenreich
2006-07-15 14:30   ` Leon

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