Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: "Adam Sjøgren" <asjo@koldfront.dk>
To: info-gnus-english@gnu.org
Subject: Re: line brake for attachments
Date: Thu, 15 Feb 2024 15:56:39 +0100	[thread overview]
Message-ID: <87frxtg4ig.fsf@tullinup.koldfront.dk> (raw)
In-Reply-To: <rieplwxc0vv.fsf@faulbaum.in-berlin.de>

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



      reply	other threads:[~2024-02-15 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 13:28 Dieter Faulbaum
2024-02-15 14:56 ` Adam Sjøgren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frxtg4ig.fsf@tullinup.koldfront.dk \
    --to=asjo@koldfront.dk \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).