[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line brake for attachments
From: |
Adam Sjøgren |
Subject: |
Re: line brake for attachments |
Date: |
Thu, 15 Feb 2024 15:56:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Dieter writes:
> <\#part ...>
> <\#/part>"
>
> for me it would be (much) nicer if this attachment needs only one line
> like this:
>
> <\#part ...><\#/part>"
>
> Is it possible to have a (customizable) variable for this behaviour?
Not out of the box, it seems to be "hardcoded" in the last line of
mml-insert-tag:
(defun mml-insert-tag (name &rest plist)
"Insert an MML tag described by NAME and PLIST."
(when (symbolp name)
(setq name (symbol-name name)))
(insert "<#" name)
(while plist
(let ((key (pop plist))
(value (pop plist)))
(when value
;; Quote VALUE if it contains suspicious characters.
(when (string-match "[][\"'\\~/*;()<>= \t\n[:multibyte:]]" value)
(setq value (with-output-to-string
(let (print-escape-nonascii)
(prin1 value)))))
(insert (format " %s=%s" key value)))))
(insert ">\n"))
which is called by mml-insert-empty-tag, which is in turn called by
mml-attach-file - called by you, I assume.
You could either wrap mml-attach-file in a little code that removes
the linefeed you do not like, and then call that, or (perhaps more
risky) add an advice to mml-insert-tag. Or simply override it with
your own version :-)
Best regards,
Adam
--
"Jo, tak som falbyder, det ville da være Adam Sjøgren
prisværdigt." asjo@koldfront.dk