1.6 Files and Directories

mm-default-directory

The default directory for saving attachments. If nil use default-directory.

mm-tmp-directory

Directory for storing temporary files.

mm-file-name-rewrite-functions

A list of functions used for rewriting file names of MIME parts. Each function is applied successively to the file name. Ready-made functions include

mm-file-name-delete-control

Delete all control characters.

mm-file-name-delete-gotchas

Delete characters that could have unintended consequences when used with flawed shell scripts, i.e., ‘|’, ‘>’ and ‘<’; and ‘-’, ‘.’ as the first character.

mm-file-name-delete-whitespace

Remove all whitespace.

mm-file-name-trim-whitespace

Remove leading and trailing whitespace.

mm-file-name-collapse-whitespace

Collapse multiple whitespace characters.

mm-file-name-replace-whitespace

Replace whitespace with underscores. Set the variable mm-file-name-replace-whitespace to any other string if you do not like underscores.

The standard Emacs functions capitalize, downcase, upcase and upcase-initials might also prove useful.

mm-path-name-rewrite-functions

List of functions used for rewriting the full file names of MIME parts. This is used when viewing parts externally, and is meant for transforming the absolute name so that non-compliant programs can find the file where it’s saved.