all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: handa <handa@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: handa@gnu.org, emacs-devel@gnu.org
Subject: Re: Mysterious use of string-as-multibyte
Date: Mon, 15 Jan 2018 23:36:00 +0900	[thread overview]
Message-ID: <87po6bmbov.fsf@gnu.org> (raw)
In-Reply-To: <jwv373c5qqh.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Thu, 11 Jan 2018 11:04:39 -0500)

In article <jwv373c5qqh.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> Do you remember why you added the call to string-as-multibyte in the
> patch below?
[...]
> -  (when smtpmail-code-conv-from
> -    (setq data (encode-coding-string data *internal* smtpmail-code-conv-from)))
> +  (if (and (multibyte-string-p data)
> +           smtpmail-code-conv-from)
> +      (setq data (string-as-multibyte
> +                  (encode-coding-string data smtpmail-code-conv-from))))
        
>    (if smtpmail-debug-info
>        (insert data "\r\n"))

I don't remember, sorry.  By guessing from the code, that change is to
make DATA a multibyte string so that the encoding done by the following
process-send-string produces the correct byte sequence.  Perhaps, the
change was done before the introduction of string-to-multibyte which is
more suitable for that purpose.

---
K. Handa
handa@gnu.org



  reply	other threads:[~2018-01-15 14:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 16:04 Mysterious use of string-as-multibyte Stefan Monnier
2018-01-15 14:36 ` handa [this message]
2018-01-15 21:39   ` Stefan Monnier
2018-01-17 12:32     ` handa

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=87po6bmbov.fsf@gnu.org \
    --to=handa@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.