From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 05:43:56 2019 Received: (at submit) by debbugs.gnu.org; 2 Oct 2019 09:43:56 +0000 Received: from localhost ([127.0.0.1]:35420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbAp-0008Vy-Ug for submit@debbugs.gnu.org; Wed, 02 Oct 2019 05:43:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:50100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbAn-0008Vr-V2 for submit@debbugs.gnu.org; Wed, 02 Oct 2019 05:43:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48325) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbAm-0004OL-Io for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2019 05:43:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbAl-000236-AH for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2019 05:43:52 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:37235) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbAl-00021o-4W for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2019 05:43:51 -0400 Received: by mail-pf1-x42b.google.com with SMTP id y5so10051407pfo.4 for ; Wed, 02 Oct 2019 02:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=qhP5Z/LGV7ij4507nW+bzj4AeGsykFjGpmllf54l+cY=; b=Hs7+N6Jh6New7vVTfiqyCVjlfzaRSnB1OEv/DuGUrQG4v4zpdOL8ki6cqaFk7o5mLl di9tk5n7QhcZtZl8GdzxXmsgSGHQuKEd7GVXxDaqJvI2wgzNpRgX/ZxLvIKStfby5tmT roDjpZquIT3FIUTtzTwHR5CZsIovTFarZkaL2gZISNZlgxXxoPrBp8nKM/QX6lwsdMhk O3tKOt+GO4g2iP9CaBbglViCET1IPPxPHX/vGcroYdP/Qv2me48pfzhRsXgy3Ic0QOgb 7Y4ulobkOVGbuqhecbV/VtkTxHU5fSloB8CMudRGbrwMw2Yi+ElLFt970/BIz+Pwi+M0 a1lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=qhP5Z/LGV7ij4507nW+bzj4AeGsykFjGpmllf54l+cY=; b=AKNQF9nNs3bn7fssISLXF+WYKBPDKxrXr4O7JnJ+zGygBywOeNSkx7wsn2ugfWtDWT clkeKbOBFahCX5z7EkZcDL6TLTsloFHB0XaF1YK99y8JpBAd5EBFLbJhXqny1EDALcVz iRRNDj9i+bTxLC/0JIgd6ozVhjBKXRNg5r0isMABf5Adhj4McS1JjGyLkLb/d2xXOAdd 9i+zxISre3Mpdh3OW1FyRi19ZN0+k9YVepWEqhh4rNw0TQ/DabEQOegTN1iJ7u/JesgP ygEcXebRK9I74VGcKvQKdq0qsZxs9D0thpj/m3ojdEUKJUzFUlklqfhj7wUDh0zmg2fk DAPA== X-Gm-Message-State: APjAAAUng4RLMo3OaapNqktYcvfRCioNe2K2I5ScRfby7c8OwoQKmMjg pvn8cU8rpntW+ghPYrAzCIy9KEvV X-Google-Smtp-Source: APXvYqxTzgm2ebZ+JxzfZ1zTyAioWLcP32em226gRwtfXMfgkNojHBzAJNhPJwVbD2tY0a7PPlpw7Q== X-Received: by 2002:a63:2363:: with SMTP id u35mr2882944pgm.208.1570009429684; Wed, 02 Oct 2019 02:43:49 -0700 (PDT) Received: from HP (east49-p55.eaccess.hi-ho.ne.jp. [219.105.5.56]) by smtp.gmail.com with ESMTPSA id r186sm17269739pfr.40.2019.10.02.02.43.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 02:43:49 -0700 (PDT) From: ynyaaa@gmail.com To: bug-gnu-emacs@gnu.org Subject: 26.3; setting buffer as unibyte temporarily may change buffer contents Date: Wed, 02 Oct 2019 18:43:45 +0900 Message-ID: <86ftkbscry.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42b X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) If a multibyte buffer contains eight-bit character sequences, evaluating the form (progn (set-buffer-multibyte nil) (set-buffer-multibyte t)) may convert them to multibyte characters. Afterwards, buffer-undo-list may be inappropriate. Undo in the form below changes the position of character '1'. (with-temp-buffer (insert "一123") (encode-coding-region 1 2 'utf-8) (buffer-enable-undo) (undo-boundary) (progn (goto-char (point-min)) (search-forward "1") (delete-char -1)) (undo-boundary) (progn (set-buffer-multibyte nil) (set-buffer-multibyte t)) (undo) (buffer-string)) =>"一231" In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 built on CIRROCUMULUS Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor 'Microsoft Corp.', version 6.3.9600 Recent messages: Configured using: 'configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2 Important settings: value of $LANG: JPN locale-coding-system: cp932 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t Load-path shadows: None found. Features: (network-stream nsm starttls tls gnutls mailalias smtpmail auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs misearch multi-isearch pp shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-extra thingatpt help-fns radix-tree help-mode cl-loaddefs cl-lib image-mode easymenu elec-pair time-date mule-util japan-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 120602 43655) (symbols 48 21333 2) (miscs 40 80 287) (strings 32 35067 1048) (string-bytes 1 899321) (vectors 16 16930) (vector-slots 8 597369 14750) (floats 8 64 249) (intervals 56 848 3) (buffers 992 21)) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 11:15:07 2019 Received: (at 37580) by debbugs.gnu.org; 2 Oct 2019 15:15:07 +0000 Received: from localhost ([127.0.0.1]:38162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFgLL-0000Gv-4v for submit@debbugs.gnu.org; Wed, 02 Oct 2019 11:15:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFgLJ-0000G1-JY for 37580@debbugs.gnu.org; Wed, 02 Oct 2019 11:15:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iFgLE-0006gE-Gw; Wed, 02 Oct 2019 11:15:00 -0400 Received: from [176.228.60.248] (port=2159 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iFgLD-0007r8-6D; Wed, 02 Oct 2019 11:14:59 -0400 Date: Wed, 02 Oct 2019 18:14:43 +0300 Message-Id: <83h84r89i4.fsf@gnu.org> From: Eli Zaretskii To: ynyaaa@gmail.com In-reply-to: <86ftkbscry.fsf@gmail.com> (ynyaaa@gmail.com) Subject: Re: bug#37580: 26.3; setting buffer as unibyte temporarily may change buffer contents References: <86ftkbscry.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37580 Cc: 37580@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: ynyaaa@gmail.com > Date: Wed, 02 Oct 2019 18:43:45 +0900 > > > If a multibyte buffer contains eight-bit character sequences, > evaluating the form > (progn (set-buffer-multibyte nil) (set-buffer-multibyte t)) > may convert them to multibyte characters. > > Afterwards, buffer-undo-list may be inappropriate. > Undo in the form below changes the position of character '1'. I don't think this is a bug. Changing the multibyte-ness of a buffer really does change the contents. You should only do that where it makes sense. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 05 13:18:23 2019 Received: (at 37580) by debbugs.gnu.org; 5 Oct 2019 17:18:23 +0000 Received: from localhost ([127.0.0.1]:45123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGnhH-0003a5-0Y for submit@debbugs.gnu.org; Sat, 05 Oct 2019 13:18:23 -0400 Received: from mail-pl1-f180.google.com ([209.85.214.180]:45781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGnhE-0003Zr-PN for 37580@debbugs.gnu.org; Sat, 05 Oct 2019 13:18:21 -0400 Received: by mail-pl1-f180.google.com with SMTP id u12so4655365pls.12 for <37580@debbugs.gnu.org>; Sat, 05 Oct 2019 10:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=w30p3ufQGP7b1Rq47o9Ij9rzSGY92pfxUJgYGUnS3Zk=; b=FVf7uonlfZ8yDDeKyRy6V250mtTn2UKoJNRHNKMGZDSKwdDs/NJf/wDfu2+7Kt7sKg PAWLZIHpFSIaWJ79ZTRF/AEHBDrGWne5Hx62q4SAxRIBVAPYkuJD8BhTap3KQFGc5jSG pVaze4nb0XqheLfhnca1sIulqKUTKZ5EhD7D+3eeBHm4pUZ1b+rJZ7l1JeXlCEx/5sLe cM09647XBPeNpXf8jGgeKQMJ7yxEpVgyBmnqJsN0vOJ9M/n9GrX92b56APXmP08xc/PG UgnScHPKb09b7GmEyWyoqS/OuF8aXI4jJQpLfZ428oJMbxAsmzBZlAs9zxlsnyHS2+yD 2PfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=w30p3ufQGP7b1Rq47o9Ij9rzSGY92pfxUJgYGUnS3Zk=; b=M1fgLrggEbmRxlkGeNHYScEHqiWfneDtyf+T3B/AfV7jYJM4ymPGAqyVW+2VumOewV 1RIQPP50PXpPA50w914NyWoPQ3zzKrqf2MtgyNeFhuc7JAmRmlZmzZ/kspuukp2lL5Bb gw3uoUYrYr9i+Wx6iw76KN+Yjj9wJ9oGUD3Zg5K9gZrVr8cYCp3Tv0AAK3792ZVj5kyg RvU3NUKnqXK5nGA4v0Uruf47TuuiqjSvWl+2y7CfyFDCeiu1Trep5zhUOLGAhteyXYBh m+6Dm9P27sHKkTOQvJPPO7ebP5M1y1Fh2DWpr4KuEUtc4OJYMdXNgqxHKdYR0+OQ6bBz ePkA== X-Gm-Message-State: APjAAAVgcixKl3V1ivxAdE15nYKKC6kjvUUwdnFt8SgV8PXSISqsRmWh NfVyt3W6YthCMIT8cA8NO9Zypyxx X-Google-Smtp-Source: APXvYqwt/1Yk/dKcrP8XLo2AlekE87el6vGCvVGSErsy4BUI3Ozy9M/9CWSH0fAvs/9z9Z9AVhuNpA== X-Received: by 2002:a17:902:848e:: with SMTP id c14mr21384096plo.217.1570295894672; Sat, 05 Oct 2019 10:18:14 -0700 (PDT) Received: from HP (east49-p55.eaccess.hi-ho.ne.jp. [219.105.5.56]) by smtp.gmail.com with ESMTPSA id x12sm9734343pfm.130.2019.10.05.10.18.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 Oct 2019 10:18:13 -0700 (PDT) From: ynyaaa@gmail.com To: Eli Zaretskii Subject: Re: bug#37580: 26.3; setting buffer as unibyte temporarily may change buffer contents References: <86ftkbscry.fsf@gmail.com> <83h84r89i4.fsf@gnu.org> Date: Sun, 06 Oct 2019 02:18:08 +0900 In-Reply-To: <83h84r89i4.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 02 Oct 2019 18:14:43 +0300") Message-ID: <86lftz157z.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37580 Cc: 37580@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > I don't think this is a bug. Changing the multibyte-ness of a buffer > really does change the contents. You should only do that where it > makes sense. Sometimes I find broken utf-8 texts on the Internet. Some characters are split into surrogate pairs, and each surrogate character is encoded as if it is a normal BMP character. utf-8 coding system does not decode such sequences. Changing multibyte-ness converts them to surrogate characters. And encode-decode process with utf-16be outputs the intended characeters. Suppose the character is #x10000, the correspoding pair is (#xD800 #xDC00). The miss-encoded sequence is: (encode-coding-string "\xD800\xDC00" 'utf-8) => "\355\240\200\355\260\200" It is not decoded with utf-8. (decode-coding-string (encode-coding-string "\xD800\xDC00" 'utf-8) 'utf-8) => "\355\240\200\355\260\200" Changing multibyte-ness, the sequence is converted into surrogate characters. (with-temp-buffer (insert (encode-coding-string "\xD800\xDC00" 'utf-8)) (set-buffer-multibyte nil) (set-buffer-multibyte t) (buffer-string)) => "\xD800\xDC00" The surrogate pair can be converted into the original character. (decode-coding-string (encode-coding-string "\xD800\xDC00" 'utf-16be) 'utf-16be) => "\x10000" From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 05 14:56:54 2019 Received: (at 37580) by debbugs.gnu.org; 5 Oct 2019 18:56:54 +0000 Received: from localhost ([127.0.0.1]:45236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGpEc-0005yW-BR for submit@debbugs.gnu.org; Sat, 05 Oct 2019 14:56:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGpEa-0005yI-MT for 37580@debbugs.gnu.org; Sat, 05 Oct 2019 14:56:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iGpEV-0001jY-G7; Sat, 05 Oct 2019 14:56:47 -0400 Received: from [176.228.60.248] (port=2822 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iGpEU-0006Tq-5e; Sat, 05 Oct 2019 14:56:47 -0400 Date: Sat, 05 Oct 2019 21:56:36 +0300 Message-Id: <83tv8n2f8b.fsf@gnu.org> From: Eli Zaretskii To: ynyaaa@gmail.com In-reply-to: <86lftz157z.fsf@gmail.com> (ynyaaa@gmail.com) Subject: Re: bug#37580: 26.3; setting buffer as unibyte temporarily may change buffer contents References: <86ftkbscry.fsf@gmail.com> <83h84r89i4.fsf@gnu.org> <86lftz157z.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37580 Cc: 37580@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: ynyaaa@gmail.com > Cc: 37580@debbugs.gnu.org > Date: Sun, 06 Oct 2019 02:18:08 +0900 > > Sometimes I find broken utf-8 texts on the Internet. > Some characters are split into surrogate pairs, and each surrogate > character is encoded as if it is a normal BMP character. > > utf-8 coding system does not decode such sequences. > Changing multibyte-ness converts them to surrogate characters. > And encode-decode process with utf-16be outputs the intended characeters. > > Suppose the character is #x10000, > the correspoding pair is (#xD800 #xDC00). > The miss-encoded sequence is: > (encode-coding-string "\xD800\xDC00" 'utf-8) > => "\355\240\200\355\260\200" > > It is not decoded with utf-8. > (decode-coding-string (encode-coding-string "\xD800\xDC00" 'utf-8) > 'utf-8) > => "\355\240\200\355\260\200" > > Changing multibyte-ness, the sequence is converted into surrogate > characters. > (with-temp-buffer > (insert (encode-coding-string "\xD800\xDC00" 'utf-8)) > (set-buffer-multibyte nil) > (set-buffer-multibyte t) > (buffer-string)) > => "\xD800\xDC00" > > The surrogate pair can be converted into the original character. > (decode-coding-string (encode-coding-string "\xD800\xDC00" 'utf-16be) > 'utf-16be) > => "\x10000" So where's the problem in all this? AFAIU, you describe a sequence of actions that successfully recovers text in an obscure situation. I think the problem is that you enable undo. So in that case, just don't do that. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 19:27:14 2019 Received: (at 37580) by debbugs.gnu.org; 28 Oct 2019 23:27:14 +0000 Received: from localhost ([127.0.0.1]:46577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPEPp-0004re-Sr for submit@debbugs.gnu.org; Mon, 28 Oct 2019 19:27:14 -0400 Received: from mail-pg1-f169.google.com ([209.85.215.169]:44349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iPEPo-0004rI-PV for 37580@debbugs.gnu.org; Mon, 28 Oct 2019 19:27:13 -0400 Received: by mail-pg1-f169.google.com with SMTP id e10so8065624pgd.11 for <37580@debbugs.gnu.org>; Mon, 28 Oct 2019 16:27:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ty35Zdse8ZMU1RMrK0+OPPdl165OoD+h1HXEvLaGQ5g=; b=Y7J3wXnHdzskbnfLbMcJpfkE3RFSTDQkxIIHPh9MzAYew/f/9pAuyPW4XVBj+USbOZ fIpoGG83nu5ThR+xtuxiAxBso3uk6Kt6AJ4PFsV6EkX/xcvJow0Hy5O3HnBBLKmTmIxn 9kM+a/0i1UEs6yS7aCT7f9BiH2zDCUlLO/CIIBmNXnrQ7243mTXEzPML1TI3TdzW+Csh LZEDGdV6XvKI0zsVg8mfNhoYMyiSAjz5M39CjryRqgzO6fKn+w8TXC0QZlXhLk/p9Kn4 Jn/Q0mRy8m+QDgq/4OtEuJ087COIw9SM/UDGbjsZ/x4yoyoCYLUeU2vS0+fKeb5g74QU 0GEQ== X-Gm-Message-State: APjAAAWrkYqOV8X9WspoQPsQACEPSIj4FSB7nYrL8OmjKuy3ep9B0lL+ 71MTqxsEnHFjXX1qKA+x7uGg3xRE+dtn02wSZlc= X-Google-Smtp-Source: APXvYqw36o+hmtES7pLAMoE9F+diRhVy8VDreUN3lE2yk4q06od+zYeJYQDtvLocCUt/n1g0b7OIo+Uh1zoIQL0KqmU= X-Received: by 2002:aa7:80c6:: with SMTP id a6mr23038493pfn.107.1572305226931; Mon, 28 Oct 2019 16:27:06 -0700 (PDT) MIME-Version: 1.0 References: <86ftkbscry.fsf@gmail.com> <83h84r89i4.fsf@gnu.org> <86lftz157z.fsf@gmail.com> <83tv8n2f8b.fsf@gnu.org> In-Reply-To: <83tv8n2f8b.fsf@gnu.org> From: Stefan Kangas Date: Tue, 29 Oct 2019 00:26:55 +0100 Message-ID: Subject: Re: bug#37580: 26.3; setting buffer as unibyte temporarily may change buffer contents To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 37580 Cc: 37580@debbugs.gnu.org, ynyaaa@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 37580 + notabug close 37580 thanks Eli Zaretskii writes: [...] > So where's the problem in all this? AFAIU, you describe a sequence of > actions that successfully recovers text in an obscure situation. > > I think the problem is that you enable undo. So in that case, just > don't do that. No further comments, so I'm closing this as notabug. Best regards, Stefan Kangas From unknown Fri Aug 15 15:34:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 26 Nov 2019 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator