From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Recent diff-mode changes feel slow with TRAMP Date: Sun, 13 Jan 2019 22:31:35 -0500 Message-ID: References: <87r2di5x4r.fsf@secretsauce.net> <87va2sb6ai.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1547436627 17765 195.159.176.226 (14 Jan 2019 03:30:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2019 03:30:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 14 04:30:22 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gisxB-0004U4-IJ for ged-emacs-devel@m.gmane.org; Mon, 14 Jan 2019 04:30:21 +0100 Original-Received: from localhost ([127.0.0.1]:37447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giszI-0007TS-CH for ged-emacs-devel@m.gmane.org; Sun, 13 Jan 2019 22:32:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gisyZ-0007TM-4M for emacs-devel@gnu.org; Sun, 13 Jan 2019 22:31:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gisyY-0006ns-Dm for emacs-devel@gnu.org; Sun, 13 Jan 2019 22:31:47 -0500 Original-Received: from [195.159.176.226] (port=36918 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gisyY-0006mF-6p for emacs-devel@gnu.org; Sun, 13 Jan 2019 22:31:46 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1giswM-0003D8-ED for emacs-devel@gnu.org; Mon, 14 Jan 2019 04:29:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:fbf6hJCqM8Ja8ZUeyet3qQBq+ho= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:232331 Archived-At: >> Maybe it should be disabled by default in remote buffers. > > 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; 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)? It could also be used in those cases where you're looking at a diff "out of context" (so the base file can't be fetched)? Stefan