GNU bug report logs - #34350
27.0.50; ediff-revision broken with SVN backend + non ascii chars both in directory and in filename

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Vincent Belaïche <vincent.belaiche@HIDDEN>; dated Wed, 6 Feb 2019 19:54:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 34350 <at> debbugs.gnu.org:


Received: (at 34350) by debbugs.gnu.org; 8 Feb 2019 21:45:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 08 16:45:47 2019
Received: from localhost ([127.0.0.1]:40218 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gsDxz-00081G-H5
	for submit <at> debbugs.gnu.org; Fri, 08 Feb 2019 16:45:47 -0500
Received: from eggs.gnu.org ([209.51.188.92]:57211)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gsDxw-0007ta-VW
 for 34350 <at> debbugs.gnu.org; Fri, 08 Feb 2019 16:45:47 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:37185)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gsDxd-00080N-0U; Fri, 08 Feb 2019 16:45:29 -0500
Received: from [176.228.60.248] (port=3903 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gsDxa-0005MV-3o; Fri, 08 Feb 2019 16:45:24 -0500
Date: Fri, 08 Feb 2019 23:45:01 +0200
Message-Id: <838syqosyq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <622e6df3-fb17-cf8a-a166-23fd1549a6c7@HIDDEN> (message from
 Dmitry Gutov on Fri, 8 Feb 2019 20:25:35 +0300)
Subject: Re: bug#34350: 27.0.50; ediff-revision broken with SVN backend + non
 ascii chars both in directory and in filename
References: <84d0o4zoc9.fsf@HIDDEN> <83va1vr41l.fsf@HIDDEN>
 <622e6df3-fb17-cf8a-a166-23fd1549a6c7@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34350
Cc: 34350 <at> debbugs.gnu.org, monnier@HIDDEN, vincent.belaiche@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Cc: 34350 <at> debbugs.gnu.org, vincent.belaiche@HIDDEN
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Fri, 8 Feb 2019 20:25:35 +0300
> 
> On 07.02.2019 18:50, Eli Zaretskii wrote:
> 
> > Any idea why it insists on disabling code-conversions?
> 
> This was well before my time, and the only people I remember messing 
> with these variables anywhere in VC ever since are you (for 
> Windows-related fixes) and Michael. So this might require some digging 
> with vc-annotate.

How is vc-annotate relevant to vc-git-find-revision and the issue at
hand?  The last thing vc-find-revision does is to visit the file
written by the back-end, and it visits it normally, with
find-file-noselect, which decodes the contents as usual.  The problems
I see are with forcing no-conversion in the intermediate operations in
the back-end, where it extracts the specified version to a buffer.

> Also note that this affects two commands: one that returns the file 
> name, and another, its contents. I'm not sure what encoding 'git 
> cat-file blob' outputs in.

We already have in vc-git a variable that holds that encoding (UTF-8
by default).

> > In addition to producing undecoded buffer, these bindings have the
> > adverse effect of forcing Emacs not to encode command-line arguments
> > we pass to the VCS, which is the immediate cause for the current bug.
> 
> The adverse effect sounds like a separate bug.

It's not a bug, it's a documented feature.  coding-system-for-write
affects both I/O from and to a subprocess and the encoding of the
command-line arguments we pass to that subprocess.  That's why we
should be extra-careful when binding coding-system-for-write around
invocations of other programs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.

Message received at 34350 <at> debbugs.gnu.org:


Received: (at 34350) by debbugs.gnu.org; 8 Feb 2019 21:19:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 08 16:19:13 2019
Received: from localhost ([127.0.0.1]:40193 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gsDYH-0006gp-4R
	for submit <at> debbugs.gnu.org; Fri, 08 Feb 2019 16:19:13 -0500
Received: from eggs.gnu.org ([209.51.188.92]:48131)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gsDYF-0006gd-C2
 for 34350 <at> debbugs.gnu.org; Fri, 08 Feb 2019 16:19:11 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36521)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gsDY6-0002wK-L8; Fri, 08 Feb 2019 16:19:03 -0500
Received: from [176.228.60.248] (port=2291 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gsDY6-0001Z6-8O; Fri, 08 Feb 2019 16:19:02 -0500
Date: Fri, 08 Feb 2019 23:18:42 +0200
Message-Id: <83h8deou6l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvpns2tgh3.fsf-monnier+emacsbugs@HIDDEN> (message from Stefan
 Monnier on Fri, 08 Feb 2019 11:08:36 -0500)
Subject: Re: bug#34350: 27.0.50;
 ediff-revision broken with SVN backend + non ascii chars both in
 directory and in filename
References: <84d0o4zoc9.fsf@HIDDEN> <83va1vr41l.fsf@HIDDEN>
 <jwvpns2tgh3.fsf-monnier+emacsbugs@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34350
Cc: vincent.belaiche@HIDDEN, 34350 <at> debbugs.gnu.org, dgutov@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Dmitry Gutov <dgutov@HIDDEN>,  34350 <at> debbugs.gnu.org,  vincent.belaiche@HIDDEN
> Date: Fri, 08 Feb 2019 11:08:36 -0500
> 
> I think intuitively, in terms of encoding for the file's contents the
> backends should always return a byte-sequence (i.e. with no-conversion)
> and the front-end should then decide how to decode it (e.g., obeying
> the -*- coding -*- cookie and such).

Why do we need to leave this to the front end?  It's a waste of cycles
to do decoding manually in Lisp, and it also pushes this obscure art
to application levels, where many Lisp programmers won't know how to
DTRT.

IMO, it's the other way around: by default the back-end should not
insist on any encoding, except where the VCS requires it, and it
should always by default decode the stuff it returns.  The front end
should disable code conversions when needed, and the back-end should
honor that.  This will mostly do TRT, because in the vast majority of
cases users do want eventually to have the stuff decoded, the number
of cases where we want the contrary is minuscule.

VC is just a fancy way of visiting files, so it should normally do the
same, i.e. decode.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.

Message received at 34350 <at> debbugs.gnu.org:


Received: (at 34350) by debbugs.gnu.org; 8 Feb 2019 17:25:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 08 12:25:52 2019
Received: from localhost ([127.0.0.1]:40104 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gs9uS-0003RF-40
	for submit <at> debbugs.gnu.org; Fri, 08 Feb 2019 12:25:52 -0500
Received: from mail-lf1-f42.google.com ([209.85.167.42]:33683)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1gs9uM-0003Qt-5z
 for 34350 <at> debbugs.gnu.org; Fri, 08 Feb 2019 12:25:46 -0500
Received: by mail-lf1-f42.google.com with SMTP id q12so3141084lfm.0
 for <34350 <at> debbugs.gnu.org>; Fri, 08 Feb 2019 09:25:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=uFcKu7a2OoIaBE4s0k0XSJrle8ZHetCvDHUemMDqn/U=;
 b=nbsNWaDEDlY87J5YdNZk0thsj8Ktfofk/PJqinUK8JX9YQPUUbt0cnWmD82ynlAU3S
 1evg+4wP1r4sRu8QMDjCjn90vokd6l9/ZxZWpeKjoBljvK7KPdZGDjtHEuKS9toX85dL
 nESBcPm/fj6EVCURLPJKueRN9XEsHAh9XNnILybFOrc2hgXwZYZc/HULiF82Avr5Esay
 /6Adb5zghgd91RQIaRYfAqDIStjLoxdT3r/I6udBMYp279LiyZM7fyqZlLWogLslN5Yo
 eIlnXv7SfhopFMY2e8gTuSFsDSeR9uarkqMDfCBSbqB6lNpXJoP1y4ZOxYGmrzs/vmzr
 F4dA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=uFcKu7a2OoIaBE4s0k0XSJrle8ZHetCvDHUemMDqn/U=;
 b=hQzg0t1z6zIbxYTqGUySk3nLzBTCgmHqRIOc9Z6go518ZkYTGAXmRBmsnbwaAEpFKh
 B5p3TbETnv3EP+XbHIAA2krkHm1bM6IFdLmfzsFO5OtHjootBaGWAe8nDDkntQ2w5o6v
 f4jAiuo/Fu/hUp9lNOvFu8kUeBpHymDGj5tEpiZWLG2Zu422e+/NlrAmkLpHG2rz8Acv
 9pNStg2CA5ckdUtUal5eg/gFmL4MZ3t8E18Gyq1FttAzGW0w9VQHpzwfzIR5S8Oxr81U
 pR8bRFmPRiLzsdtYVDdUXxbqFAno/5/OMx4bMg99FPlb+/LIMRavxySb5IFBnNmrfpfE
 rYmQ==
X-Gm-Message-State: AHQUAubuVUalvcn+j+BAbdfe2/+FfbyLD2Lcs9F79rOpzkSv1EEnrYei
 Qjy4orqfLkD2RIopHQevXao=
X-Google-Smtp-Source: AHgI3IakwjT4p1jExPeWyv7FtSqjowJmwi2bfA+hygQT4rivnmbJBtWVW3sL4eHMCl6+NwRwbHcUsA==
X-Received: by 2002:a19:d04d:: with SMTP id h74mr13079274lfg.52.1549646738477; 
 Fri, 08 Feb 2019 09:25:38 -0800 (PST)
Received: from [192.168.43.247] ([217.118.78.123])
 by smtp.googlemail.com with ESMTPSA id r2-v6sm469517lja.78.2019.02.08.09.25.36
 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128);
 Fri, 08 Feb 2019 09:25:37 -0800 (PST)
Subject: Re: bug#34350: 27.0.50; ediff-revision broken with SVN backend + non
 ascii chars both in directory and in filename
To: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
References: <84d0o4zoc9.fsf@HIDDEN> <83va1vr41l.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <622e6df3-fb17-cf8a-a166-23fd1549a6c7@HIDDEN>
Date: Fri, 8 Feb 2019 20:25:35 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101
 Thunderbird/65.0
MIME-Version: 1.0
In-Reply-To: <83va1vr41l.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 1.6 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  On 07.02.2019 18:50, Eli Zaretskii wrote: > Any idea why it
 insists on disabling code-conversions? This was well before my time, and
 the only people I remember messing with these variables anywhere in VC ever
 since are you (for Windows-related fixes) and Michael. So this might require
 some digging [...] 
 Content analysis details:   (1.6 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/,
 no trust [209.85.167.42 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 1.5 RCVD_IN_SORBS_WEB      RBL: SORBS: sender is an abusable web server
 [217.118.78.123 listed in dnsbl.sorbs.net]
 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
 mail domains are different
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (dgutov[at]yandex.ru)
 0.1 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
 EnvelopeFrom freemail headers are different
X-Debbugs-Envelope-To: 34350
Cc: 34350 <at> debbugs.gnu.org, vincent.belaiche@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.6 (/)

On 07.02.2019 18:50, Eli Zaretskii wrote:

> Any idea why it insists on disabling code-conversions?

This was well before my time, and the only people I remember messing 
with these variables anywhere in VC ever since are you (for 
Windows-related fixes) and Michael. So this might require some digging 
with vc-annotate.

Also note that this affects two commands: one that returns the file 
name, and another, its contents. I'm not sure what encoding 'git 
cat-file blob' outputs in.

> In addition to producing undecoded buffer, these bindings have the
> adverse effect of forcing Emacs not to encode command-line arguments
> we pass to the VCS, which is the immediate cause for the current bug.

The adverse effect sounds like a separate bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.

Message received at 34350 <at> debbugs.gnu.org:


Received: (at 34350) by debbugs.gnu.org; 8 Feb 2019 16:08:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 08 11:08:47 2019
Received: from localhost ([127.0.0.1]:40064 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gs8ho-0001RT-Oa
	for submit <at> debbugs.gnu.org; Fri, 08 Feb 2019 11:08:47 -0500
Received: from pmta31.teksavvy.com ([76.10.157.38]:4508)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1gs8hl-0001RE-UL
 for 34350 <at> debbugs.gnu.org; Fri, 08 Feb 2019 11:08:43 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2FuAACPqF1c/1gXWKdjGgEBAQEBAgEBA?=
 =?us-ascii?q?QEHAgEBAQGBZYIEgWqYNIINE5l6DYRsAoMsIjgSAQMBAQEBAQECAgJpKIVMAQQ?=
 =?us-ascii?q?BeQULCw0nBwsUGDGFMQisMhoCihaMQxeBf4Qjij8iApE+hW2LbAmSZIFtiE4mA?=
 =?us-ascii?q?w+HZ4dJlGiBXSKBVjMaCDCDKIIkGhOOKSSPVAEB?=
X-IPAS-Result: =?us-ascii?q?A2FuAACPqF1c/1gXWKdjGgEBAQEBAgEBAQEHAgEBAQGBZYI?=
 =?us-ascii?q?EgWqYNIINE5l6DYRsAoMsIjgSAQMBAQEBAQECAgJpKIVMAQQBeQULCw0nBwsUG?=
 =?us-ascii?q?DGFMQisMhoCihaMQxeBf4Qjij8iApE+hW2LbAmSZIFtiE4mAw+HZ4dJlGiBXSK?=
 =?us-ascii?q?BVjMaCDCDKIIkGhOOKSSPVAEB?=
X-IronPort-AV: E=Sophos;i="5.58,348,1544504400"; d="scan'208";a="69232417"
Received: from unknown (HELO fmsmemgm.homelinux.net) ([167.88.23.88])
 by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 08 Feb 2019 11:08:36 -0500
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
 id 1013FAEDAA; Fri,  8 Feb 2019 11:08:36 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34350: 27.0.50;
 ediff-revision broken with SVN backend + non ascii chars both in
 directory and in filename
Message-ID: <jwvpns2tgh3.fsf-monnier+emacsbugs@HIDDEN>
References: <84d0o4zoc9.fsf@HIDDEN> <83va1vr41l.fsf@HIDDEN>
Date: Fri, 08 Feb 2019 11:08:36 -0500
In-Reply-To: <83va1vr41l.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 07 Feb
 2019 17:50:30 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 34350
Cc: vincent.belaiche@HIDDEN, 34350 <at> debbugs.gnu.org,
 Dmitry Gutov <dgutov@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

> I think there's a real mess regarding encoding and decoding stuff in
> vc-find-revision and its backend implementations.

I can believe it.

I think intuitively, in terms of encoding for the file's contents the
backends should always return a byte-sequence (i.e. with no-conversion)
and the front-end should then decide how to decode it (e.g., obeying
the -*- coding -*- cookie and such).

But since that holds for all backends, ideally they should be called in
such a way that they automatically return bytes (rather than chars)
without any extra effort (e.g. without manually binding
coding-system-for-read/write).


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.

Message received at 34350 <at> debbugs.gnu.org:


Received: (at 34350) by debbugs.gnu.org; 8 Feb 2019 07:03:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 08 02:03:16 2019
Received: from localhost ([127.0.0.1]:38827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gs0Bv-0002U8-QY
	for submit <at> debbugs.gnu.org; Fri, 08 Feb 2019 02:03:16 -0500
Received: from eggs.gnu.org ([209.51.188.92]:35119)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gs0Bu-0002Tw-0j
 for 34350 <at> debbugs.gnu.org; Fri, 08 Feb 2019 02:03:14 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40355)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gs0Bl-0005Fl-Ak; Fri, 08 Feb 2019 02:03:06 -0500
Received: from [176.228.60.248] (port=4088 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gs0Bh-0002Y4-HR; Fri, 08 Feb 2019 02:03:03 -0500
Date: Fri, 08 Feb 2019 09:02:58 +0200
Message-Id: <83k1iarcd9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Vincent =?iso-8859-15?Q?Bela=EFche?= <vincent.belaiche@HIDDEN>
In-reply-to: <84a7j7z12n.fsf@HIDDEN> (message from Vincent
 =?iso-8859-15?Q?Bela=EFche?= on Thu, 07 Feb 2019 23:27:28 +0100)
Subject: Re: bug#34350: 27.0.50;
 ediff-revision broken with SVN backend + non ascii chars both in
 directory and in filename
References: <84a7j7z12n.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 34350
Cc: 34350 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Vincent Belache <vincent.belaiche@HIDDEN>
> Cc: Vincent Belache <vincent.belaiche@HIDDEN> 
> Date: Thu, 07 Feb 2019 23:27:28 +0100
> 
> > Is this part relevant?  You didn't really think we refuse to support
> > non-ASCII file names, did you?
> 
> [...]
> 
> No, I did not, that was just a joke, sorry for not being funny.

Oh, that was a joke?  Sorry for not catching it.

> Concerning your patch, it made it work.

Thanks, pushed to the emacs-26 branch.

This only fixes some VC backends, there are others which bind
coding-system-for-write in their backend implementations, which looks
simply wrong to me.  I hope we will be able to fix those as well, but
perhaps not in Emacs 26.2, if the changes I have in mind will be
deemed unsafe.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.

Message received at 34350 <at> debbugs.gnu.org:


Received: (at 34350) by debbugs.gnu.org; 7 Feb 2019 22:27:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 07 17:27:39 2019
Received: from localhost ([127.0.0.1]:38673 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1grs8x-0004Ss-9H
	for submit <at> debbugs.gnu.org; Thu, 07 Feb 2019 17:27:39 -0500
Received: from mail-wm1-f47.google.com ([209.85.128.47]:33597)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1grs8u-0004Sc-Ht
 for 34350 <at> debbugs.gnu.org; Thu, 07 Feb 2019 17:27:37 -0500
Received: by mail-wm1-f47.google.com with SMTP id h22so5428397wmb.0
 for <34350 <at> debbugs.gnu.org>; Thu, 07 Feb 2019 14:27:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:in-reply-to:date:message-id:mime-version
 :content-transfer-encoding;
 bh=bZ68ZJN2Q/X84zBtWtpkC0yAEwz30ug0hOjAyHk6KLU=;
 b=A9L8lrQhuxfiQNVWHJZ3BK8Z+pQJY7wxl6n1Cv9AfAZH/wb/I4GYzc04Qa6lpZGajH
 IbeinzQsn1+jZx3qLU7rgZQW/x3AGNi2EV0F8O61h07aivBX3nYTvaA7SBqyLxDQBDa9
 U0suqed6PAqHzzQtkQDiXGkDD0VIXKX9NofcT3TM//WHR0ZWxpcRro5AaBdKWBwODQuj
 cEkP7Ibs9j0XraPhTSMHEw1FXTdMn90rZfSFUfJ2VT7cu7O1Ly0M0rLJjie8V/Mb4ur/
 5qR8quXpaz0+Qr/wQVItN1oTvlCGjaHOz8Q/AbUZtcVsgTUGylDbuU0tI9c8Q3qJE2gd
 kotA==
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:in-reply-to:date:message-id
 :mime-version:content-transfer-encoding;
 bh=bZ68ZJN2Q/X84zBtWtpkC0yAEwz30ug0hOjAyHk6KLU=;
 b=VO5cqKrNtKOBtNNuo4NFHnQDy4CO43sptrwmxmmFNnn8u8y6ixO6sUhfFcLkkP2nOh
 5//RDnb6nLsHRWoYlVQF3vAC0/SUR0sWJUn64ZQSaIW7eVGpLDh0q0pIeMvO1gCryr/7
 3ldJ4FAS/40t3PA1yhyQGldly2b8aewo/wZXDyEUwrMIYQIhVigV54cNdVV1DKA6s8Ov
 7Ezr0KrRuexCUImGvicEIyFAEBwxkKeAiE8EVufWa+WMdQVXJQ8Xg8jN25MxGmlJpw6k
 I3g/Zlav/wS+MFAZ8r5ma05r5QyWajve8g4TXUUjDQv0xsG6fByZBPsenUicruN4nM2r
 gKgg==
X-Gm-Message-State: AHQUAuY4VU/QqN1b3sUBU2uYTa5AQhtNwe5wwsQi0DMCLTfq3sPbO200
 inn+LrfhQm6aBwJnzZ6dWCU=
X-Google-Smtp-Source: AHgI3IZOKw6pzFzKFrqqpWqB2UYYmU10BIS+8f/o36/kJGfxsveNGnYdLPDmorIN2/eiB5ns0CXL3g==
X-Received: by 2002:a1c:2804:: with SMTP id o4mr9565958wmo.150.1549578450678; 
 Thu, 07 Feb 2019 14:27:30 -0800 (PST)
Received: from AigleRoyal (arennes-656-1-27-51.w86-214.abo.wanadoo.fr.
 [86.214.222.51])
 by smtp.gmail.com with ESMTPSA id m14sm205352wrx.59.2019.02.07.14.27.29
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Thu, 07 Feb 2019 14:27:29 -0800 (PST)
From: =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincent.belaiche@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, 34350 <at> debbugs.gnu.org
Subject: Re: bug#34350: 27.0.50;
 ediff-revision broken with SVN backend + non ascii chars both in
 directory and in filename
In-Reply-To: <83wombr4fy.fsf@HIDDEN>
Date: Thu, 07 Feb 2019 23:27:28 +0100
Message-ID: <84a7j7z12n.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34350
Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincent.belaiche@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Le 07/02/2019 =E0 16:41, Eli Zaretskii a =E9crit :
>> From: Vincent Bela=EFche <vincent.belaiche@HIDDEN>
>> Date: Wed, 06 Feb 2019 20:52:38 +0100
>> Cc: Vincent Bela=EFche <vincent.belaiche@HIDDEN>
>>

[...]

>
>> OK, I know that some Askese people will probably say something like
>> =AB don't use non-ASCII characters in file-names =BB which is IMHO quite=
 a
>> ASCII-centric way of thinking, so just in case, my answer is =AB =CE w=
=EEll
>> =F9se n=F4n-=C0SC=CE=CE =E7h=E6r=E2ct=E8rs n=E9v=BDrthel=E8ss, because =
=CE =E0m mys=E8lf a n=F4n-ASCII
>> p=E8rs=F4n ! =BB ;-)
>
> Is this part relevant?  You didn't really think we refuse to support
> non-ASCII file names, did you?
>

[...]

No, I did not, that was just a joke, sorry for not being funny.

Concerning your patch, it made it work.

  Vincent.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.

Message received at 34350 <at> debbugs.gnu.org:


Received: (at 34350) by debbugs.gnu.org; 7 Feb 2019 15:51:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 07 10:51:01 2019
Received: from localhost ([127.0.0.1]:38549 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1grlx6-0002x1-PA
	for submit <at> debbugs.gnu.org; Thu, 07 Feb 2019 10:51:01 -0500
Received: from eggs.gnu.org ([209.51.188.92]:41763)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1grlx3-0002wl-8l
 for 34350 <at> debbugs.gnu.org; Thu, 07 Feb 2019 10:50:58 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54114)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1grlwj-0003w7-Lo; Thu, 07 Feb 2019 10:50:40 -0500
Received: from [176.228.60.248] (port=3293 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1grlwj-0005U4-2B; Thu, 07 Feb 2019 10:50:37 -0500
Date: Thu, 07 Feb 2019 17:50:30 +0200
Message-Id: <83va1vr41l.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>, Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <84d0o4zoc9.fsf@HIDDEN> (message from Vincent
 =?iso-8859-1?Q?Bela=EFche?= on Wed, 06 Feb 2019 20:52:38 +0100)
Subject: Re: bug#34350: 27.0.50;
 ediff-revision broken with SVN backend + non ascii chars both in
 directory and in filename
References: <84d0o4zoc9.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 34350
Cc: 34350 <at> debbugs.gnu.org, vincent.belaiche@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan, Dmitry, can I have your attention please?

I think there's a real mess regarding encoding and decoding stuff in
vc-find-revision and its backend implementations.  For some reason,
several backend implementations bind both coding-system-for-read and
coding-system-for-write to no-conversion when they invoke the VCS to
produce a file at a certain revision.  Here's an example from
vc-git.el:

  (defun vc-git-find-revision (file rev buffer)
    (let* (process-file-side-effects
	   (coding-system-for-read 'binary)
	   (coding-system-for-write 'binary)
	   (fullname
	    (let ((fn (vc-git--run-command-string
		       file "ls-files" "-z" "--full-name" "--")))
	      ;; ls-files does not return anything when looking for a
	      ;; revision of a file that has been renamed or removed.
	      (if (string= fn "")
		  (file-relative-name file (vc-git-root default-directory))
		(substring fn 0 -1)))))
      (vc-git-command
       buffer 0
       nil
       "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname))))

Any idea why it insists on disabling code-conversions?

More generally, the find-revision method is documented as

  Fetch revision REV of file FILE and put it into BUFFER.

There's nothing here that hints that the resulting buffer will not
look like any visited file, i.e. after decoding.  Am I missing
something?

In addition to producing undecoded buffer, these bindings have the
adverse effect of forcing Emacs not to encode command-line arguments
we pass to the VCS, which is the immediate cause for the current bug.

It is my impression that one of the backends did these bindings for
some reason, and then others simply copy-pasted from it.

I'd like to fix this mess, if possible.

Thanks in advance for any insights.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.

Message received at 34350 <at> debbugs.gnu.org:


Received: (at 34350) by debbugs.gnu.org; 7 Feb 2019 15:42:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 07 10:42:08 2019
Received: from localhost ([127.0.0.1]:38545 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1grloU-0002jz-2J
	for submit <at> debbugs.gnu.org; Thu, 07 Feb 2019 10:42:08 -0500
Received: from eggs.gnu.org ([209.51.188.92]:40153)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1grloS-0002jU-42
 for 34350 <at> debbugs.gnu.org; Thu, 07 Feb 2019 10:42:04 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53962)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1grloM-0006I5-IG; Thu, 07 Feb 2019 10:41:58 -0500
Received: from [176.228.60.248] (port=2767 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1grloM-0004nR-2v; Thu, 07 Feb 2019 10:41:58 -0500
Date: Thu, 07 Feb 2019 17:41:53 +0200
Message-Id: <83wombr4fy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Vincent =?utf-8?Q?Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
In-reply-to: <84d0o4zoc9.fsf@HIDDEN> (message from Vincent =?utf-8?Q?Be?=
 =?utf-8?Q?la=C3=AFche?= on Wed, 06 Feb 2019 20:52:38 +0100)
Subject: Re: bug#34350: 27.0.50;
 ediff-revision broken with SVN backend + non ascii chars both in
 directory and in filename
References: <84d0o4zoc9.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 34350
Cc: 34350 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Vincent Belaïche <vincent.belaiche@HIDDEN>
> Date: Wed, 06 Feb 2019 20:52:38 +0100
> Cc: Vincent Belaïche <vincent.belaiche@HIDDEN>
> 
> After some debugging, I realized that the whole thing executes with
> default-directory set to "c:/blah/blah/blah/ê/trunk/" the following
> two commands:
> 
>  (process-file "svn" nil t nil "--non-interactive" "status" "-v" "ê.tex")
> 
> and then:
> 
>  (process-file "svn" nil t nil "--non-interactive" "cat" "ê.tex")
> 
> The first command works quite fine, but the second one fails, and having
> a look info the " *temp*" buffer, I saw that svn angrilly barks with
> some error message like this one:
> 
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> svn: warning: W200005: 'C:\blah\blah\blah\\trunk\ª.tex' is not under version control
> svn: E200009: Could not cat all targets because some targets are not versioned
> svn: E200009: Illegal target for the requested operation
> --8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----
> 
> looking more carefully at things, and having inspected the C code of
> function call-process, I realized that the variable
> coding-system-for-write has some importance, and tracing this I realized
> that when the first svn command is called the variable
> coding-system-for-write is nil, while when the second svn command is
> called it is 'no-conversion, which makes it fail.

Ouch!  There's a real mess in vc-find-revision and its backend
implementations wrt encoding and decoding.  I will address the general
problem separately, but for now please see if the patch below fixes
the immediate problem with SVN.

> OK, I know that some Askese people will probably say something like
> « don't use non-ASCII characters in file-names » which is IMHO quite a
> ASCII-centric way of thinking, so just in case, my answer is « Î wîll
> ùse nôn-ÀSCÎÎ çhærâctèrs névœrthelèss, because Î àm mysèlf a nôn-ASCII
> pèrsôn ! » ;-)

Is this part relevant?  You didn't really think we refuse to support
non-ASCII file names, did you?

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 9925196..326284f 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1966,10 +1966,13 @@ vc-find-revision
 	(with-current-buffer filebuf
 	  (let ((failed t))
 	    (unwind-protect
-		(let ((coding-system-for-read 'no-conversion)
-		      (coding-system-for-write 'no-conversion))
+		(let ((coding-system-for-read 'no-conversion))
 		  (with-temp-file filename
 		    (let ((outbuf (current-buffer)))
+                      ;; We will read the backend's output with no
+                      ;; conversions, so we should also save the
+                      ;; temporary file with no encoding conversions.
+                      (setq buffer-file-coding-system 'no-conversion)
 		      ;; Change buffer to get local value of
 		      ;; vc-checkout-switches.
 		      (with-current-buffer filebuf




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Feb 2019 19:53:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 06 14:53:13 2019
Received: from localhost ([127.0.0.1]:36178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1grTFw-0004QC-0i
	for submit <at> debbugs.gnu.org; Wed, 06 Feb 2019 14:53:13 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51335)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1grTFt-0004Pv-FX
 for submit <at> debbugs.gnu.org; Wed, 06 Feb 2019 14:53:10 -0500
Received: from lists.gnu.org ([209.51.188.17]:38385)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <vincent.belaiche@HIDDEN>)
 id 1grTFo-0006mQ-6N
 for submit <at> debbugs.gnu.org; Wed, 06 Feb 2019 14:53:04 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37477)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1grTFl-0006KA-E9
 for bug-gnu-emacs@HIDDEN; Wed, 06 Feb 2019 14:53:04 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: ***
X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 MIME_CHARSET_FARAWAY autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1grTFi-0006kf-4H
 for bug-gnu-emacs@HIDDEN; Wed, 06 Feb 2019 14:53:01 -0500
Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:51286)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <vincent.belaiche@HIDDEN>)
 id 1grTFh-0006k5-Bs
 for bug-gnu-emacs@HIDDEN; Wed, 06 Feb 2019 14:52:57 -0500
Received: by mail-wm1-x335.google.com with SMTP id b11so3791808wmj.1
 for <bug-gnu-emacs@HIDDEN>; Wed, 06 Feb 2019 11:52:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:date:message-id:mime-version;
 bh=sR8Y/LT0D2V7J72cxm3DbJyCaCW8MRdjST5GV1V8jMQ=;
 b=MjF5I9r/6r2g9uaYVKlB1mrZUqrimIetm2ffwNGulo5zMvKFNLlu9IMqXLq0sbXWMN
 pZHjkuQERoi39wLpGIeoedn5EITewfFJnkcLWo0/tQW4rjQVeYny0mJkwJ7FsvN7JRds
 rntqhlD7btpUpGaxLw6I0rnto+dWIe3P9m8b5y6LfnS7sGVB9n9OwFOFQOO+Obylk7P5
 z88VScbjoaqb/nH4GOkeYfpST5AxTFebWgZeCyBaNub0NQDALWGA8HJX5pHRTZSC/z0T
 DuiP1sq4MGR5S5tZj5ha0EDvsFCXa77jpazn0v5sFo2bJB4SAkvc7tEC671jU7591w9r
 1VQA==
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:date:message-id:mime-version;
 bh=sR8Y/LT0D2V7J72cxm3DbJyCaCW8MRdjST5GV1V8jMQ=;
 b=Ko7i2w3LGMrfgy6f123WiuHt5pJyCfSGqQ8myXXuc4rnIRg948AgbOIDFJW/sveTaS
 ai0PRnQC1AY1w/iP8clF24mCeG9fbbp5I3HQwSNxiumX+b4qMl2k2a+9I3oFasqOrKl5
 VSGerCKfFXl/ksf/+r+ATnMRoq0oaI+iG2xywxmo6F8B+GKkZmPT4SgOogxFLLSiB2ND
 kIDKEtwJG4mqM/vlq2CptmGEm9D6PJHHAubZjq0SSbuPbzv5kk5HBP9PZXtor4IOfZMz
 l2gCSk1U/ZloWwlx14jFNghyY2ffr36ZiYbWhR6Yq63ZVT3IVqGEcfqv0bS2HmIvnKBy
 Su0w==
X-Gm-Message-State: AHQUAubuFCpVERR6/nLD0VoiVp+ElwxoKOEP0moDcI+0aVmygg6mwYJ9
 UOvIRwwa9O+BuT4BW25uzgsJw7bV
X-Google-Smtp-Source: AHgI3IadqcuNvuR4+7KJWsOoQ43jNIXcOpmv89PvXE2pdCAdTKlQA1T2pG0vfTxV9ABNRrFJYJDzOw==
X-Received: by 2002:a1c:ed0b:: with SMTP id l11mr3933620wmh.43.1549482775563; 
 Wed, 06 Feb 2019 11:52:55 -0800 (PST)
Received: from AigleRoyal (arennes-656-1-27-51.w86-214.abo.wanadoo.fr.
 [86.214.222.51])
 by smtp.gmail.com with ESMTPSA id x3sm30235661wrd.19.2019.02.06.11.52.53
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 06 Feb 2019 11:52:54 -0800 (PST)
From: =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincent.belaiche@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50;
 ediff-revision broken with SVN backend + non ascii chars both in
 directory and in filename
Date: Wed, 06 Feb 2019 20:52:38 +0100
Message-ID: <84d0o4zoc9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2a00:1450:4864:20::335
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincent.belaiche@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable


Hello Emacs experts,

I am trying to do some 'M-x ediff-revision' on a file that is under
version control with svn locally to my MSWindows-10 machine, and that
does not work.

The file path is something like

c:/blah/blah/blah/=EA/trunk/=EA.tex

--=-=-=
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: quoted-printable


(well, it is not exactly this exact string, but I presume that makes no
difference for our concern=A1=AD).

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable


After some debugging, I realized that the whole thing executes with
default-directory set to "c:/blah/blah/blah/=EA/trunk/" the following
two commands:

 (process-file "svn" nil t nil "--non-interactive" "status" "-v" "=EA.tex")

and then:

 (process-file "svn" nil t nil "--non-interactive" "cat" "=EA.tex")

The first command works quite fine, but the second one fails, and having
a look info the " *temp*" buffer, I saw that svn angrilly barks with
some error message like this one:

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: 8bit


--8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
svn: warning: W200005: 'C:\blah\blah\blah\\trunk\.tex' is not under version control
svn: E200009: Could not cat all targets because some targets are not versioned
svn: E200009: Illegal target for the requested operation
--8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----

looking more carefully at things, and having inspected the C code of
function call-process, I realized that the variable
coding-system-for-write has some importance, and tracing this I realized
that when the first svn command is called the variable
coding-system-for-write is nil, while when the second svn command is
called it is 'no-conversion, which makes it fail.

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable


The problem is that in the vc-find-revision function you have somewhere
this setting=A0:

--=-=-=
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: quoted-printable


 (let ( =A1=AD (coding-system-for-write 'no-conversion) =A1=AD) =A1=AD)

here is a backtrace where I marked two lines X and Y.

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable


--8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
Debugger entered--Lisp error: (error "Failed (status 1): svn --non-interact=
ive cat  =EA.tex")
  signal(error ("Failed (status 1): svn --non-interactive cat  =EA.tex"))
  error("Failed (%s): %s" "status 1" "svn --non-interactive cat  =EA.tex")
  (progn (if (eq 32 (aref (buffer-name (current-buffer)) 0)) nil (pop-to-bu=
ffer (current-buffer)) (goto-char (point-min)) (shrink-window-if-larger-tha=
n-buffer)) (error "Failed (%s): %s" (if (integerp status) (format "status %=
d" status) status) full-command))
Y (if (and (not (eq t okstatus)) (or (not (integerp status)) (and okstatus =
(< okstatus status)))) (progn (if (eq 32 (aref (buffer-name (current-buffer=
)) 0)) nil (pop-to-buffer (current-buffer)) (goto-char (point-min)) (shrink=
-window-if-larger-than-buffer)) (error "Failed (%s): %s" (if (integerp stat=
us) (format "status %d" status) status) full-command)))
  (if (eq okstatus 'async) (let ((proc (let ((process-connection-type nil))=
 (apply 'start-file-process command (current-buffer) command squeezed)))) (=
if vc-command-messages (progn (message "Running in background: %s" full-com=
mand))) (set-process-sentinel proc #'ignore) (set-process-filter proc 'vc-p=
rocess-filter) (setq status proc) (if vc-command-messages (progn (vc-exec-a=
fter #'(lambda nil (let ... ...)))))) (if vc-command-messages (progn (messa=
ge "Running in foreground: %s" full-command))) (let ((buffer-undo-list t)) =
(message "CSFW=3D%S" coding-system-for-write) (message "CS=3D%S" (apply 'fi=
nd-operation-coding-system 'call-process "svn" squeezed)) (message "DIR=3D%=
s" default-directory) (message "SQUEEZED=3D%S" squeezed) (setq status (appl=
y 'process-file command nil t nil squeezed))) (if (and (not (eq t okstatus)=
) (or (not (integerp status)) (and okstatus (< okstatus status)))) (progn (=
if (eq 32 (aref (buffer-name (current-buffer)) 0)) nil (pop-to-buffer (curr=
ent-buffer)) (goto-char (point-min)) (shrink-window-if-larger-than-buffer))=
 (error "Failed (%s): %s" (if (integerp status) (format "status %d" status)=
 status) full-command))) (if vc-command-messages (progn (message "Done (sta=
tus=3D%d): %s" status full-command))))
  (let ((process-environment (cons "LC_MESSAGES=3DC" process-environment)) =
(w32-quote-process-args t)) (if (eq okstatus 'async) (let ((proc (let ((pro=
cess-connection-type nil)) (apply 'start-file-process command (current-buff=
er) command squeezed)))) (if vc-command-messages (progn (message "Running i=
n background: %s" full-command))) (set-process-sentinel proc #'ignore) (set=
-process-filter proc 'vc-process-filter) (setq status proc) (if vc-command-=
messages (progn (vc-exec-after #'(lambda nil ...))))) (if vc-command-messag=
es (progn (message "Running in foreground: %s" full-command))) (let ((buffe=
r-undo-list t)) (message "CSFW=3D%S" coding-system-for-write) (message "CS=
=3D%S" (apply 'find-operation-coding-system 'call-process "svn" squeezed)) =
(message "DIR=3D%s" default-directory) (message "SQUEEZED=3D%S" squeezed) (=
setq status (apply 'process-file command nil t nil squeezed))) (if (and (no=
t (eq t okstatus)) (or (not (integerp status)) (and okstatus (< okstatus st=
atus)))) (progn (if (eq 32 (aref (buffer-name ...) 0)) nil (pop-to-buffer (=
current-buffer)) (goto-char (point-min)) (shrink-window-if-larger-than-buff=
er)) (error "Failed (%s): %s" (if (integerp status) (format "status %d" sta=
tus) status) full-command))) (if vc-command-messages (progn (message "Done =
(status=3D%d): %s" status full-command)))))
  (let ((squeezed (remq nil flags)) (inhibit-read-only t) (status 0)) (if f=
iles (progn (setq squeezed (nconc squeezed files)))) (let ((process-environ=
ment (cons "LC_MESSAGES=3DC" process-environment)) (w32-quote-process-args =
t)) (if (eq okstatus 'async) (let ((proc (let (...) (apply ... command ... =
command squeezed)))) (if vc-command-messages (progn (message "Running in ba=
ckground: %s" full-command))) (set-process-sentinel proc #'ignore) (set-pro=
cess-filter proc 'vc-process-filter) (setq status proc) (if vc-command-mess=
ages (progn (vc-exec-after #'...)))) (if vc-command-messages (progn (messag=
e "Running in foreground: %s" full-command))) (let ((buffer-undo-list t)) (=
message "CSFW=3D%S" coding-system-for-write) (message "CS=3D%S" (apply 'fin=
d-operation-coding-system 'call-process "svn" squeezed)) (message "DIR=3D%s=
" default-directory) (message "SQUEEZED=3D%S" squeezed) (setq status (apply=
 'process-file command nil t nil squeezed))) (if (and (not (eq t okstatus))=
 (or (not (integerp status)) (and okstatus (< okstatus status)))) (progn (i=
f (eq 32 (aref ... 0)) nil (pop-to-buffer (current-buffer)) (goto-char (poi=
nt-min)) (shrink-window-if-larger-than-buffer)) (error "Failed (%s): %s" (i=
f (integerp status) (format "status %d" status) status) full-command))) (if=
 vc-command-messages (progn (message "Done (status=3D%d): %s" status full-c=
ommand))))) (vc-exec-after #'(lambda nil (run-hook-with-args 'vc-post-comma=
nd-functions command file-or-list flags))) status)
  (save-current-buffer (if (or (eq buffer t) (and (stringp buffer) (string=
=3D (buffer-name) buffer)) (eq buffer (current-buffer))) nil (vc-setup-buff=
er buffer)) (let ((squeezed (remq nil flags)) (inhibit-read-only t) (status=
 0)) (if files (progn (setq squeezed (nconc squeezed files)))) (let ((proce=
ss-environment (cons "LC_MESSAGES=3DC" process-environment)) (w32-quote-pro=
cess-args t)) (if (eq okstatus 'async) (let ((proc (let ... ...))) (if vc-c=
ommand-messages (progn (message "Running in background: %s" full-command)))=
 (set-process-sentinel proc #'ignore) (set-process-filter proc 'vc-process-=
filter) (setq status proc) (if vc-command-messages (progn (vc-exec-after ..=
.)))) (if vc-command-messages (progn (message "Running in foreground: %s" f=
ull-command))) (let ((buffer-undo-list t)) (message "CSFW=3D%S" coding-syst=
em-for-write) (message "CS=3D%S" (apply 'find-operation-coding-system 'call=
-process "svn" squeezed)) (message "DIR=3D%s" default-directory) (message "=
SQUEEZED=3D%S" squeezed) (setq status (apply 'process-file command nil t ni=
l squeezed))) (if (and (not (eq t okstatus)) (or (not ...) (and okstatus ..=
.))) (progn (if (eq 32 ...) nil (pop-to-buffer ...) (goto-char ...) (shrink=
-window-if-larger-than-buffer)) (error "Failed (%s): %s" (if ... ... status=
) full-command))) (if vc-command-messages (progn (message "Done (status=3D%=
d): %s" status full-command))))) (vc-exec-after #'(lambda nil (run-hook-wit=
h-args 'vc-post-command-functions command file-or-list flags))) status))
  (let* ((files (mapcar #'(lambda (f) (file-relative-name (expand-file-name=
 f))) (if (listp file-or-list) file-or-list (list file-or-list)))) (message=
-truncate-lines t) (full-command (concat (if (string=3D (substring command =
-1) "\n") (substring command 0 -1) command) " " (vc-delistify flags) " " (v=
c-delistify files)))) (save-current-buffer (if (or (eq buffer t) (and (stri=
ngp buffer) (string=3D (buffer-name) buffer)) (eq buffer (current-buffer)))=
 nil (vc-setup-buffer buffer)) (let ((squeezed (remq nil flags)) (inhibit-r=
ead-only t) (status 0)) (if files (progn (setq squeezed (nconc squeezed fil=
es)))) (let ((process-environment (cons "LC_MESSAGES=3DC" process-environme=
nt)) (w32-quote-process-args t)) (if (eq okstatus 'async) (let ((proc ...))=
 (if vc-command-messages (progn ...)) (set-process-sentinel proc #'ignore) =
(set-process-filter proc 'vc-process-filter) (setq status proc) (if vc-comm=
and-messages (progn ...))) (if vc-command-messages (progn (message "Running=
 in foreground: %s" full-command))) (let ((buffer-undo-list t)) (message "C=
SFW=3D%S" coding-system-for-write) (message "CS=3D%S" (apply ... ... "svn" =
squeezed)) (message "DIR=3D%s" default-directory) (message "SQUEEZED=3D%S" =
squeezed) (setq status (apply ... command nil t nil squeezed))) (if (and (n=
ot ...) (or ... ...)) (progn (if ... nil ... ... ...) (error "Failed (%s): =
%s" ... full-command))) (if vc-command-messages (progn (message "Done (stat=
us=3D%d): %s" status full-command))))) (vc-exec-after #'(lambda nil (run-ho=
ok-with-args 'vc-post-command-functions command file-or-list flags))) statu=
s)))
  vc-do-command(#<buffer  *temp file*-256291> 0 "svn" "c:/blah/blah/blah/=
=EA/trunk/=EA.tex" "--non-interactive" "cat" nil)
  apply(vc-do-command #<buffer  *temp file*-256291> 0 "svn" "c:/blah/blah/b=
lah/=EA/trunk/=EA.tex" ("--non-interactive" "cat" nil))
  vc-svn-command(#<buffer  *temp file*-256291> 0 "c:/blah/blah/blah/=EA/tru=
nk/=EA.tex" "cat" nil)
  apply(vc-svn-command #<buffer  *temp file*-256291> 0 "c:/blah/blah/blah/=
=EA/trunk/=EA.tex" "cat" nil nil)
  (let (process-file-side-effects) (apply 'vc-svn-command buffer 0 file "ca=
t" (and rev (not (string=3D rev "")) (concat "-r" rev)) (vc-switches 'SVN '=
checkout)))
  vc-svn-find-revision("c:/blah/blah/blah/=EA/trunk/=EA.tex" nil #<buffer  =
*temp file*-256291>)
  apply(vc-svn-find-revision ("c:/blah/blah/blah/=EA/trunk/=EA.tex" nil #<b=
uffer  *temp file*-256291>))
  vc-call-backend(SVN find-revision "c:/blah/blah/blah/=EA/trunk/=EA.tex" n=
il #<buffer  *temp file*-256291>)
  (if backend (vc-call-backend backend 'find-revision file revision outbuf)=
 (vc-call-backend (vc-backend file) 'find-revision file revision outbuf))
  (save-current-buffer (set-buffer filebuf) (if backend (vc-call-backend ba=
ckend 'find-revision file revision outbuf) (vc-call-backend (vc-backend fil=
e) 'find-revision file revision outbuf)))
  (let ((outbuf (current-buffer))) (save-current-buffer (set-buffer filebuf=
) (if backend (vc-call-backend backend 'find-revision file revision outbuf)=
 (vc-call-backend (vc-backend file) 'find-revision file revision outbuf))))
  (save-current-buffer (set-buffer temp-buffer) (let ((outbuf (current-buff=
er))) (save-current-buffer (set-buffer filebuf) (if backend (vc-call-backen=
d backend 'find-revision file revision outbuf) (vc-call-backend (vc-backend=
 file) 'find-revision file revision outbuf)))))
  (prog1 (save-current-buffer (set-buffer temp-buffer) (let ((outbuf (curre=
nt-buffer))) (save-current-buffer (set-buffer filebuf) (if backend (vc-call=
-backend backend 'find-revision file revision outbuf) (vc-call-backend (vc-=
backend file) 'find-revision file revision outbuf))))) (save-current-buffer=
 (set-buffer temp-buffer) (write-region nil nil temp-file nil 0)))
  (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (let=
 ((outbuf (current-buffer))) (save-current-buffer (set-buffer filebuf) (if =
backend (vc-call-backend backend 'find-revision file revision outbuf) (vc-c=
all-backend (vc-backend file) 'find-revision file revision outbuf))))) (sav=
e-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file n=
il 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (let ((temp-file filename) (temp-buffer (get-buffer-create (generate-new-=
buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer =
(set-buffer temp-buffer) (let ((outbuf (current-buffer))) (save-current-buf=
fer (set-buffer filebuf) (if backend (vc-call-backend backend ... file revi=
sion outbuf) (vc-call-backend ... ... file revision outbuf))))) (save-curre=
nt-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0)))=
 (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
X (let ((coding-system-for-read 'no-conversion) (coding-system-for-write 'n=
o-conversion)) (let ((temp-file filename) (temp-buffer (get-buffer-create (=
generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-cu=
rrent-buffer (set-buffer temp-buffer) (let ((outbuf ...)) (save-current-buf=
fer (set-buffer filebuf) (if backend ... ...)))) (save-current-buffer (set-=
buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-n=
ame temp-buffer) (kill-buffer temp-buffer)))) (setq failed nil))
  (unwind-protect (let ((coding-system-for-read 'no-conversion) (coding-sys=
tem-for-write 'no-conversion)) (let ((temp-file filename) (temp-buffer (get=
-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect=
 (prog1 (save-current-buffer (set-buffer temp-buffer) (let (...) (save-curr=
ent-buffer ... ...))) (save-current-buffer (set-buffer temp-buffer) (write-=
region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buff=
er temp-buffer)))) (setq failed nil)) (if (and failed (file-exists-p filena=
me)) (progn (delete-file filename))))
  (let ((failed t)) (unwind-protect (let ((coding-system-for-read 'no-conve=
rsion) (coding-system-for-write 'no-conversion)) (let ((temp-file filename)=
 (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*"))=
)) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (le=
t ... ...)) (save-current-buffer (set-buffer temp-buffer) (write-region nil=
 nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-bu=
ffer)))) (setq failed nil)) (if (and failed (file-exists-p filename)) (prog=
n (delete-file filename)))))
  (save-current-buffer (set-buffer filebuf) (let ((failed t)) (unwind-prote=
ct (let ((coding-system-for-read 'no-conversion) (coding-system-for-write '=
no-conversion)) (let ((temp-file filename) (temp-buffer (get-buffer-create =
...))) (unwind-protect (prog1 (save-current-buffer ... ...) (save-current-b=
uffer ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))=
 (setq failed nil)) (if (and failed (file-exists-p filename)) (progn (delet=
e-file filename))))) (vc-mode-line file))
  (if (file-exists-p automatic-backup) (rename-file automatic-backup filena=
me nil) (message "Checking out %s..." filename) (save-current-buffer (set-b=
uffer filebuf) (let ((failed t)) (unwind-protect (let ((coding-system-for-r=
ead 'no-conversion) (coding-system-for-write 'no-conversion)) (let ((temp-f=
ile filename) (temp-buffer ...)) (unwind-protect (prog1 ... ...) (and ... .=
..))) (setq failed nil)) (if (and failed (file-exists-p filename)) (progn (=
delete-file filename))))) (vc-mode-line file)) (message "Checking out %s...=
done" filename))
  (if (file-exists-p filename) nil (if (file-exists-p automatic-backup) (re=
name-file automatic-backup filename nil) (message "Checking out %s..." file=
name) (save-current-buffer (set-buffer filebuf) (let ((failed t)) (unwind-p=
rotect (let ((coding-system-for-read ...) (coding-system-for-write ...)) (l=
et (... ...) (unwind-protect ... ...)) (setq failed nil)) (if (and failed (=
file-exists-p filename)) (progn (delete-file filename))))) (vc-mode-line fi=
le)) (message "Checking out %s...done" filename)))
  (let ((automatic-backup (vc-version-backup-file-name file revision)) (fil=
ebuf (or (get-file-buffer file) (current-buffer))) (filename (vc-version-ba=
ckup-file-name file revision 'manual))) (if (file-exists-p filename) nil (i=
f (file-exists-p automatic-backup) (rename-file automatic-backup filename n=
il) (message "Checking out %s..." filename) (save-current-buffer (set-buffe=
r filebuf) (let ((failed t)) (unwind-protect (let (... ...) (let ... ...) (=
setq failed nil)) (if (and failed ...) (progn ...)))) (vc-mode-line file)) =
(message "Checking out %s...done" filename))) (let ((result-buf (find-file-=
noselect filename))) (save-current-buffer (set-buffer result-buf) (set (mak=
e-local-variable 'vc-parent-buffer) filebuf)) result-buf))
  vc-find-revision("c:/blah/blah/blah/=EA/trunk/=EA.tex" nil)

--=-=-=
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: quoted-printable

  =A1=AD =A1=AD =A1=AD =A1=AD
--8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----

On line X coding-system-for-write is set to 'no-conversion.
line Y is shown here in function vc-do-command, where I also marked a
line as Z:

--8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
	    ;; Run synchronously
	    (when vc-command-messages
	      (message "Running in foreground: %s" full-command))
	    (let ((buffer-undo-list t))
Z	      (setq status (apply 'process-file command nil t nil squeezed)))
Y	    (when (and (not (eq t okstatus))
		       (or (not (integerp status))
			   (and okstatus (< okstatus status))))
              (unless (eq ?\s (aref (buffer-name (current-buffer)) 0))
                (pop-to-buffer (current-buffer))
                (goto-char (point-min))
                (shrink-window-if-larger-than-buffer))
--8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----

Line Z is where the svn command are called, and there a function
process-file is called, this function calls in turn function
call-process. Function call-process encodes the arguments when
necessary, but the setting of coding-system-for-write to 'no-conversion
disturbs that, and OUCH, the command line passed to svn is not properly
encoded, so with some reason svn unhappilly barks.

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable


OK, I know that some Askese people will probably say something like
=AB=A0don't use non-ASCII characters in file-names=A0=BB which is IMHO quit=
e a
ASCII-centric way of thinking, so just in case, my answer is =AB=A0=CE w=EE=
ll
=F9se n=F4n-=C0SC=CE=CE =E7h=E6r=E2ct=E8rs n=E9v
--=-=-=
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable

=BDrthel
--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

=E8ss, because =CE =E0m mys=E8lf a n=F4n-ASCII
p=E8rs=F4n=A0!=A0=BB ;-)

  Vincent.


In GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32)
 of 2018-08-10 built on AIGLEROYAL
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
Recent messages:
Continuing through this frame
Checking out c:/Users/Vincent/Documents/administration/divers/20181212_je_v=
eux_=EAtre_un_homme_euro/trunk/20181212_je_veux_=EAtre_un_homme_euro.tex.~1=
18~...
Running in foreground: svn --non-interactive cat  20181212_je_veux_=EAtre_u=
n_homme_euro.tex
CSFW=3Dno-conversion
CS=3D(windows-1252 . windows-1252)
DIR=3Dc:/Users/Vincent/Documents/administration/divers/20181212_je_veux_=EA=
tre_un_homme_euro/trunk/
SQUEEZED=3D("--non-interactive" "cat" "20181212_je_veux_=EAtre_un_homme_eur=
o.tex")
Entering debugger...
Mark set
Making completion list...

Configured using:
 'configure --prefix=3DC:/Nos_Programmes/GNU/Emacs
 PKG_CONFIG_PATH=3D/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
 'CFLAGS=3D -Og -g3 -L
 C:/Programmes/installation/emacs-install/libXpm-3.5.8/src' 'CPPFLAGS=3D
 -DFOR_MSW=3D1 -I
 C:/Programmes/installation/emacs-install/libXpm-3.5.8/include -I
 C:/Programmes/installation/emacs-install/libXpm-3.5.8/src -L
 C:/Programmes/installation/emacs-install/libXpm-3.5.8/src'
 PKG_CONFIG=3D/usr/bin/pkg-config.exe'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LC_MESSAGES: C
  value of $LANG: FRA
  locale-coding-system: cp1252

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  TeX-PDF-mode: t
  recentf-mode: t
  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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
c:/Programmes/installation/cedet-install/cedet-git/lisp/speedbar/loaddefs h=
ides c:/Nos_Programmes/GNU/Emacs/share/emacs/27.0.50/lisp/loaddefs
c:/Programmes/installation/cedet-install/cedet-git/lisp/speedbar/loaddefs h=
ides c:/Programmes/installation/cedet-install/cedet-git/lisp/cedet/loaddefs

Features:
(shadow emacsbug vc-annotate vc-filewise edebug completion find-cmd grep
find-dired pp face-remap ediff-ptch eieio-opt vc-git diff-mode help-fns
radix-tree cl-print debug backtrace ediff-vers ediff-merg ediff-wind
ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff vc-rcs
vc-dir bbdb-com vc reftex-cite reftex-parse texmathp org-rmail org-mhe
org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int
gnus-range gnus-win gnus nnheader org-docview doc-view jka-compr
image-mode org-bibtex bibtex org-bbdb org-w3m org-element org org-macro
org-footnote org-pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func
cal-tex cal-menu calendar cal-loaddefs misearch multi-isearch
vc-dispatcher vc-svn preview prv-emacs reftex-dcr reftex reftex-loaddefs
reftex-vars tex-bar tex-buf toolbar-x noutline outline font-latex latex
latex-flymake flymake-proc flymake warnings tex-ispell tex-style
tex-mode shell pcomplete latexenc log-edit add-log pcvs pcvs-parse
pcvs-info pcvs-defs pcvs-util ewoc calc-undo calccomp calc-vec calc-aent
calc-alg calc-menu parse-time vc-cvs hl-line balance calc-forms
network-stream nsm mailalias smtpmail qp sort bbdb-message sendmail
mail-extr message rmc puny format-spec rfc822 mml mml-sec epa gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils
gmm-utils mailheader elec-pair edmacro kmacro jdee jdee-wiz jdee-test
jdee-archive memoize jdee-stacktrace jdee-refactor dired-aux dired-x
dired dired-loaddefs jdee-project-file jdee-maven dash jdee-keys
jdee-jdb jdee-java-grammar jdee-which-method jdee-font-lock jdee-issues
jdee-help jdee-gen tempo jdee-find jdee-deps jdee-cygwin jdee-custom
jdee-compile jdee-class jdee-bytecode jdee-bug easy-mmode jdee-dbs
jdee-run jdee-jdk-manager jdee-dbo jdee-widgets jdee-db jdee-open-source
semantic/senator semantic/db-find semantic/db-ref semantic/decorate
pulse jdee-import jdee-complete semantic/idle working fame jdee-parse
jdee-backend jdee-bsh jdee-util arc-mode archive-mode jdee-parse-expr
beanshell thingatpt semantic/sb speedbar sb-image dframe jdee-imenu
semantic/imenu imenu semantic/sort semantic/db-file semantic/adebug
eieio-datadebug data-debug cedet-files semantic/db eieio-base
semantic/java semantic/format ezimage semantic/tag-ls semantic/find
semantic/doc semantic/ctxt semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local jdee-avl-tree avl-tree
generator etags xref project efc eieio-compat jdee-annotations
jdee-abbrev jdee-classpath jdee-files jdee-activator jdee-log executable
cus-edit cus-start cus-load compile comint ansi-color ring cedet cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs browse-url flatland-black-theme calc-misc calc-arith calc-ext
calc calc-loaddefs calc-macs skeleton rx tex-mik tex crm advice
preview-latex auto-loads tex-site bbdb bbdb-site timezone bbdb-loaddefs
template w32utils cl recentf tree-widget wid-edit load-path-to-cedet-svn
time-date mule-util finder-inf package let-alist derived pcase cl-extra
help-mode easymenu url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq
byte-opt gv bytecomp byte-compile cconv epg epg-config subr-x
cl-loaddefs cl-lib 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 705712 103613)
 (symbols 56 59375 1)
 (miscs 48 1904 2148)
 (strings 32 161627 7850)
 (string-bytes 1 5385398)
 (vectors 16 71779)
 (vector-slots 8 2019402 40514)
 (floats 8 326 902)
 (intervals 56 18236 3220)
 (buffers 992 66))

--=-=-=--




Acknowledgement sent to Vincent Belaïche <vincent.belaiche@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#34350; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 8 Feb 2019 21:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.