From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#39506: patch Date: Sat, 08 Feb 2020 13:32:11 -0500 Message-ID: References: <87tv419ail.fsf@dick> <877e0xf72p.fsf@dick> <87v9ohdr21.fsf@dick> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2354"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 39506@debbugs.gnu.org To: dick.r.chiang@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 08 19:33:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j0Uum-0000Uq-3c for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 19:33:12 +0100 Original-Received: from localhost ([::1]:44280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0Uul-0001eC-5J for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 13:33:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43745) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0Uud-0001Zm-Ku for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 13:33:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0Uuc-0005Dl-N2 for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 13:33:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45814) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0Uuc-0005Bl-H5 for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 13:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j0Uuc-0003Uk-Be; Sat, 08 Feb 2020 13:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sat, 08 Feb 2020 18:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39506 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 39506-submit@debbugs.gnu.org id=B39506.158118674513390 (code B ref 39506); Sat, 08 Feb 2020 18:33:02 +0000 Original-Received: (at 39506) by debbugs.gnu.org; 8 Feb 2020 18:32:25 +0000 Original-Received: from localhost ([127.0.0.1]:51787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0Uu1-0003Tu-0b for submit@debbugs.gnu.org; Sat, 08 Feb 2020 13:32:25 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0Uty-0003Tf-4U for 39506@debbugs.gnu.org; Sat, 08 Feb 2020 13:32:24 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 62A3644E389; Sat, 8 Feb 2020 13:32:16 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C032744E384; Sat, 8 Feb 2020 13:32:14 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1581186734; bh=9KZAbmI4orluEinLIwszUB8IOgYcEfvrszTQnQyoukI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=SvTvoQDFrobvf+es42wE30nWoHXk2rf9eNfwPp+roqlftrCGwoXvviRpIGAG2SQ1y SD6WaWLY+ol3Ua6vBFvoDFR86kZZTJ/p0JtMQGaqkHojE95Ii8iUTM+mCMVAFZZSfD WWrR8us/ObApClWbuxiwxWTIfWn6RnG3Q6tmIfG0t/BoBGJuwb4AuM8jvsUh++4EPs q4mmjsiQDY3yPHBzL6efJ056Ecw1YYkW9vuDU4cJvn22hbn1UJ3qf+Fh1hfHq5Y4xl erwTJHObCBldzzMMg/8cKSWS2xiNyFiJmu704TW92VajR3tvevOe3B8t+KIzfKDSt0 W2ZusZjYvzuSw== Original-Received: from pastel (unknown [157.52.14.222]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 489DC1207A2; Sat, 8 Feb 2020 13:32:14 -0500 (EST) In-Reply-To: <87v9ohdr21.fsf@dick> (dick r. chiang's message of "Sat, 08 Feb 2020 10:41:58 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175803 Archived-At: > In the changelog message of commit d4eb2b7, you claim to "set the > buffer to unibyte before inserting" but it's not clear where. The focus of the sentence is on "before": the previous code already set the buffer to unibyte, but it did it afterwards. > Then in a later comment, you say "may happen that the handle-buffer is > multibyte... in which case now is a good time to adjust it, since we > know ... it should be unibyte." The revision before that preserves > the multibyte-p setting, so I do the same in this patch. As the motivation for your patch, you write: > In my Gnus experience, the source buffer that mm-shr acts upon can be > multibyte. Two questions: - How does `mm-with-part` relate to `mm-shr`? - Before deciding whether unibyte or multibyte is the right choice, the main question is whether the buffer contains bytes or chars. AFAIK `mm-with-part` should only ever handle bytes (otherwise calling `mm-decode-content-transfer-encoding` doesn't make much sense). Your patch suggests you have a use case where this is not true. Can you give more details about this case? Maybe a backtrace showing how we got to this particular call to `mm-with-part`? -- Stefan