From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Sat, 5 Jun 2021 11:46:39 +0200 Message-ID: <20210605094639.uisgloguftbjnjoe@Ergus> References: <831r9iw473.fsf@gnu.org> <87h7ieyma7.fsf@gmail.com> <15be7dd8-e901-e317-5111-e1a34f6f0416@gmail.com> <83k0n9l9pv.fsf@gnu.org> <83eedhl83r.fsf@gnu.org> <838s3olsok.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35252"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jim Porter , ubolonton@gmail.com, dancol@dancol.org, theo@thornhill.no, joaotavora@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 05 11:48:02 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lpSuO-0008zs-DH for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 11:48:00 +0200 Original-Received: from localhost ([::1]:39742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpSuN-0006Iq-FL for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Jun 2021 05:47:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpStb-0005ar-Ha for emacs-devel@gnu.org; Sat, 05 Jun 2021 05:47:11 -0400 Original-Received: from sonic313-13.consmr.mail.bf2.yahoo.com ([74.6.133.123]:45450) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpStY-00077H-Gd for emacs-devel@gnu.org; Sat, 05 Jun 2021 05:47:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1622886426; bh=S7Gs3F+8JQ+ZBmhVDYJQfkV+MP1qQvI1Shfr0bNqCX0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=rPydCglNQ55f12LcyHGdLYFMvT1C1gsplZBgWGPfZnlBUU7Sq32Sl40hU4mRqnO4CA+OYjGy07hLX4pnIxOtDxRx/HrP50lfYnGfzF6dw7xMNTLawdJlenvaMNvlIQzG/XLiXJyHyI/AAAIGtVhzqXbcVqOqr9pWSahbxUhoOvZvH4dDnMReAIidj9PTKraqT6IsRSrSqulVIZFeiUI6dR86Zg6Ceb5qdJlt4nCOQRSoYgoehh9lpXIIsg9ko6akcBV3bv0rcez82JlXVck2pUMH8a/1EtENXC8BFn2kEPrbCD+Px7MIfpWkOoj4hq9Dikeok+X37qf7tguGYwPEmQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1622886426; bh=uqQn37aLNNRtG2IC4bJrRrKLmaptyluUXW1MtS7o4XS=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=Wk4wFWSd53I6wyQgItvfoUj8Z2tDOBTSdz5iHuVgWAQGxj5MPm3pfSEzJO5/G8iPgDQNvmT5gyYGA2mPaIUKXNBoatm1WvPi5KhAgs1jESRhQKqOTI03jL7sXBOa+m3lP8k2pKhVegz8dvOknRH1XZ1WSPiQPoeQhNjuFDERk1lWFftfTBWb0Pc7CpsgHFtdQ0HX5bydclAmYrYhc86D5zz/o4tGiJlTBNBMlpt2lE9N8Pz/34YhCsxfJ08y8kJpTn/EB9jeAYc0g3eFlJhItyiNpBHH2PPySdbRXcQqebG3FVUb2Zx+7VjWlGN7UmrotpsngsY73dmsuFNqUK4RIQ== X-YMail-OSG: F27TJa8VM1lCYUAiF4wZj30vl4O08PuHvLlpN0Eyoje16W43EVtYLKFLMlImnB. A27vnIiZ_AL_cuwi11PZNYHgUJ2AnBWC2PuzrVSjCILsJfNVUVXPfBqDSGqbDzycRvSAKI.vMMWX J_k.J_8ePkGy5xE0sMxS02Ib4CgXppPajsUcga0Pho6o_yx4_.ZjGAnm6tDOFbgyn1s1ikSrgh7D 6Sj0K73lgTGVaaOiRzuXs7TDbaFyTN3eRWdtWfWiySPadwp1vGqKOp23wDiK2uyh780lPSAjq9g7 Sr.hCZGtmq89XhWu5KfgiuY5CrZEQFLnfK7NE6r64ehb0DeRBTRePxG23dKn15eWO2rHK7VOficY kdTP4S5HjRskvM7lNHsVwdHay0zkSa7FVJFo07sCjzKAcCMsjaNniUTxbt7_thl9Rg9nq7S7qrFl 4HEIPrgIXQing5EQQJ0YVhEm67gwmu97T6hvcpLTgscwXnVQQbGj.NXUN9QX6CDEH0bbGH1kPznU iSXwLbBtAoD1n6Br7jIVfvhMuH17Sm1F7Did_VQY.j0UM8a0TMpYUERPuaH6ROMBAFo4B_S61Ykc oc1t.4agOQRqSSrmhpRivJJZ8TjpxGUmapYRPoHvtp_2jNGFsWFPHx7zdRQn6spKDbZOq9TQSp8L MXzTWZhKxPdrzLM0Pd.s9AYV48RsNi4tNZUtzUwjJrTq.Sup52oaG8R6F.cFz8U0JlhkVASNtONK p_Nj6xOPAjpyo9B5j_xySGN0.xj9ZtfYLl36NBbkJRqYU5CBVwBB0rCJZ3F7cNFdWtGvBZ9UE014 RbEg6cLAr9HQgD4LQ4smB6ljd9qjOesmcDBliCD2GH X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.bf2.yahoo.com with HTTP; Sat, 5 Jun 2021 09:47:06 +0000 Original-Received: by kubenode530.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 3a1edcba903a4d35bd16243a564bbe19; Sat, 05 Jun 2021 09:47:00 +0000 (UTC) Content-Disposition: inline In-Reply-To: <838s3olsok.fsf@gnu.org> X-Mailer: WebService/1.1.18368 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.133.123; envelope-from=spacibba@aol.com; helo=sonic313-13.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270423 Archived-At: On Sat, Jun 05, 2021 at 09:41:15AM +0300, Eli Zaretskii wrote: > >I see, thanks. > >So is Emacs the only editor using LSP with remote files? If other >editors support that, how do they solve this problem without incurring >delays? > I work with servers all the time and I have tried all kind of tools for remote editing. So far the only other editor for remote files supporting completions that just works and I am aware of; it is Visual Studio [code] family. And actually, they use LSP protocol for that (completion and indentation). If I understand more or less how it works in VS it seems like the LSP server runs locally (because it does not require any remote modification/installation or so). They do a kind of local mirror for completion (probably something similar to sshfs to access all the unmodified files "on demand" and get the best possible information) and they store a cache of the project in the local filesystem to avoid recompiling everything the next time they use the project.. Of course, there are some problems when the remote environment is not available locally (missing modules, compilers, libraries). But in general it is easier to install/modify locally than remotely (in our tramp approach + lsp-mode or eglot; if clangd is not installed in the remote server the user have nothing at all... and installing clangd in every single remote system we use is not an option due to time, permissions or resources.). It seems that there are some heuristics there too, to reduce errors exposes to the user and do the best possible, but in general it works pretty well, specially for C/C++, jacascript, nodejs, and python. >> Moreover, in my own usage of Eglot, I find it very convenient that it >> runs the LSP server remotely. I often find myself files remotely over >> TRAMP from a local machine with a minimal set of devtools. While I >> could install all the LSP servers I need on all the machines I connect >> from, it's less effort to rely on the fact that the machine that'll be >> doing the compilation has all the devtools I need. > >That sounds like a use case for running Emacs on the remote machine, >and only having the display on the local machine, like via X >forwarding or similar technology? > Some time ago, one of my first questions in this mailing list was how to run emacsserver on a remote machine and connect to that with the local emacsclient. On that moment that was not supported. The approach any way has some practical issues. 1) We can't always open ports in the remote server; so we need at the end to do a proxy throw ssh. 2) Many remote servers (for example login nodes in HPC servers) kill the running processes if the user disconnects or if the process is in the background.