From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#12925: 24.1; string-make-unibyte instead of string-as-unibyte Date: Wed, 02 Jun 2021 07:07:25 +0200 Message-ID: <87r1hkam7m.fsf@gnus.org> References: <87wqxi24b3.fsf@betacantrips.com> <87lf7udq4q.fsf@gnus.org> <83fsy123yg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38560"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: monnier@iro.umontreal.ca, 12925@debbugs.gnu.org, ethan.glasser.camp@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 02 07:08:09 2021 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 1loJ6v-0009mC-Lq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 07:08:09 +0200 Original-Received: from localhost ([::1]:52558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loJ6u-0002p7-A4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 01:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loJ6o-0002nM-8i for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2021 01:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loJ6o-0004uJ-1B for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2021 01:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1loJ6n-00057N-R1 for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2021 01:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Jun 2021 05:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12925 X-GNU-PR-Package: emacs Original-Received: via spool by 12925-submit@debbugs.gnu.org id=B12925.162261045919645 (code B ref 12925); Wed, 02 Jun 2021 05:08:01 +0000 Original-Received: (at 12925) by debbugs.gnu.org; 2 Jun 2021 05:07:39 +0000 Original-Received: from localhost ([127.0.0.1]:38340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loJ6Q-00056m-Nv for submit@debbugs.gnu.org; Wed, 02 Jun 2021 01:07:38 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:53280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loJ6O-00056Y-32 for 12925@debbugs.gnu.org; Wed, 02 Jun 2021 01:07:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=B/pKi+b5t+7QnvRRV+4sLwi48Fl0UnUoQ3h9yRtmzTA=; b=bRaUQuqkYmSQVlzSxch5JQ6QZS cApy0icNFAI1jFErluTWR4f/TkCMuHvgQW/4YmaCF9/sgUCXisMUTkjqU3gGOKMHVPinZRiui3h3z ZgR0qp8DbTZXwLTytbW27Xq9NTjwqnu+r7FFQ0AK8nA+eJRoinipePzmvLqpo07xhL9g=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1loJ6D-00020T-LL; Wed, 02 Jun 2021 07:07:28 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUYGBdfX1+vr7H/ //+lh0GJAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UGAgUANf9sG3IAAAFoSURBVCjPTZK/bsIwEMY/ SzGqmIKEEXjq0IU+hTvA0Okq2agwk6rhKVi6Z2iYMyRSc0/Zsw2lN1j38/357LOBaOHEo8PVzGH0 N9/q3VA4qOh7+8qjJh3EV4Xdcu+wGOCFteXeY1XB1JpguSuxrLBZLjw0N9KywhcmvoASFROwcuY4 OAjMWlh4Gs7IkSVqCGDm1lEnYBQwNHtDrB0JJAI6na1u9LChpwgFPjo7FvSYI1VnakhmgjU9eIcy gdrLIkKLuKBKcUpgnsR9B5mY1e/lyj+yGSfgTmfZQRL9IENQBExEc0sLSpOJMLmEDAbzeSFjyqNE HWxjMljwWOuKMG1iDTOtpMb2MY250QLTPp6NuTe7Hg/LVBOhRTHPaT8mHKHdFcqylLtfQY1IIDPj MOXzFfa77+c/uOzfT5xfOqCt/R3qz+4Oh+p8gxbtgNggR7hTNr5oghBetpImrVWETcj/JoEY/YcU Uv4Xme1vHq2bd60AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDYtMDJUMDU6MDA6NTMrMDA6MDBl 74uoAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTA2LTAyVDA1OjAwOjUzKzAwOjAwFLIzFAAAAABJ RU5ErkJggg== X-Now-Playing: The Band's _The Band (2)_: "Loving You Is Sweeter Than Ever" In-Reply-To: <83fsy123yg.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Jun 2021 14:56:39 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:207820 Archived-At: Eli Zaretskii writes: > Why not make both methods do the same: insert the bytes of the > multibyte text into the unibyte buffer? I think it's still common to have raw bytes in multibyte buffers. Inserting data from these buffers into unibyte buffers works fine. (That's the rationale for inserting the "lower byte" in these situations.) So I don't think we should change this to insert the multibyte text, because that'd break stuff. The question is what to do when inserting multibyte characters in unibyte buffers, and I think that's always an error (i.e., it's never what the person who wrote the code wanted to happen). I think we should start off by doing a demoted warning thing, and then segue into signalling an error at a later date. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no