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#65049: Minor update to the repro steps Date: Fri, 25 Aug 2023 09:18:42 +0300 Message-ID: <83ttsnoda5.fsf@gnu.org> References: <83y1iruky1.fsf@gnu.org> <83il9qom6k.fsf@gnu.org> <86v8dandhq.fsf@mail.linkov.net> <83bkf1woy3.fsf@gnu.org> <835y57tf23.fsf@gnu.org> <87edjvp6ev.fsf@gmail.com> <83350btdw8.fsf@gnu.org> <831qftspal.fsf@gnu.org> <35b50832-e9ca-9f57-fad6-68621d9b42e7@gutov.dev> <83pm3dqbtp.fsf@gnu.org> <789dacd3-8e62-74ad-f691-5b48cb1d678b@gutov.dev> <2f6986e7-f96b-98bd-4581-7503bb01b111@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9026"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65049@debbugs.gnu.org, habamax@gmail.com, juri@linkov.net To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 25 08:19:16 2023 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 1qZQA8-00027J-5f for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Aug 2023 08:19:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZQ9r-0007Iw-IT; Fri, 25 Aug 2023 02:18:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qZQ9q-0007Ia-FE for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 02:18:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZQ9q-0000W6-5x for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 02:18:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZQ9u-00034h-H6 for bug-gnu-emacs@gnu.org; Fri, 25 Aug 2023 02:19: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: Fri, 25 Aug 2023 06:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65049 X-GNU-PR-Package: emacs Original-Received: via spool by 65049-submit@debbugs.gnu.org id=B65049.169294431011778 (code B ref 65049); Fri, 25 Aug 2023 06:19:02 +0000 Original-Received: (at 65049) by debbugs.gnu.org; 25 Aug 2023 06:18:30 +0000 Original-Received: from localhost ([127.0.0.1]:39015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZQ9N-00033u-OJ for submit@debbugs.gnu.org; Fri, 25 Aug 2023 02:18:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZQ9L-00033d-Ap for 65049@debbugs.gnu.org; Fri, 25 Aug 2023 02:18:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qZQ9A-0000GV-DR; Fri, 25 Aug 2023 02:18:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=0rigeIL45QL3JCoYr1xe/F5cFlGvicClzN4xCLobt+k=; b=cXF+Z45trGnIY3TEuPOU DPflNHdrUr9EikR+eFPS1jIWpugjIw7/f8pnPe/kBFHRctbV8vkV/lB86umXZWWpR8nKKNLCyAhJW 89iXGid60E7EWtMHt6SNTthUStMaj+gvDp1ioAZrxXjySoaCTSC2OywjqAaMroWCWHws1dTNjrbJl ZdfkGP90zZ98cu7lLBL5IkqHlXp3Kqbn80ytm2QDbsatIo9th1hD63pyCwYi8A37JZy6rLbh8LRz3 kA1vK/+V3841d6gl8Pxv740uIdtZhE+bE3/C7vZtm5amwElpeNazOX5re+Y1X2sqCrlYQGge9F68Z B84Zsuf4T7WyYA==; In-Reply-To: <2f6986e7-f96b-98bd-4581-7503bb01b111@gutov.dev> (message from Dmitry Gutov on Fri, 25 Aug 2023 00:44:58 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268390 Archived-At: > Date: Fri, 25 Aug 2023 00:44:58 +0300 > From: Dmitry Gutov > Cc: juri@linkov.net, habamax@gmail.com, 65049@debbugs.gnu.org > > On 25/08/2023 00:35, Dmitry Gutov wrote: > > On 25/08/2023 00:06, Dmitry Gutov wrote: > >> > >>> But before I do, could you > >>> please try the recipe here: > >>> > >>> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65049#68 > >>> > >>> but with the following change in step 4: > >>> > >>>    4. C-x RET f utf-8-dos RET > >>> > >>> That is, try the recipe on a Posix host with a file whose EOL format > >>> is CRLF.  If that works without any changes in the current VC code, I > >>> will be happy to make the first hunk Windows-specific. > >> > >> That works with the current emacs-29. Also tried with the patch > >> applied -- still works. > > > > But here's a modification of the scenario that fails (again: both with > > and without the patch): replace step 9 with > > > >   9. C-x v = > > > > The non-root diff looks a little different to begin with: it doesn't > > show those ^M chars at the end of lines (whereas the result of > > vc-root-diff shows them). That is likely the reason: buffer set up in a > > different way. > > Looks like it's this line: > > (coding-system-for-read > (if files (vc-coding-system-for-diff (car files)) 'undecided)) > > near the beginning of vc-diff-internal that creates the difference. > Commenting it out makes the scenario work with both 'C-x v =' and 'C-x v D'. That code fragment is very old, so just removing it is scary, even if only in master. What if you change that fragment to say (coding-system-for-read (if files (vc-coding-system-for-diff (car files)) 'undecided-unix)) instead? If that doesn't work, please tell to what value does vc-diff-internal set coding-system-for-read in your case there, and I will try to figure out what would needs to be done there. (In general, I believe that using Git on Posix hosts with files that have DOS EOLs could have such problems in other use cases, where diffs are generated and then applied as patches. We just don't know about those cases because they are extremely rare in Real Life.)