Re: line brake for attachments

2024-02-15 Thread Adam Sjøgren
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."a...@koldfront.dk




line brake for attachments

2024-02-15 Thread Dieter Faulbaum



if I attach a file, I always have a newline in the message buffer 
like this:
(the backslashes are only there to not interpret the part (before 
sending))


<\#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?