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: Mon, 28 Aug 2023 19:57:38 +0300 Message-ID: <838r9vhzp9.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> <83ttsnoda5.fsf@gnu.org> <49d5e741-f97d-ae4d-f79c-ec418051d868@gutov.dev> <83v8d2kx1g.fsf@gnu.org> <8be534f8-9f03-5de6-53c8-76be0f9456fa@gutov.dev> <831qfpkpx7.fsf@gnu.org> <02a7f7fe-74c2-a59a-7d7d-1da9d3270c8a@gutov.dev> <83ledvicvz.fsf@gnu.org> <767fb864-0d81-ea89-e36e-f56f820d6bbf@gutov.dev> <83cyz7i1sx.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15450"; 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 Mon Aug 28 18:59:40 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 1qafaT-0003iZ-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Aug 2023 18:59:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qafZu-0007Kz-E9; Mon, 28 Aug 2023 12:59:02 -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 1qafZs-0007Ki-OU for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2023 12:59:00 -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 1qafZo-0002aQ-11 for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2023 12:59:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qafZu-0003GH-Ev for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2023 12:59: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: Mon, 28 Aug 2023 16:59: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.169324189812454 (code B ref 65049); Mon, 28 Aug 2023 16:59:02 +0000 Original-Received: (at 65049) by debbugs.gnu.org; 28 Aug 2023 16:58:18 +0000 Original-Received: from localhost ([127.0.0.1]:48937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qafZB-0003Eo-Jy for submit@debbugs.gnu.org; Mon, 28 Aug 2023 12:58:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qafZ9-0003EZ-Gr for 65049@debbugs.gnu.org; Mon, 28 Aug 2023 12:58:16 -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 1qafYx-0002Vx-36; Mon, 28 Aug 2023 12:58:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tQ29SCXmYYX3+dCWHSiYszJeY6K5469srGOKaagn7Nw=; b=EKsHk0BtMx/O PhmsyvpZfW0cim1Z2NG3bunu9YoknhNS8g6v6IUg96J5rgunEy8m+JkfBGbrt2+mXmicbIXuYck7K xoBxLeX4Y7xC1B7Z1cFz+/QAe2iVXDtn8Mxpo1EBnHsCbOBVgoqwoYuDmRHavQnaYFrnwM2owPlIn BjyjImK3KGUHq0ndjhTzhhV6JXOoziz0iOoj3PpuEUN+I5n7dfxYQewIeeELfLvFPD6EQcKi9keiL 1xFthdPI+B+bA3eBR8NgeIAZaCCdJxUnY5+4U3D3plY7npzmaGtne34FbOBAlfqmuq13R9448JB+6 tQzeFmoWL+xFJgZ1Ov81JQ==; In-Reply-To: (message from Dmitry Gutov on Mon, 28 Aug 2023 19:51:25 +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:268643 Archived-At: > Date: Mon, 28 Aug 2023 19:51:25 +0300 > Cc: juri@linkov.net, habamax@gmail.com, 65049@debbugs.gnu.org > From: Dmitry Gutov > > On 28/08/2023 19:12, Eli Zaretskii wrote: > >> Date: Mon, 28 Aug 2023 16:45:23 +0300 > >> Cc:juri@linkov.net,habamax@gmail.com,65049@debbugs.gnu.org > >> From: Dmitry Gutov > >> > >> On 28/08/2023 15:12, Eli Zaretskii wrote: > >>>> Try edebug-instrumenting vc-diff-internal and then calling vc-root-diff > >>>> anywhere (C-x v D). When the execution reaches the line that we have > >>>> been discussing, you'll see that (vc-coding-system-for-diff (car files)) > >>>> evaluates to 'undecided because (car files) is a directory. > >>>> > >>>> So this mechanism is always unused in vc-root-diff. > >>> OK, but in that case 'undecided' is the best guess we can come up > >>> with. It basically lets Emacs guess when it actually sees the stuff > >>> in the diffs, while reading it into a buffer. > >> Yes, and if it's good enough for the (possibly?) most-frequently used > >> out of the vc-*-diff commands, then perhaps we don't need the additional > >> detection logic? > >> > >> Since its introduction 30 years ago indeed the situation has changed a > >> lot, with UTF-8 and its ubiquity. Removing the extra complication would > >> make code a little easier to read, and reduce variability when > >> reproducing problems. But there's no hurry, of course. > > I'm not sure I understand which part do you want to remove. > > The part that currently looks like this: > > (coding-system-for-read > ;; Force the EOL conversion to be -unix, in case the files > ;; to be compared have DOS EOLs. In that case, EOL > ;; conversion will produce a patch file that will either > ;; fail to apply, or will change the EOL format of some of > ;; the lines in the patched file. > (coding-system-change-eol-conversion > (if files (vc-coding-system-for-diff (car files)) 'undecided) > 'unix)) > > As we've established, the only part that's used in vc-root-diff (and > only now) is binding coding-system-change-eol-conversion to > 'undecided-unix'. We could leave it there, though it doesn't seem to > change the behavior in my tests. Remove that? What will happen to non-vc-root-diff clients of that? Or do you mean remove the vc-coding-system-for-diff call, and use undecided-unix instead? If the latter, then it is sub-optimal when vc-coding-system-for-diff does produce non-undecided value for some reason.