From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: What is the most useful potential feature which Emacs lacks? A: Autocompletion Date: Wed, 3 Jun 2020 21:49:26 +0300 Message-ID: <69ab5904-bcba-a4c2-4f42-8488d86bddbe@yandex.ru> References: <380db8f0-0e18-744f-d72a-a6e12c3b6e1d@yandex.ru> <8919f9382c738573f20d97e22f293d61866f99b8.camel@yandex.ru> <5f3891ac-29f5-f544-360c-384ff9608bd1@yandex.ru> <701b151d-2133-7916-3169-5d0f29cf3bb8@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="75842"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 To: Konstantin Kharlamov , ndame , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 03 20:50:33 2020 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 1jgYTA-000Jdq-R1 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Jun 2020 20:50:32 +0200 Original-Received: from localhost ([::1]:34626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgYT9-000303-Sr for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Jun 2020 14:50:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgYSC-0002Wg-Ag for emacs-devel@gnu.org; Wed, 03 Jun 2020 14:49:32 -0400 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:39208) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgYSA-0000HX-Mr for emacs-devel@gnu.org; Wed, 03 Jun 2020 14:49:31 -0400 Original-Received: by mail-wr1-x435.google.com with SMTP id t18so3494138wru.6 for ; Wed, 03 Jun 2020 11:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KRTUHqgWXkGr6PDMaBOJDaWjNB5xAvDuQWwk4ac8AM8=; b=CrdEcI6gE8rNyxj0S7KVur59rWrVz8IlKf4JKMx+OnN/aNoutVf2WdWGy06oe5LoNT VJK1N7q6EhYPB9gOj+MAbfmin8tDj4ImF1DbguNpZ7J7AcIdk8ehhBAsxkZEK03S+500 Ichj9q9Nk82fWkNcR3NOWEXV1eMcrP/fQtCNhA5xDKncT2ClXvKfF9roHzfvHIBoeohc vs2/xgWNKLeAiOLAMEG7SXL3fnEHvPKCwYlhkFcjLeiBjLj0gS7w0dDENnOPVDkVFfzQ OotKxX9Lh0MAQd064mSQQfB37suXlG+YekoJf9xCnb+Ka2oDsmswE7ZkB+cUhGtCThsE EbyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KRTUHqgWXkGr6PDMaBOJDaWjNB5xAvDuQWwk4ac8AM8=; b=kjIYys/aF227i5cpH9idYAYZulJfiVJHOb3Y5ZLSUMXYjfM42tnfZ7Bl3UV3zxThQ4 wGXMWte1lfghr8YPqm8FyG5D095o0KSdot4qCn4WQCiiVsFgCz7mrEq/wiSBYaH+lxH5 eKvJb3v/wXp92QhyF5XcZ1iDvCBZxTIsFqIQVKL2+L6JUzEaK9/A1sjKF03yBDXslyDN fhZn3EmVdAhFYkrvTl37KcodhxXQx20sebnLnGHo2QviBudrI3nOnfGMD2SC50Jn0x2A +fBu3nIv5k8mCuvfKGgCIG85b82OlgXFV1dFsXds1isDfypVpdXHNoAgRNErJEg7bG7+ pTAw== X-Gm-Message-State: AOAM531GOtElzfEZuQ9dJbADUkMDbWsGBqvtJhFPerRTT+FCJ5FW0WH2 eXjnbZ6kx31eLBeYNWkkhXNKIClT X-Google-Smtp-Source: ABdhPJxjQbwh/6dO3gdDKPAscuwRD4hvB3ktMQOhWQ/3NR9MBbM+1l94IxWez7TJbKxQ8biW3Lc73w== X-Received: by 2002:adf:ff83:: with SMTP id j3mr778954wrr.264.1591210168391; Wed, 03 Jun 2020 11:49:28 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id u7sm4696695wrm.23.2020.06.03.11.49.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jun 2020 11:49:27 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=raaahh@gmail.com; helo=mail-wr1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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:251815 Archived-At: On 03.06.2020 17:40, Konstantin Kharlamov wrote: > I mean, I was typing outside Emacs, in the same terminal where > `libinput debug-events` was running. I was just testing how fast I can > type, to figure out how small the timeout should be set if I want a > completion to pop up. Not sure how to interpret its output. Here's what I was getting while typing 'prog': event15 KEYBOARD_KEY +21.57s *** (-1) pressed event15 KEYBOARD_KEY +21.66s *** (-1) pressed event15 KEYBOARD_KEY +21.68s *** (-1) released event15 KEYBOARD_KEY +21.74s *** (-1) pressed event15 KEYBOARD_KEY +21.76s *** (-1) released event15 KEYBOARD_KEY +21.84s *** (-1) pressed event15 KEYBOARD_KEY +21.86s *** (-1) released event15 KEYBOARD_KEY +22.00s *** (-1) released That seems like I hit a key per ~100ms, but handling the releases adds its latency. >>> I don't see any lags, so I assume using an async backend with the >>> timeout set to 0 should work fine. >> >> Indeed, that's what asynchronous means. But the quality of the user >> experience also depends on how quickly the backing server can handle >> those requests. > > Well, I paused the backing server in the steps above, so server > couldn't answer. This was emulating a behaviour where a user works with > a project too big for backend to return a completion immediately. That tests the best case (which is, it assumes that when you turn the server back, it can handle the load). No typing latency is good (of course), but if you don't see completion suggestions because the backing process is overloaded, that's not so great either. I'm not saying it's going to be a problem with Irony or LSP necessarily, but I've seen this reported in other circumstances. Just something to pay attention to. >> The majority of backends are synchronous. And the "standard" >> completion >> API for Emacs (which we want to integrate with) still only supports >> the >> synchronous convention. > > I am a bit confused by the last sentence. What's the relation between > the Emacs API and already working company-mode? Did you mean, company- > mode is trying to be compatible with backends for some standard Emacs > API, and those can't be async? Pretty much. Eglot does include a hack to minimize typing latency as well, but it's an ad-hoc solution, and there's no way Company would be able to detect this kind of approach being used.