From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#57800: TRAMP insert-file-contents now fails for regions Date: Wed, 14 Sep 2022 20:18:28 +0200 Message-ID: References: <87fsgt4ynq.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000890a1e05e8a72810" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14307"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57800@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 14 20:21:11 2022 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 1oYX0Y-0003XK-Qm for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 20:21:10 +0200 Original-Received: from localhost ([::1]:41300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYX0X-0001WK-TB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 14:21:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYWyk-0008TV-UK for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 14:19:21 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYWyV-0002Vo-EE for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 14:19:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYWyV-0006EZ-8W for bug-gnu-emacs@gnu.org; Wed, 14 Sep 2022 14:19:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 18:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57800 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57800-submit@debbugs.gnu.org id=B57800.166317953023907 (code B ref 57800); Wed, 14 Sep 2022 18:19:03 +0000 Original-Received: (at 57800) by debbugs.gnu.org; 14 Sep 2022 18:18:50 +0000 Original-Received: from localhost ([127.0.0.1]:56161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYWyH-0006DX-LR for submit@debbugs.gnu.org; Wed, 14 Sep 2022 14:18:50 -0400 Original-Received: from mail-ed1-f54.google.com ([209.85.208.54]:38419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYWyF-0006D6-02 for 57800@debbugs.gnu.org; Wed, 14 Sep 2022 14:18:48 -0400 Original-Received: by mail-ed1-f54.google.com with SMTP id e17so23558244edc.5 for <57800@debbugs.gnu.org>; Wed, 14 Sep 2022 11:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=hygWcbPewMHrYkL7s/aKLiaAWt0p5LrejM5EEVpSiKo=; b=hIZS6nUDcpE/MXMkUq9LU9pt2HbhsnMVuLSPgkpgRmWhW0XWheTUqBFCDbFAtUbXoQ w2nOvXeVxsrpBI29at5feIrQ6GyCuyvs0C5xhg+WP73u1/pYF/AG5+cLk3AaHSV/BcFS 2QZTiWU+AxrUhCXNTz1BsSqxT3/EW98HRpZO+/DnGPn6jZW5gY3cjHPueMC3vmtDqrGl mYlK340Qjgu4ITzOMq7EAmMvKrFC8/9pHagXPYdT+sCa/LIJSx+IgOMhEPHlJ+wJA/lF EyLSUaT0x2n6f90vPVO3AY0/XptGpU8Z7Cz39KvoeROO3olBOJuMWzJqmCdsRXfZKmSi wvig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=hygWcbPewMHrYkL7s/aKLiaAWt0p5LrejM5EEVpSiKo=; b=y/AQS+iu8sbKcph8++IFNG6l1AtdCboVb6jOFubJ1gJaxeatfrYDwpUQ5zijXc/Z+S lBhvDzX3Q3WAMJbzT6/N6UqIQzFdu30Ko6R39dReGU0WhWWhy4ttvjlDmPscToARPhTS MubKRh3kYZefldEM+0GUiC4nforq9/mAWjiQRPDRSnavjUeeVY2J27V2Zhif3g86X59b juyDjJrbrCBPDn9TIsL7L0NsZtDOxN3SiCRzHwInz//4FJZVS0jbXVx8n5In6lsT5fvv 0kKrPjoTdU1uBwkzFfvb7KLYHu5EBiKDhoDN+P3xzoM/Xh76bdP2EDyL5BtEbbzP1EbU 4Gtw== X-Gm-Message-State: ACgBeo0dcZYUb/dTzjK5TwJoQp01C101zvtM1nL+4ylwylN0lhlT6kaJ d0Nzbif4VJOf67g0/5CyPeLlhLQCKU1xrMbXJQ== X-Google-Smtp-Source: AA6agR6DkyRmTaUsmBfD1Gi+Duz/26NqAOY3cHlLsgFhYf7y4osJRqvHyDlZGg/Ph6hFXGoxu1E95o2WOwg2nqGzoM8= X-Received: by 2002:a05:6402:3904:b0:451:f01c:9217 with SMTP id fe4-20020a056402390400b00451f01c9217mr11451062edb.78.1663179520804; Wed, 14 Sep 2022 11:18:40 -0700 (PDT) In-Reply-To: <87fsgt4ynq.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242512 Archived-At: --000000000000890a1e05e8a72810 Content-Type: text/plain; charset="UTF-8" Hm, now I cannot reproduce this anymore. But today I got this bug, recompiled Emacs from Git and the bug was still there. Right now I tested Emacs 28 in case I managed to switch them accidentally, but no, also not there. So, either I have mixed something up, or this depends on some volatile state in TRAMP, e.g. its cache. I guess you can close the bug. Paul On Wed, 14 Sept 2022 at 20:08, Lars Ingebrigtsen wrote: > Paul Pogonyshev writes: > > > Git commit fd1ee05977. > > > > Open any file with TRAMP. From this buffer, evaluate: > > > > (let ((file buffer-file-name)) (with-temp-buffer > (insert-file-contents file nil))) > > > > This works fine. However, if you use a region: > > > > (let ((file buffer-file-name)) (with-temp-buffer > (insert-file-contents file nil 1 10))) > > > > this fails with an obviously wrong (file is certainly there) signal: > > > > Debugger entered--Lisp error: (file-missing "/ssh:...") > > signal(file-missing ("/ssh:...")) > > I tried this recipe with the current trunk, and things worked fine for > me. > > Is it possible that you have an old version of tramp somewhere in your > load path? I seem to vaguely recall that insert-file-contents + > start/end was something that was fixed sometime last year. > --000000000000890a1e05e8a72810 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hm, now I cannot reproduce this anymore. But today I got t= his bug,
recompiled Emacs from Git and the bug was still there. Right n= ow I
tested Emacs 28 in case I managed to switch them accidentall= y, but
no, also not there.

So, either I = have mixed something up, or this depends on some
volatile state i= n TRAMP, e.g. its cache.

I guess you can close the= bug.

Paul

On Wed, 14 Sept 2022 at 20:08, Lar= s Ingebrigtsen <larsi@gnus.org>= wrote:
Paul Pog= onyshev <pogon= yshev@gmail.com> writes:

> Git commit fd1ee05977.
>
> Open any file with TRAMP. From this buffer, evaluate:
>
>=C2=A0 =C2=A0 =C2=A0(let ((file buffer-file-name)) (with-temp-buffer (i= nsert-file-contents file nil)))
>
> This works fine. However, if you use a region:
>
>=C2=A0 =C2=A0 =C2=A0(let ((file buffer-file-name)) (with-temp-buffer (i= nsert-file-contents file nil 1 10)))
>
> this fails with an obviously wrong (file is certainly there) signal: >
>=C2=A0 =C2=A0 =C2=A0Debugger entered--Lisp error: (file-missing "/= ssh:...")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0signal(file-missing ("/ssh:..."))<= br>
I tried this recipe with the current trunk, and things worked fine for
me.

Is it possible that you have an old version of tramp somewhere in your
load path?=C2=A0 I seem to vaguely recall that insert-file-contents +
start/end was something that was fixed sometime last year.
--000000000000890a1e05e8a72810--