From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Recent diff-mode changes feel slow with TRAMP Date: Sat, 19 Jan 2019 23:04:14 +0200 Organization: LINKOV.NET Message-ID: <87h8e4idd9.fsf@mail.linkov.net> References: <87r2di5x4r.fsf@secretsauce.net> <87va2sb6ai.fsf@mail.linkov.net> NNTP-Posting-Host: ciao.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ciao.gmane.org 1547934989 141189 195.159.176.228 (19 Jan 2019 21:56:29 GMT) X-Complaints-To: usenet@ciao.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2019 21:56:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 19 22:56:27 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1gkybK-000ai3-JT for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2019 22:56:26 +0100 Original-Received: from localhost ([127.0.0.1]:60310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkybT-0001hG-KM for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2019 16:56:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkyaY-0001gx-Pl for emacs-devel@gnu.org; Sat, 19 Jan 2019 16:55:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkyaV-0002p9-4g for emacs-devel@gnu.org; Sat, 19 Jan 2019 16:55:37 -0500 Original-Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:24256) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gkyaN-0002iX-OO for emacs-devel@gnu.org; Sat, 19 Jan 2019 16:55:31 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AC38D5C360A; Sat, 19 Jan 2019 21:55:23 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (unknown [100.96.36.160]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 635B05C347B; Sat, 19 Jan 2019 21:55:23 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Sat, 19 Jan 2019 21:55:23 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Army-Little: 4f2ef7a51bf275a8_1547934923531_3383061365 X-MC-Loop-Signature: 1547934923531:2971114012 X-MC-Ingress-Time: 1547934923531 Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a6.g.dreamhost.com (Postfix) with ESMTP id 0C77C80B10; Sat, 19 Jan 2019 13:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=qzMEUgd+diBjjThQacsMvV6H6jc=; b= HQ0J5gDEEvvpIZyYdbL0A2w/EYpNClpHFom4A0fpt+cGhW6YGdWn3EMTqPcL6AEh 6SSaSr7k8TKupjL6kwXRa/TnjPmRTXeMXPgtpGnyEUfE84B6i6liaxJHMWPJWYs9 m2/ZHgbAC4qVkUTvVMcJMN/XryiN5maCkAawpc/wNnw= Original-Received: from mail.jurta.org (m91-129-101-91.cust.tele2.ee [91.129.101.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a6.g.dreamhost.com (Postfix) with ESMTPSA id D3B4580B31; Sat, 19 Jan 2019 13:55:19 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a6 In-Reply-To: (Stefan Monnier's message of "Sun, 13 Jan 2019 22:31:35 -0500") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrhedvgdduheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutddurdeludenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutddurdeluddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehmohhnnhhivghrsehirhhordhumhhonhhtrhgvrghlrdgtrgenucevlhhushhtvghrufhiiigvpedt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.214.98 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232503 Archived-At: >> When a remote host is fast, it's a big advantage that TRAMP supports >> this feature without any efforts. But when a remote host is slow, >> it should be disabled indeed. >> >> I can't confirm what effect is has on slow connections because all my >> remote connections are so fast that I don't notice any difference >> between remote and local. > > Do you think it would be possible to provide a fast/local option for > diff-font-lock-syntax which doesn't fetch the base file but still > performs some syntax-highlighting (e.g. just take the hunk's text into > a temp buffer, put it in the appropriate major mode and > call font-lock-ensure; There is already an option `hunk-only' but I don't know how TRAMP could detect a slow connection and set diff-font-lock-syntax to `hunk-only' in this case. > maybe bailing out if the end of the hunk is > taken to be within a string, in which case maybe the whole highlighting > was done wrong because maybe it was the beginning of the hunk which was > inside a string)? Also I don't know how to detect a partial string because if there are two unterminated strings (i.e. two quotes) in the same hunk they might be interpreted as one "inside-out" string.