From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12925: 24.1; string-make-unibyte instead of string-as-unibyte Date: Tue, 01 Jun 2021 17:03:53 +0300 Message-ID: <83zgw9znp2.fsf@gnu.org> References: <87wqxi24b3.fsf@betacantrips.com> <87lf7udq4q.fsf@gnus.org> <83fsy123yg.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6817"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 12925@debbugs.gnu.org, ethan.glasser.camp@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 01 16:05:26 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 1lo51J-0001Tu-MZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Jun 2021 16:05:25 +0200 Original-Received: from localhost ([::1]:51162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo51I-0002Ky-Es for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Jun 2021 10:05:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo50x-0002Kq-2Z for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2021 10:05:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54165) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lo50w-0007PJ-Qi for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2021 10:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lo50w-0000pL-G6 for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2021 10:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Jun 2021 14:05:02 +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.16225562573084 (code B ref 12925); Tue, 01 Jun 2021 14:05:02 +0000 Original-Received: (at 12925) by debbugs.gnu.org; 1 Jun 2021 14:04:17 +0000 Original-Received: from localhost ([127.0.0.1]:37478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lo50D-0000nd-CA for submit@debbugs.gnu.org; Tue, 01 Jun 2021 10:04:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lo50B-0000nD-Sc for 12925@debbugs.gnu.org; Tue, 01 Jun 2021 10:04:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57184) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo506-0006p6-5Z; Tue, 01 Jun 2021 10:04:10 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1803 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo505-0005a1-P2; Tue, 01 Jun 2021 10:04:10 -0400 In-Reply-To: (message from Stefan Monnier on Tue, 01 Jun 2021 09:45:07 -0400) 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:207776 Archived-At: > From: Stefan Monnier > Cc: Lars Ingebrigtsen , 12925@debbugs.gnu.org, > ethan.glasser.camp@gmail.com > Date: Tue, 01 Jun 2021 09:45:07 -0400 > > > Why not make both methods do the same: insert the bytes of the > > multibyte text into the unibyte buffer? > > AFAIK it's rather unusual to need to insert a text that's multibyte into > a buffer that's unibyte. Most possibly, people don't know the text is multibyte. Or don't care. > And in those cases, the right behavior is not always the same > (sometimes it should covert using something like > locale-coding-system, sometimes it should preserve the actual > byte-sequence used internally, sometimes it should signal an error, > ...). What I mean is: if we think the current behavior is broken, then what I suggest is at least less broken (and sometimes might just be TRT). At the very least what I suggest is reversible, whereas neither the current behavior nor what you suggest is.