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: Sat, 1 Oct 2022 18:16:01 +0200 Message-ID: References: <87fsgt4ynq.fsf@gnus.org> <875yhp4xyf.fsf@gnus.org> <87h719j5g6.fsf@gmx.de> <87sfkry80u.fsf@gnus.org> <87o7uyihq6.fsf@gnus.org> <87v8p6hyg4.fsf@gmx.de> <87r0zsiu5h.fsf@gmx.de> <87mtagisnt.fsf@gmx.de> <87h70ofxck.fsf@gmx.de> <87czbbfu73.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e47d0505e9fb6d94" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20430"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 57800@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 01 18:17:28 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 1oefB8-00058V-OO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 18:17:26 +0200 Original-Received: from localhost ([::1]:35762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oefB7-0003yA-6e for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 12:17:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oefAl-0003wQ-Dd for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 12:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oefAk-0005Qj-OX for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 12:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oefAk-0003fZ-En for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Oct 2022 16:17:02 +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.166464098214057 (code B ref 57800); Sat, 01 Oct 2022 16:17:02 +0000 Original-Received: (at 57800) by debbugs.gnu.org; 1 Oct 2022 16:16:22 +0000 Original-Received: from localhost ([127.0.0.1]:45616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oefA5-0003ef-Ng for submit@debbugs.gnu.org; Sat, 01 Oct 2022 12:16:22 -0400 Original-Received: from mail-ed1-f43.google.com ([209.85.208.43]:34752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oefA3-0003eR-5r for 57800@debbugs.gnu.org; Sat, 01 Oct 2022 12:16:20 -0400 Original-Received: by mail-ed1-f43.google.com with SMTP id s30so5863250eds.1 for <57800@debbugs.gnu.org>; Sat, 01 Oct 2022 09:16:19 -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=TrLyJftdumbM+JdWndjFzMsDr7PFNAsLWi8pGskx8jE=; b=mPNrHSBYsbA41w6daTcg9y8+XcIozvTYnqmJnWB1PTmCUwLoZ66Dq66NOKnnt48Sfd iPv+wlxujh9Avkyb9cTCVSSJvCxmUf3R3UY9n6x9kJzd3Rdgszle1r9tnt4RcllhbCcE pCRnFhFM/oYmOItb1e/Gho9yXzsjnPVOBvWocVjdTW9+9MsoMhKIqdfysgezzIpH2R6D OvfRUqgoggF/KOmdTLhuKcxeu/o9I+DWoQlVKFh2Qt4OJgYRUddUnoXWQO0oFuEl3NgF el1VPEcL9rL8Tk4kqn1KWPAOsFXZ2H1radra4DsToUcd9miPvYNaR7D1GU8eFGrT+aMr FLcw== 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=TrLyJftdumbM+JdWndjFzMsDr7PFNAsLWi8pGskx8jE=; b=RASK8hio4AN8jj6K6/tRlYQn8TrD5XKIWFwg+gVVWmUJarLgphsp1sU9rNxHDUXTNB eZkHR8mKkW0UyIHXWu3QYSJy3N2kJPeq7kUv+/0c1hJrGTSwTCKTZAUdVGdLlm/qWb3g Be2vVUUQL1KSw82wnvLQU8G19RABxym53lcsh4l8l7MTl+IVjR/7b4KP8HjnVt6uTPUq KyHYdUTZQuH1eoN0+GA91NiEU7odYk2cFcrodDdYQgoLkmrd6xiUyWgvmK45LEuqR+/9 amcqtvaWaPLYOGraTiXJUo5dyYnSJspl3OyHpgf4kkz0eNoS42HWEwfBQzoXtXyFre2h l9Nw== X-Gm-Message-State: ACrzQf0U7CjGub7Me5OWhrN6/s55TgOA3mEqAurZSYDSU9hTrpmlY5Ef h12BtZncSk98ubkQ0FToJkrYirPryMUabTLg9g== X-Google-Smtp-Source: AMsMyM7R/HgCXqAUSNVhYQ3GjsJgWvUFlnNvl1880mpjF/KwflimczKdmGQPx+TvhN49IDs3MBiBOaju4N7Fir3sMl0= X-Received: by 2002:a05:6402:557:b0:458:7488:8958 with SMTP id i23-20020a056402055700b0045874888958mr7833792edx.242.1664640973305; Sat, 01 Oct 2022 09:16:13 -0700 (PDT) In-Reply-To: <87czbbfu73.fsf@gmx.de> 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:244151 Archived-At: --000000000000e47d0505e9fb6d94 Content-Type: text/plain; charset="UTF-8" > However, the cache doesn't keep its own version, it uses just the Tramp > version for check. Yeah, as long as it is not expensive, it won't hurt to throw it away whenever Tramp version changes, even if cache format stays the same, just to be sure. Paul On Sat, 1 Oct 2022 at 17:19, Michael Albinus wrote: > Paul Pogonyshev writes: > > Hi Paul, > > > Thanks. I suggest also adding a simple "version" to the cache. > > Whenever you make an incompatible change in the future, bump this > > version. And also make Tramp automatically discard all cached values > > when they come from a different (earlier or even a later) version. > > Otherwise something like this will certainly happen again sooner or > > later and will cost both the person bumping into it and you or whoever > > responds to the bugreport a lot of time again. > > That's a good idea, thanks! I've pushed a respective change to master. > > However, the cache doesn't keep its own version, it uses just the Tramp > version for check. Using an own cache version is error-prone, there are > good chances to forget to change it when needed. At least *I* would > forget it always, as far as I know me. > > > Paul > > Best regards, Michael. > --000000000000e47d0505e9fb6d94 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> However, the cache doesn't keep its own version, = it uses just the Tramp
>=C2=A0version for check.

Yeah, as long as it is not expensive, it won't hurt to throw it away=
whenever Tramp version changes, even if cache format stays the s= ame,
just to be sure.

Paul
On Sat, = 1 Oct 2022 at 17:19, Michael Albinus <michael.albinus@gmx.de> wrote:
Paul Pogonyshev <pogonyshev@gmail.com> writes:

Hi Paul,

> Thanks. I suggest also adding a simple "version" to the cach= e.
> Whenever you make an incompatible change in the future, bump this
> version. And also make Tramp automatically discard all cached values > when they come from a different (earlier or even a later) version.
> Otherwise something like this will certainly happen again sooner or > later and will cost both the person bumping into it and you or whoever=
> responds to the bugreport a lot of time again.

That's a good idea, thanks! I've pushed a respective change to mast= er.

However, the cache doesn't keep its own version, it uses just the Tramp=
version for check. Using an own cache version is error-prone, there are
good chances to forget to change it when needed. At least *I* would
forget it always, as far as I know me.

> Paul

Best regards, Michael.
--000000000000e47d0505e9fb6d94--