From debbugs-submit-bounces@debbugs.gnu.org Sun May 23 10:55:38 2021 Received: (at submit) by debbugs.gnu.org; 23 May 2021 14:55:38 +0000 Received: from localhost ([127.0.0.1]:41590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkpVy-0000ep-13 for submit@debbugs.gnu.org; Sun, 23 May 2021 10:55:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:50318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkpVw-0000ei-Ri for submit@debbugs.gnu.org; Sun, 23 May 2021 10:55:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkpVw-0005Ew-Dl for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 10:55:36 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:36404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkpVu-0006hJ-Qg for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 10:55:36 -0400 Received: by mail-pg1-x532.google.com with SMTP id 27so16885475pgy.3 for ; Sun, 23 May 2021 07:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:mail-followup-to:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=av7DoXwXECaaJB1v5lr/4I9GgjSk/63+fbgkV28Dac0=; b=zD9fxikcUorlb8+2VnBTksCcHESx0NIlzbfasporeOw45J9IjqwVFUkUNjAuk2yvpq yI4sEUxtorMjWDg4dzl7dEAnord9rR9IDcQTkoZOPGIVlYb85YdwG9nftrB0o6yesY3K UsXJyn/GGSHyG5ytqJuTUk9c62n2av+thTsRYII6Y5sv1o8J3/D78+3iUMLznO3asLlJ tQsaJTw/u2WYlNNGKs5mrhtqBckFTfKB+yg3GaExLBxHAq2jguIhWAa5xjbg6BppOb2I IdoidLseFQYESHvi/aV3kqumn0WyNSwTRGyi4rPKCrmYfSfZcifGAPn4Bledox6J3ywQ EhgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:mail-followup-to:date:message-id :user-agent:mime-version:content-transfer-encoding; bh=av7DoXwXECaaJB1v5lr/4I9GgjSk/63+fbgkV28Dac0=; b=jEUmJ1PV4F+E4A9ASLs21OZWpONCLOPMGC0CpvjsBUDO7Hu6nu6ohSaCdp/22qIlGD WzH07wGFxkCnB8ejplJmG8o5KCOfG0KBc/yD7Z8k6R/Zwq28D9/cp4n/ad1sR+mURR13 jG2XV5PnmTKOy/x0ibrVfKOY8nuSksiWcwM0UIMsXeU5LBIg7pQnqrE5SrSbJchbO1st iaJoUtKNRdhtS0TqTBgsUceruOEppmcRp6HMndgq6IFyQK0KHMNc/dw7RxciffPiMNU8 O+CRt9qQPMPkpWJmx4FtTb+4xpF5j0XnFI50hueEYC/z6/WrK2sAQPcKrKMT0aT1+UlQ AoXg== X-Gm-Message-State: AOAM531KVH9jaLBNAkLpamoB7YTAIjkqjhOieU5Q8cQh9d0AOp2xk0HU SuzRd5QOBVhEVOFrC5SnRUtsiRJmXY8fUA== X-Google-Smtp-Source: ABdhPJwAtpy7PkU4VhQ2PTZnwqknFBt7VQFfP9XORJykzepJbl1QQ/3MOVYJtSPOe1vTgP1Pfwp/UA== X-Received: by 2002:a63:6486:: with SMTP id y128mr8780543pgb.414.1621781732553; Sun, 23 May 2021 07:55:32 -0700 (PDT) Received: from mb2.local ([2405:201:5c06:70a7:40a8:7b00:eb13:1e9e]) by smtp.gmail.com with ESMTPSA id s1sm6741180pfc.6.2021.05.23.07.55.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 07:55:32 -0700 (PDT) From: Pankaj Jangid To: bug-gnu-emacs@gnu.org Subject: Eglot and tab-always-indent conflict in python-mode X-Debbugs-CC: joaotavora@gmail.com Mail-Followup-To: bug-gnu-emacs@gnu.org Date: Sun, 23 May 2021 20:25:28 +0530 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=2607:f8b0:4864:20::532; envelope-from=pankaj@codeisgreat.com; helo=mail-pg1-x532.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.1 (---) If =E2=80=98eglot=E2=80=99 is running and =E2=80=98tab-always-indent=E2=80= =99 is set to =E2=80=99complete. Then in python-mode, TAB doesn=E2=80=99t cycle point column positions. For examp= le, in the following code if you are at end of line 2 and then you press RET then TAB doesn=E2=80=99t move the point to left margin. Without =E2=80=98eg= lot=E2=80=99 this works fine. #+begin_src python def greet(s): print(f"Hello {s}!") #+end_src From debbugs-submit-bounces@debbugs.gnu.org Sun May 23 16:41:30 2021 Received: (at submit) by debbugs.gnu.org; 23 May 2021 20:41:30 +0000 Received: from localhost ([127.0.0.1]:41841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkuuf-00075P-Ox for submit@debbugs.gnu.org; Sun, 23 May 2021 16:41:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:39384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkuue-00075H-5w for submit@debbugs.gnu.org; Sun, 23 May 2021 16:41:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkuud-0000sA-VQ for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 16:41:27 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:43793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkuuc-0000Ja-8H for bug-gnu-emacs@gnu.org; Sun, 23 May 2021 16:41:27 -0400 Received: by mail-wm1-x332.google.com with SMTP id z85-20020a1c7e580000b029017a76f3afbaso7375081wmc.2 for ; Sun, 23 May 2021 13:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-transfer-encoding; bh=JCsBYpl8mPasf3WAdKk08ZAud9QdT6d47UXYgryaCIE=; b=bGANNg0QT7KId5lRfmpf9qwOdrFIa98KBsipHhw5/QWQ4AaqLf4yzc0OH+byanwGNm ptowOBHjqf3dTbHAfchjPZzCsMWdii2Z43+Mj3GjxYC1RJBhx5qpmz+ojU0Kuuo9zpDV k0UZ+9R9Qqm581VlO0NH86n/rM/zTkdmRJLkMk5hfsZwRCtWQDwEyY5VPgTImr+T7Bfe JQdHT/R/wd5NepQfnZobAWwFfNmUsmuGwzUB0oZE96exWdSvu73hxVCguJUWzS0boRpv g/izRn62U/djzExibqQR3HPPHDGoMc8GT2lftXY5kPIVeuWpz+Abkl29lGAewoQV8Kx3 9JKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=JCsBYpl8mPasf3WAdKk08ZAud9QdT6d47UXYgryaCIE=; b=s9Ari3stBgr/uzmgKTQhw4V0fm9AyR4bSNOzuSCqgwq0Eon0/OtqVPtgHa19Hjaml2 effl02wY3RLf3oFzTiTSW2IB5R+wOMO/dA4PsKyTIAuMW+gvC1L+wk4E93NNsnysgJrb K2wn3hgIUEmDaASIzpCCGdb3Q/Nf7boOXBr5W+LhvLr8CCswM313a8JJW9NHlRIes4rD ugnyAsZF3mYP2ScG2mhOC0U7wqJnjRiDHymvI2CvXWej+B1IFm8rm2muDWOzEFSMWidg 0DqyyUsmonvKUOsZP8iEj5PBxB6vlZH7XorNkZDgGz5XP6jKRicYq07RWfZxcG02TCuA 2SxA== X-Gm-Message-State: AOAM531xRqLFxhfuq+V0rEwIzGGxuCRP9YrMSvQRPQmRt+Ydsk9en80U /PjiSjZLA62kXnXcXI6Og85qnB33PKM= X-Google-Smtp-Source: ABdhPJwvY6wEpGknYlBolLdmYp7dCNnQnZYnDxGpItkJeVW0kcze8RheY5DNCSKX+vsy63UVvV/fvQ== X-Received: by 2002:a1c:4c03:: with SMTP id z3mr16989328wmf.53.1621802483981; Sun, 23 May 2021 13:41:23 -0700 (PDT) Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id c15sm9756314wro.21.2021.05.23.13.41.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 13:41:23 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: bug-gnu-emacs@gnu.org Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: Date: Sun, 23 May 2021 21:41:22 +0100 In-Reply-To: (Pankaj Jangid's message of "Sun, 23 May 2021 20:25:28 +0530") Message-ID: <87v979b2tp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x332.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.6 (-) Pankaj Jangid writes: > If =E2=80=98eglot=E2=80=99 is running and =E2=80=98tab-always-indent=E2= =80=99 is set to =E2=80=99complete. Then > in python-mode, TAB doesn=E2=80=99t cycle point column positions. For exa= mple, > in the following code if you are at end of line 2 and then you press RET > then TAB doesn=E2=80=99t move the point to left margin. Without =E2=80=98= eglot=E2=80=99 this > works fine. > > #+begin_src python > def greet(s): > print(f"Hello {s}!") > #+end_src Hello Pankaj, I cannot reproduce this. Here's what I ran: $ emacs --version | head -1 GNU Emacs 26.3 $ emacs -Q -f package-initialize -L ~/path/to/eglot/eglot -l eglot \ ~/path/to/a/python/file.py -f eglot This opens the file which has your example contents, and starts up eglot. I move point to the end of line 2, press RET and press TAB twice. Point is at the left margin. Without Eglot, the result is exactly the same. I would find it odd that Eglot messes with TAB behaviour, but I'm waiting for a more complete reproduction recipe from your part so we can understand what's going on. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sun May 23 17:03:00 2021 Received: (at 48609) by debbugs.gnu.org; 23 May 2021 21:03:01 +0000 Received: from localhost ([127.0.0.1]:41847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkvFU-0007bY-Lr for submit@debbugs.gnu.org; Sun, 23 May 2021 17:03:00 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:40089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkvFP-0007bG-7g for 48609@debbugs.gnu.org; Sun, 23 May 2021 17:02:59 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 2FE44E92; Sun, 23 May 2021 17:02:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 23 May 2021 17:02:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddavis.io; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= lSRnadQiNA8cg4aiQurJzaoOUv567DY0oW1yKEj1UmA=; b=mnJeNNygjuKf749p AaRTYLC+z7BkzPwxuL5MVqSw5IhEr62J5LrjfUOIFjShyGGDIMZrVjVtKf/sI9kO tTQSmjaDi7beNZEH2MRoGt39ZmiNEonRr3kbovqh1CT9oYK/sR52TlJwaeu8UVDO kLM4+xMvg2rnoRIxKvZjNYCmwOLSE2tWxl+y67PSYqZaiWiFX4kcsMoo2TdjFNU2 Tcq38qf5SFiecbvGbnYHXQWmMMKILSdxZDw0YplYrbG90NF8YFMPImjIACJtRHZL 4QiXJ2zhMvxYvrCMKHCVqXgobf2HPzUplCmV0RnI7tgUGKSVnfEZRAPir/4ZwWSL fCnPTQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=lSRnadQiNA8cg4aiQurJzaoOUv567DY0oW1yKEj1U mA=; b=RiA2t66tXc0vYAbB4DxM+xk6nqeNYHQHbTv83/6xuRXy3VwS/Ws8dZVWy 5tEWgMQUOD7jqiIYxt6NCclNshSGxiYXaTkDUaejKNodV4zqD28MszIRmX+EM62r H4wFq8CCS8atP08UCQwIHJRFY2xvA0afExh1iMH7+GuMAgvmQQE0YJmLs0bAb9bd WCqjv8US8IEueIHoTo1zE4IyEtBAT3L2/9U2VQxgB39oUCeWRrLRWZnu5ROf/q37 csHqMuDmd3iL/7ZR1Ec5tdmVBPM8NLqtYLBUJKgkCHRiEiU7+6hG+1Yl5SImdwVC DyPHikmiDm1Hr9WbH+HQA21VpP6rQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdejjedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufhffjgfkfgggtgfgsehtqhertddtreejnecuhfhrohhmpeffohhu ghcuffgrvhhishcuoeguuggrvhhishesuggurghvihhsrdhioheqnecuggftrfgrthhtvg hrnhepvddtfefhjeekfeeuheeugedvgefgleeugeeiffeghfekjeeftdethfegveelgfek necukfhppedvgedrleekrdejiedrkedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepuggurghvihhsseguuggrvhhishdrihho X-ME-Proxy: Received: from localhost (c-24-98-76-80.hsd1.ga.comcast.net [24.98.76.80]) by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 23 May 2021 17:02:48 -0400 (EDT) From: Doug Davis To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> Date: Sun, 23 May 2021 17:02:47 -0400 In-Reply-To: <87v979b2tp.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sun, 23 May 2021 21:41:22 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Jo=C3=A3o & Pankaj, Jo=C3=A3o T=C3=A1vora writes: > Pankaj Jangid writes: > >> If =E2=80=98eglot=E2=80=99 is running and =E2=80=98tab-always-indent=E2= =80=99 is set to =E2=80=99complete. Then >> in python-mode, TAB doesn=E2=80=99t cycle point column positions. For ex= ample, >> in the following code if you are at end of line 2 and then you press RET >> then TAB doesn=E2=80=99t move the point to left margin. Without =E2=80= =98eglot=E2=80=99 this >> works fine. >> >> #+begin_src python >> def greet(s): >> print(f"Hello {s}!") >> #+end_src > > Hello Pankaj, > > I cannot reproduce this. Here's what I ran: > > $ emacs --version | head -1 > GNU Emacs 26.3 > $ emacs -Q -f package-initialize -L ~/path/to/eglot/eglot -l eglot \ > ~/path/to/a/python/file.py -f eglot Just driving by, hopefully this is helpful; it looks like company may be the missing ingredient. If I follow these steps but add: `-L ~/path/to/company -l company`, run both M-x company-mode and M-x eglot with `tab-always-indent' set to 'complete I'm able to reproduce the issue described by Pankaj. If I skip loading Eglot but only use company the issue doesn't surface. Cheers, Doug From debbugs-submit-bounces@debbugs.gnu.org Sun May 23 17:17:38 2021 Received: (at 48609) by debbugs.gnu.org; 23 May 2021 21:17:38 +0000 Received: from localhost ([127.0.0.1]:41863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkvTe-0007xn-It for submit@debbugs.gnu.org; Sun, 23 May 2021 17:17:38 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:46683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkvTc-0007xY-Jf for 48609@debbugs.gnu.org; Sun, 23 May 2021 17:17:37 -0400 Received: by mail-wr1-f41.google.com with SMTP id y14so24370743wrm.13 for <48609@debbugs.gnu.org>; Sun, 23 May 2021 14:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=TxiAwwbipZbJP5+JQE8B+JuFvXZ99vIup7rxHVaOLk4=; b=RwZmRrYcCZspBKNH9EOZxDzdOBb6QXVA/PKdpwJeREHMSV+2Ji96S2Z94YpytqfzB4 UIbQ/P0ZMjCB3gONHoLnOpBnKI8JDBAY2Lr+XQMAzT7wPTkJKZgIx9IBYvdZAoMbvyzF PKCBfBEsi1OMA90k5IK3A0TMIKS+YZUHo5zlZqCD0yF2ScEEVRwQ4lqN2Oz35NnJT9Vj KYOJolY1dUvi6wju7AhWri+pSW6vJJCoGaHGf7pgc7DQjzHD6BKn0+jF9C8PjjtW/zfV Bb1fVpa9NAqvAFidOxQWMn1LHyFbyOmCYcv7dtb+51QxbHRj8G7Vj24RiCK5VhmznOP3 gyCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=TxiAwwbipZbJP5+JQE8B+JuFvXZ99vIup7rxHVaOLk4=; b=JaGCxy/gfKMTMqhjA32mEugNnwAWEOqsx5Ibwpo0TowvlWQ3v9H9qysH/0uNZa8t+i aYBEmcrc9hd/cJjG2U4in6W2KS+d+hdc4nNA1xQsqu26UWqjlz/0RAl4eIXZqxz4yx5v T3l6cVUBe4FV28S0YVqkXlEHNHy0TGNgCQtRT3tyibSS3e+MzAy27lkhWytYnbw6mCHf HpEIMExizRSLckgjpKKwi9Su84AifaoHkGmUjf76xWRFdMdUKeS2N5PDwwQ9OrIyFmTH p+Ujs3XxsrI6Gy9DETYa7Vcvwiq8VhhPSWEA3J3ciDBUIOxsmiSfcYfIX+o9j92HB+77 Dc8w== X-Gm-Message-State: AOAM5322BztkzB2+rvFK+haIlIbofYGLa1abCR//em2uacVp46b4+VeW gmApF4wF1xW73vdh6MZh/5wxWfC80Co= X-Google-Smtp-Source: ABdhPJzsHFZT7sFOqyM/SYGFGSXZxE73IerQp0v5q8f799GQe5nqBJy/YGx19VPxaxYQQ1sAQ2bMvw== X-Received: by 2002:a05:6000:144d:: with SMTP id v13mr19066512wrx.73.1621804650413; Sun, 23 May 2021 14:17:30 -0700 (PDT) Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id v12sm9665375wru.73.2021.05.23.14.17.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 14:17:29 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Doug Davis Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> Date: Sun, 23 May 2021 22:17:28 +0100 In-Reply-To: (Doug Davis's message of "Sun, 23 May 2021 17:02:47 -0400") Message-ID: <87k0npb15j.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Doug Davis writes: > Hi Jo=C3=A3o & Pankaj, > > Jo=C3=A3o T=C3=A1vora writes: > >> Pankaj Jangid writes: >> >>> If =E2=80=98eglot=E2=80=99 is running and =E2=80=98tab-always-indent=E2= =80=99 is set to =E2=80=99complete. Then >>> in python-mode, TAB doesn=E2=80=99t cycle point column positions. For e= xample, >>> in the following code if you are at end of line 2 and then you press RET >>> then TAB doesn=E2=80=99t move the point to left margin. Without =E2=80= =98eglot=E2=80=99 this >>> works fine. >>> >>> #+begin_src python >>> def greet(s): >>> print(f"Hello {s}!") >>> #+end_src >> >> Hello Pankaj, >> >> I cannot reproduce this. Here's what I ran: >> >> $ emacs --version | head -1 >> GNU Emacs 26.3 >> $ emacs -Q -f package-initialize -L ~/path/to/eglot/eglot -l eglot \ >> ~/path/to/a/python/file.py -f eglot > > Just driving by, hopefully this is helpful; it looks like company may be > the missing ingredient. No, it wasn't, but indeed, there was a missing ingredient. I had forgotten to set tab-always-indent to 'complete. With this recipe, I can reproduce the bug: $ emacs -Q -f package-initialize -L ~/path/to/eglot/eglot -l eglot \ ~/path/to/a/python/file.py \ --eval '(setq tab-always-indent (quote complete))' -f eglot Don't know what's up, though. Going to have a better look. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sun May 23 17:39:03 2021 Received: (at 48609) by debbugs.gnu.org; 23 May 2021 21:39:03 +0000 Received: from localhost ([127.0.0.1]:41880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkvoN-0008U1-Fv for submit@debbugs.gnu.org; Sun, 23 May 2021 17:39:03 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:34612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkvoK-0008TU-Lu for 48609@debbugs.gnu.org; Sun, 23 May 2021 17:39:02 -0400 Received: by mail-wr1-f53.google.com with SMTP id r12so26482103wrp.1 for <48609@debbugs.gnu.org>; Sun, 23 May 2021 14:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=IRWJww5vzrObVdtMg2IgSQF1RgCI/FIXp2EXP9Yj6m0=; b=kMORdxmf1DCdn/rfyJZF9vhmS3+BwwIcMepFnRw27DMazB5d4spu/R9kbO3YxZiwBR jAo16JKPt9zbTRxKsZJQMOviS8GQxpUka1NcxbxBrRRAKfacuVPXtPD8FOSjJmke9XJ8 bZVGflUQ66Sdqo+XIAvYV3VC/v/lYwQO3pBCX3Ts+rT5c6NhnIeafzQwqxFpE33/4TlM /STMwR+YFIvTih/2AViyQ+LZSJhPD64LANXSocFD0RtD7A2i9aE/h6zV/PqY6svhnXER WV2z3RboI/Khc/ElIyginpObIOSejPa5yltSgmy0053YFbrFCExt/62JjbjHAj2pYV10 a2Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=IRWJww5vzrObVdtMg2IgSQF1RgCI/FIXp2EXP9Yj6m0=; b=OLH5B5pA+PLYvpz2fwmypbiXQeq8mI1rmQTBZoOFiqWrGKaMjEZ1SitC5Wjm2fVa3r dKnUtLcLBMzg6eLwa3cBqLtAU3EqGfBFEL/6lHY8evPLYNvjb9KL2b8mJB7/4S1XyOba u+06BJvPC3bHCNLT8j8Hi7pRl06VBmyhNFwuCIxH1PcRrd2+goZ0ciVQaybmYbq96Moo jyV4Nu1XTUSMyS2uGAbBhGyIBuA6F6whEmYHkt/Xk2j7NzO+FLpn8i3phFdbh9zx3G2U n5lmn8FdwyoPuIZyMe+D4EaaLn8NV5dyyeRkQacWzqlE5UOx1e7TfidD7XhPPDcVLOgt gngw== X-Gm-Message-State: AOAM531IQz5Vizi2v4bBuGcenCs9/H7sA4a6cbKjT4opNLtsoXYi0sJG /aIXmdbCBbcb9v96O/ujxqYaY7VfisQ= X-Google-Smtp-Source: ABdhPJyaFv8Q51U38YX911tVGWX20vG1c3UT92WMRRpgOYnKs361lW/hIrEpF01loKxdmQC4FAaNhg== X-Received: by 2002:a5d:410e:: with SMTP id l14mr19263333wrp.230.1621805934451; Sun, 23 May 2021 14:38:54 -0700 (PDT) Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id f7sm11016119wrg.34.2021.05.23.14.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 14:38:54 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Doug Davis , pankaj@codeisgreat.org Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> <87k0npb15j.fsf@gmail.com> Date: Sun, 23 May 2021 22:38:52 +0100 In-Reply-To: <87k0npb15j.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sun, 23 May 2021 22:17:28 +0100") Message-ID: <87fsydb05v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Jo=C3=A3o T=C3=A1vora writes: > Doug Davis writes: > >> Hi Jo=C3=A3o & Pankaj, >> >> Jo=C3=A3o T=C3=A1vora writes: >> >>> Pankaj Jangid writes: >>> >>>> If =E2=80=98eglot=E2=80=99 is running and =E2=80=98tab-always-indent= =E2=80=99 is set to =E2=80=99complete. Then >>>> in python-mode, TAB doesn=E2=80=99t cycle point column positions. For = example, >>>> in the following code if you are at end of line 2 and then you press R= ET >>>> then TAB doesn=E2=80=99t move the point to left margin. Without =E2=80= =98eglot=E2=80=99 this >>>> works fine. >>>> >>>> #+begin_src python >>>> def greet(s): >>>> print(f"Hello {s}!") >>>> #+end_src >>> >>> Hello Pankaj, >>> >>> I cannot reproduce this. Here's what I ran: >>> >>> $ emacs --version | head -1 >>> GNU Emacs 26.3 >>> $ emacs -Q -f package-initialize -L ~/path/to/eglot/eglot -l eglot \ >>> ~/path/to/a/python/file.py -f eglot >> >> Just driving by, hopefully this is helpful; it looks like company may be >> the missing ingredient. > > No, it wasn't, but indeed, there was a missing ingredient. I had > forgotten to set tab-always-indent to 'complete. > > With this recipe, I can reproduce the bug: > > $ emacs -Q -f package-initialize -L ~/path/to/eglot/eglot -l eglot \ > ~/path/to/a/python/file.py \ > --eval '(setq tab-always-indent (quote complete))' -f eglot > > Don't know what's up, though. Going to have a better look. I see what's up. When Eglot is turned on, having tab-always-indent set to 'complete means that the first TAB press after pressing RET will actually try to complete things. When Eglot is active, the completion system can find a large number of completions available for that empty line. Since you have selected tab-always-indent to be 'complete, Eglot will request and present those completions in the *Completions* buffer. The only way to cancel that operation is by C-g or clicking somewhere else. This in turn makes it so that the "last" command issued isn't indent-for-tab-command anymore, and so there aren't two indent-for-tab-command commands in a row. And that is the criteria consulted by python.el's indentation function to decide to cycle the indentation. So I'm not sure what needs to be fixed here, if anything, or how you would like this to behave. Jo=C3=A3o. From debbugs-submit-bounces@debbugs.gnu.org Mon May 24 04:18:06 2021 Received: (at 48609) by debbugs.gnu.org; 24 May 2021 08:18:06 +0000 Received: from localhost ([127.0.0.1]:42328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ll5mo-000193-EW for submit@debbugs.gnu.org; Mon, 24 May 2021 04:18:06 -0400 Received: from mail-io1-f54.google.com ([209.85.166.54]:37752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ll5mm-00018V-QD for 48609@debbugs.gnu.org; Mon, 24 May 2021 04:18:05 -0400 Received: by mail-io1-f54.google.com with SMTP id k132so13383645iof.4 for <48609@debbugs.gnu.org>; Mon, 24 May 2021 01:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=jAQs5FRxG8+yRsB0NBTfcN5odvbb38rr6XxfmyVovbA=; b=BiYwTLncgkGsnvLeMrvyPOOv6Jro5mBw0TtjfvUW5jwdJKvT7r7z7qVMuRSaY9+HWS lzIpEfNpfnyjjCzTnXaprpPAHm3gQtzB88esndYCrvEcCjPy8OxtX0TPeKbmBeWoWfRU LnC6YjemH3osiN3i/8qLlMhkPLs2X8mA0eGaKoesjj3w1FkLUH4RmV3CAnMgd3ZcvXSU 9FipxatwWV/U8BNiHf4zjLpzUQbY7PIJYQwGIJMNLwf2n+1HPWP+vYDg1NgRHLqBquJ+ BmXXbd7ICtFWcO1Y3VEA6mJLZAW68RzO/xL6+VufyDa4LI6dJKlORN/zft135IqDcBGt +QVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=jAQs5FRxG8+yRsB0NBTfcN5odvbb38rr6XxfmyVovbA=; b=H+wjPGlN7PXpE+0lBBeHSHaw5fa+ov0W6VrgKkaBCAocFFm6dy0zWOiDOVI/Dg1s1D kQN2uQSvwZqZJl4hkhzSyxmT2NpDp6NhYVHzlqTz6qOTL7z/qTZ36vV3EhZMar4o/rbu ogd7VIWsBQxvCZ7UowqyQGNusbXppE6MXPanrJtYgqJGRPv6fPgOM+J7Ne8TZg7PVE0W yZPhJ3A7Sz/54BqhxSnA+acLYgw77O3VhEIFHduq+8Gx3gGeWnaVXr7FzEQn6gdL62Rw siIDuwk1+VV/a1HCghGJvAgB9z6hIFXsX/t6TTnLozpl24o1XxqYmTBE/59ITo32ZgXK XwYQ== X-Gm-Message-State: AOAM531O5p8wB44sJPZeOQpmBnUuFzsjrfsDV6JQc/BpGSzmfmhFAhWA z77AbRN/L2sbLJVFEL1IncOk6XXok1oejA== X-Google-Smtp-Source: ABdhPJz8s7A/CAx5lfIXrqYzgVnF+yNFb1z6+QhAypcIkJJ0Bwg952LCbYYhUs7zb2REPAyew8h8SQ== X-Received: by 2002:a5d:8b85:: with SMTP id p5mr13033383iol.43.1621844279034; Mon, 24 May 2021 01:17:59 -0700 (PDT) Received: from muffinmac ([91.206.110.246]) by smtp.gmail.com with ESMTPSA id w6sm11062082ilg.13.2021.05.24.01.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 01:17:58 -0700 (PDT) From: Andrii Kolomoiets To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> <87k0npb15j.fsf@gmail.com> <87fsydb05v.fsf@gmail.com> Date: Mon, 24 May 2021 11:17:54 +0300 In-Reply-To: <87fsydb05v.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sun, 23 May 2021 22:38:52 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org, Doug Davis , pankaj@codeisgreat.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > So I'm not sure what needs to be fixed here, if anything, or how you > would like this to behave. IMO works as described in the `tab-always-indent` docstring: If =E2=80=98complete=E2=80=99, TAB first tries to indent the current line, = and if the line was already indented, then try to complete the thing at point. One can reproduce this without Eglot: 1. emacs -Q 2. C-x C-f test.py 3. M-: (setq tab-always-indent 'complete) 4. C-c C-p After step 4 the `python-completion-at-point` function starts producing completions and each TAB key will lead to "No match" message. Pankaj, take a look at the `tab-first-completion` variable. -- Andrii From debbugs-submit-bounces@debbugs.gnu.org Tue May 25 02:41:24 2021 Received: (at 48609) by debbugs.gnu.org; 25 May 2021 06:41:24 +0000 Received: from localhost ([127.0.0.1]:44515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llQkl-0008Su-Uh for submit@debbugs.gnu.org; Tue, 25 May 2021 02:41:24 -0400 Received: from mail-pj1-f47.google.com ([209.85.216.47]:37565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llQkf-0008SZ-D8 for 48609@debbugs.gnu.org; Tue, 25 May 2021 02:41:22 -0400 Received: by mail-pj1-f47.google.com with SMTP id gb21-20020a17090b0615b029015d1a863a91so12657323pjb.2 for <48609@debbugs.gnu.org>; Mon, 24 May 2021 23:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=F8YeQf2Er9459TprSmp8umtB6VPRmSA3oUCSXGeEX4I=; b=WE2FEWPNu1ERVtSs+HdCaTXUGxhnP6fJDD9nyFLZkV8/+NeqlN0DOnrwsZV6nwY5Ds avBcpY83cEIofnLHWu6nnpeKIiJufvcmrd8fA5urvYDmzQFkrMcj9H9fm1Ezblx+AUVD n7seALQVvDXp1f0UpQaJDS+LGjAiO1dMrjGvaf6i+Xaqlc5FxBqScufLSMCGtpJ33iEE TpNPVZMTf4lwS+r4LR/fbTRiaJY8+cINOnEgRocLKLmRQdLEyLIFY2vPyF0JX/t1Sl4g ICmrELCqz/4Yb3bjDiIyuNTsVeZNGpgx2uwwTGLKKmXgRO5xaiJA/+HfUbmC1Vasgl5r OtAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=F8YeQf2Er9459TprSmp8umtB6VPRmSA3oUCSXGeEX4I=; b=WzODKDDxURYH9y56B5Y+SskjIT7hWOl2pgDLhJYmfSn+9t7hxuQLsg5793Ypt62RCd CyzaNw4lyy1hRtVhc5IZJ4fyKkUl2bKkcP0igXn8iQ4XNOZiPvil7i5HuWNrVhAX4/DN Ddb/Ls52HScdw9HE168GwDvXyHuswsx9OhCDBu1f5o7+/IfX4rbteM0JXAWTpJTo6Gpj 7AuRLO2KXtcsuIYK7N9Hf7cBH+5BvfYFZXO8s6aSNhqSiJ0j7O0VSOderDu6FXwoIIso XH9obU4IoDgzhJcY5pGs5J7UfPqNrEqj49T+lSAnX1j2W1pBMpt3cEEPICzv7124kwwT qCXw== X-Gm-Message-State: AOAM530Weg/haJFWYoW5zcbGiUyT9cUSbJ7sVqvctJTg0zUPSY/aOSkl jlX0QIE5Rezj8tmd+BduJEYRGwGmTybJ7w== X-Google-Smtp-Source: ABdhPJzus5qQIHHaA9xENVHSOjqT5ZoghbyuOv9SqtenLyrvEUIW0RFKHWC6hltkErKPHQv0u58SgA== X-Received: by 2002:a17:90a:f98c:: with SMTP id cq12mr3186024pjb.235.1621924871160; Mon, 24 May 2021 23:41:11 -0700 (PDT) Received: from mb2.local ([2405:201:5c06:70a7:cd84:943d:bc0:144c]) by smtp.gmail.com with ESMTPSA id x21sm12873107pfr.124.2021.05.24.23.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 23:41:10 -0700 (PDT) From: Pankaj Jangid To: Andrii Kolomoiets Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> <87k0npb15j.fsf@gmail.com> <87fsydb05v.fsf@gmail.com> Date: Tue, 25 May 2021 12:11:06 +0530 In-Reply-To: (Andrii Kolomoiets's message of "Mon, 24 May 2021 11:17:54 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org, Doug Davis , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Andrii Kolomoiets writes: > IMO works as described in the `tab-always-indent` docstring: > > If =E2=80=98complete=E2=80=99, TAB first tries to indent the current line= , and if the line > was already indented, then try to complete the thing at point. Thanks for sharing this. I think I should have been more specific. The bug is more related to python-mode then to =E2=80=98tab-always-indent=E2=80= =99. In =E2=80=98python=E2=80=99 buffers, TABs cycle position of point. But as d= escribed in my original report and reproduced by Jo=C3=A3o, bringing Eglot, inhibits th= is behavior.=20 From debbugs-submit-bounces@debbugs.gnu.org Tue May 25 02:47:17 2021 Received: (at 48609) by debbugs.gnu.org; 25 May 2021 06:47:17 +0000 Received: from localhost ([127.0.0.1]:44527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llQqT-0000AS-EK for submit@debbugs.gnu.org; Tue, 25 May 2021 02:47:17 -0400 Received: from mail-pj1-f43.google.com ([209.85.216.43]:46824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llQqS-0000AG-5b for 48609@debbugs.gnu.org; Tue, 25 May 2021 02:47:16 -0400 Received: by mail-pj1-f43.google.com with SMTP id pi6-20020a17090b1e46b029015cec51d7cdso12569132pjb.5 for <48609@debbugs.gnu.org>; Mon, 24 May 2021 23:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=/FlZvIAa8i71rYPrNoTPyMOIeKXTEIrEtvd3cn0mPIY=; b=IavhVZV6bV9Y2L1djw1TcYNzgJTpszuzxee62Fsp1/FbfK7QOtJnoPXd4ytVf1ttnm NiebUWwFHjHreoQDSRbI9zDgTs86c14x/B/CnSccbbdoRaquVY//fyB4joYizH3F0ZiU dAxYR81kpuPAmuH4AGW/XRhHUjv9sUziQWofPzez0cSyk9UjT05buuS5fDXh74R3VBDp SfDAq5PTatx59ye23UPecuV760lZMY2KmeKb5pqu2ZL9KC7vss9YA/ZyY66PWE+AgQNx 3KDe4jyMey72FPyhM58KQNeA/gSc/kv32Ynw8jYMKTBXglGqtJEcWj27hY2ufx63UU8Q yuRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=/FlZvIAa8i71rYPrNoTPyMOIeKXTEIrEtvd3cn0mPIY=; b=B8nHfbqlpP1OnAMpGLQSogoAacvIEk0cPyJRpAvNsFxVu3ww3DzjaqQUcmQRg5n1// 6VTxjwJeQ8WPd+IB+7RM9D5Rub4GAfTzZaMi16RhY0gP8LVT3WQ6l0QYD013TaidUjt5 /wRazNpwan4gOKroD2HazeMpaa4Xs6JKZGxq9wo6vWzyu/h+B0xZEusGzIeCB9eO+lVD A+SRDIStx/hQ6Saynr9wBWgP9JzqGVziMpmk39DXozw2NYCNAKql/Wie6izhoRShs/N2 /M69xalFXtcD7tySar9Sip/xMp4m6sM9QZj3bccEuNl23FcUaT3NJswqGWGtWlj/MbgA 2sRw== X-Gm-Message-State: AOAM533Az11Uabmuodme2v7qdaoVfLYviESFSTmOoWmRO+qxyhw6E25p UH89Bbi8lmBFSqpL8ICa4h9duzfNB2dPXw== X-Google-Smtp-Source: ABdhPJzLpo/u8cY9K/PGW3EgcrhS/UWlZh/5PiwXKTPUUGVUWWdYW/eBBbJw+dpE6Ojjrbq1BGYFXA== X-Received: by 2002:a17:90a:4298:: with SMTP id p24mr3240984pjg.144.1621925230110; Mon, 24 May 2021 23:47:10 -0700 (PDT) Received: from mb2.local ([2405:201:5c06:70a7:cd84:943d:bc0:144c]) by smtp.gmail.com with ESMTPSA id v3sm5055598pfb.203.2021.05.24.23.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 23:47:09 -0700 (PDT) From: Pankaj Jangid To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> <87k0npb15j.fsf@gmail.com> <87fsydb05v.fsf@gmail.com> Date: Tue, 25 May 2021 12:17:06 +0530 In-Reply-To: <87fsydb05v.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Sun, 23 May 2021 22:38:52 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org, Doug Davis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jo=C3=A3o T=C3=A1vora writes: > When Eglot is active, the completion system can find a large number of > completions available for that empty line. Since you have selected > tab-always-indent to be 'complete, Eglot will request and present those > completions in the *Completions* buffer. > > The only way to cancel that operation is by C-g or clicking somewhere > else. This in turn makes it so that the "last" command issued isn't > indent-for-tab-command anymore, and so there aren't two > indent-for-tab-command commands in a row. And that is the criteria > consulted by python.el's indentation function to decide to cycle the > indentation. > > So I'm not sure what needs to be fixed here, if anything, or how you > would like this to behave. I think that the best place should be python.el then. A variable =E2=80=98python-completion-on-empty-line=E2=80=99 or some better name. I do= n=E2=80=99t know if such a variable already exist or not. Need to check. Since the point-position is cycled by python.el, that is the place where it should be configured. From debbugs-submit-bounces@debbugs.gnu.org Tue May 25 05:33:03 2021 Received: (at 48609) by debbugs.gnu.org; 25 May 2021 09:33:03 +0000 Received: from localhost ([127.0.0.1]:44734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llTQt-000495-Bu for submit@debbugs.gnu.org; Tue, 25 May 2021 05:33:03 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:36425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llTQq-00048C-NP for 48609@debbugs.gnu.org; Tue, 25 May 2021 05:33:02 -0400 Received: by mail-wr1-f51.google.com with SMTP id n4so5501547wrw.3 for <48609@debbugs.gnu.org>; Tue, 25 May 2021 02:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=KmYBX8DSuOOSScjGs8pDgb3X1EitrcKiYXotzPpMd9c=; b=sUZmBYssciAuBsqnxykdQb3J2YWzOgHpBPhYDBEL6b2+dXH7ftzZpocg5jQ22YUhBP BmLdvru31XxQD30+qLnM3z+5q5TEH+x29MUlNMRx5fWKe3pfdU9ADsocnt0OHHIRiU+3 hUYEcPbLZxH0lnOq2CJaThR6EetKMyqYNdZRG7APsX5lP/LXTE/dB0TybhJO31vg9bbF 8QkgIvr4AQU4GhzBL6Q/V7fuxq6/8ebgJE8CB4yDWPtIHWbnZf3GGBRbzSD7c4fOuAL7 yRyhDGhPEzLMemefhlRsLHFRpmsDFmNIt671dkUWU37jU2rA13i1k7s+4erHJcjK5FZK /bNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=KmYBX8DSuOOSScjGs8pDgb3X1EitrcKiYXotzPpMd9c=; b=r2Jh7KFx9Bze7WCFqAVjqJRE4lBvRUcUa5Ss0QY8aYlKF+5VmXdjSjjw+umu6hU6jH /Q09D2dPKYdagdwibWKoBt9LQmEmFySlsUFUAGTDyMCo8855PmgMutZIT4dNOkOU1wHe 4uqefzl5vY3Bg83+CAt31GgHCEt/TIHIKnfbJPlX5fe9cne+K+MthpvBRVbaqq4ZoAZG 1FPI5FAl9iyr6hG4VRqxzyes1kbceOCAGGRjiQa2RssFucORHJ8611OpsSJrGe+NDAxW DMmhswiK0kWNUak2XuqBB4c3jr2p9ye6kChLGYo4lEUov0hHZpTy9GlWpHRO1TZ9+Hsj Sx9w== X-Gm-Message-State: AOAM531J0KCbl1f2dhobiq2CQzxfd01msn27GsWZ2lARh7Cjgt2n8h9I Zfg9hxnYAnNQ1qfkkPc6NeJBvA72828= X-Google-Smtp-Source: ABdhPJwLYjGjHDePGKdxVyIeSb4NwSz6+vzN0GpTnShvaxBZj7sBCgMX89P0me7TUuHSL1QI1c7xHg== X-Received: by 2002:a5d:6ac9:: with SMTP id u9mr24679065wrw.290.1621935174609; Tue, 25 May 2021 02:32:54 -0700 (PDT) Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id f12sm15370768wre.88.2021.05.25.02.32.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 02:32:53 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Pankaj Jangid Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> <87k0npb15j.fsf@gmail.com> <87fsydb05v.fsf@gmail.com> Date: Tue, 25 May 2021 10:32:52 +0100 In-Reply-To: (Pankaj Jangid's message of "Tue, 25 May 2021 12:11:06 +0530") Message-ID: <8735ubgnuj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org, Doug Davis , Andrii Kolomoiets X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Pankaj Jangid writes: > Andrii Kolomoiets writes: > >> IMO works as described in the `tab-always-indent` docstring: >> >> If =E2=80=98complete=E2=80=99, TAB first tries to indent the current lin= e, and if the line >> was already indented, then try to complete the thing at point. > > Thanks for sharing this. I think I should have been more specific. The > bug is more related to python-mode then to =E2=80=98tab-always-indent=E2= =80=99. > > In =E2=80=98python=E2=80=99 buffers, TABs cycle position of point. But as= described in > my original report and reproduced by Jo=C3=A3o, bringing Eglot, inhibits = this > behavior. Yes, but what actually happened is that the one of those tabs was waiting for completions to come in, so the system was indeed behaving as intended. It's just that when you don't have Eglot, you also don't have completions. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Tue May 25 05:36:34 2021 Received: (at 48609) by debbugs.gnu.org; 25 May 2021 09:36:34 +0000 Received: from localhost ([127.0.0.1]:44738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llTUH-0004EG-Ra for submit@debbugs.gnu.org; Tue, 25 May 2021 05:36:34 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]:42865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llTUE-0004E1-QO for 48609@debbugs.gnu.org; Tue, 25 May 2021 05:36:31 -0400 Received: by mail-wm1-f53.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so12417481wmf.1 for <48609@debbugs.gnu.org>; Tue, 25 May 2021 02:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=yD1tAcSwcm72nymSL0X4u1MTKpV/tJ0raWZhdsjeFVE=; b=otnvD/wRmd3Ydqos1cG0ZdNeAN0e0ZBqNCkDMtqIkPl45tvC0+h9MVXvCZ5HbrFMvE tukoVnJ5GMliYjOxbcxz7ufzUmUofdtE7tEljqSIJDcnV3dU9yaOHbIyvBrilMNhycNp slW/1VGnoT7DXb5Iajxv2hVC76R2VLu8ikTCzr8p+TM0Bs2fzGrZqaV811sn94u5hxd4 GgnznB/Z4/cK40fAenWGXfNipGe3OtNIDQVqq+l267jVngiqYAV5KXnnBorH8Wx8TUe0 ZGTfMjHm7/6klf4pQBRneqlhfa01/lI2++jdKYRUuypRHo/mo0IrvUQtmsQXm1bXzuWY 8N/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=yD1tAcSwcm72nymSL0X4u1MTKpV/tJ0raWZhdsjeFVE=; b=DWWIM9OugDY9JQ2RI/nwDdsqgs7QngzttYDZqD9546949b27Wqh+ABZvNKkjV3jpLo mvu5Hml9HjFwKUSpbPOWv3eVPf8XD+iQPeIS5qpvpkVHAW9ZP668q86Yv/UQaJi7sFBm dmHIdK07EH6KxXhv2KOS6EXXMz/UaWRzn5TqSWNaaZC3HBYjgO8h8869x8YDgHSSxx50 gqHQqO1X5UAz93rA75wDuWgSSku90XIb3sDRHU+GwsWg4/f/PL5papuqhdnpV56oiClx Na03LeQLZ43Dt8RaH2Hr6Bz5y/Wu2Lmi2JVrrP/iZjbwrFeuqd7uodI9Tb+LLEFheTXB yiOQ== X-Gm-Message-State: AOAM533g870zla/RLxHoK8nyGdBsmmIUse/8kV9H/jefKoMJrgQcxWTb QQYVEUUDl010V4IjnRYg7jEPlCTDCNg= X-Google-Smtp-Source: ABdhPJziaZpuB0Wn98qsy3g6RFJHVLteQoMRJTRvPv5aKq2gfRUoSViC3Yu/Pz7Zq4oFUoeiobcTjA== X-Received: by 2002:a1c:5419:: with SMTP id i25mr2994355wmb.51.1621935384723; Tue, 25 May 2021 02:36:24 -0700 (PDT) Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id v12sm15739669wrv.76.2021.05.25.02.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 02:36:24 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Pankaj Jangid Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> <87k0npb15j.fsf@gmail.com> <87fsydb05v.fsf@gmail.com> Date: Tue, 25 May 2021 10:36:23 +0100 In-Reply-To: (Pankaj Jangid's message of "Tue, 25 May 2021 12:17:06 +0530") Message-ID: <87y2c3f948.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org, Doug Davis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Pankaj Jangid writes: > Jo=C3=A3o T=C3=A1vora writes: > >> When Eglot is active, the completion system can find a large number of >> completions available for that empty line. Since you have selected >> tab-always-indent to be 'complete, Eglot will request and present those >> completions in the *Completions* buffer. >> >> The only way to cancel that operation is by C-g or clicking somewhere >> else. This in turn makes it so that the "last" command issued isn't >> indent-for-tab-command anymore, and so there aren't two >> indent-for-tab-command commands in a row. And that is the criteria >> consulted by python.el's indentation function to decide to cycle the >> indentation. >> >> So I'm not sure what needs to be fixed here, if anything, or how you >> would like this to behave. > > I think that the best place should be python.el then. A variable > =E2=80=98python-completion-on-empty-line=E2=80=99 or some better name. I = don=E2=80=99t know if > such a variable already exist or not. Need to check. Yes, I agree, python.el. I wonder if instead of that variale the cycling logic could be changed to account for this case where there may be completions at point (Eglot is only one possible provider of such completions, btw.) Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Tue May 25 10:08:53 2021 Received: (at 48609) by debbugs.gnu.org; 25 May 2021 14:08:53 +0000 Received: from localhost ([127.0.0.1]:46474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llXjp-0007tg-Ka for submit@debbugs.gnu.org; Tue, 25 May 2021 10:08:53 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:42532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llXjj-0007tL-IR for 48609@debbugs.gnu.org; Tue, 25 May 2021 10:08:52 -0400 Received: by mail-pj1-f42.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so13240093pjv.1 for <48609@debbugs.gnu.org>; Tue, 25 May 2021 07:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=v5FRQphWXv52dv1SsuoEeW11tGNEJRiy6Z9OrOmenEs=; b=tD2+a0K7U4CDPumPgqsYnM+ZNcyiIPw10mC9jf/4neQMHepg8viqxL3bQvbNZTZFVL +Qiou7vFK2VXlcDTfVNu72qkTVMzGLLpDVtLJjd6HddKCkbpBsKWaB7FgAAaV1VsVyny nuV3jBqHc5+qnVRES7EF0X6EPgnbpLHhgVb9kX9jfwm8uvRzkkunN8T3BgWNN0cJYFNK IgVmG5oP4hOW8W7eMstvnL/04jijIja6rgLBA0yJ9gDPsA5S7djBrMAXSWFEEsmgeL7C 14hIqlY18PJfJ2slLRoMGk8f3sPyGcRWDnulgw0GZVJtkOuYzhRav7roaetv+1+ap+eR mFvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=v5FRQphWXv52dv1SsuoEeW11tGNEJRiy6Z9OrOmenEs=; b=n+VmsKWpc+pvYRvOb4Bo6ZAHYu4r/4JtZwxk/eJRBbURPmlfju9QxufQkEYWbRmDpf W9X+6cyTcbX6TSC6RPyPUFKZkrcSToFE7WN050NM9m2EdA4GdlQxUhrO22CryYAWIpjJ 5Jhn4fFKbz2A8aumLJJko7qALCVq9H3be9pOZ5qo+aWxI+xnJ1RHm9LuOxDcmeonD+CA pX7HeMBgeTBhaCusuUpP4hjLLfNcjP9NMStmZIMeCQWKD389Z4dyy2auqk3RXGWtkjQ0 NKwjsObxOF4DyiKHuE+DxpMmFEFR7f09LBxuLCxeLa98TmBE+J1rWD9EkbxbqE2XhcvE PQ5Q== X-Gm-Message-State: AOAM532TGKlhckP2Ek5ohXuM+TAKx7ComsF780yJlfY+muBKI5y1YMTx ZTEWcDz9MRpBGtnWKg5cqWXBk7SOQkTcbA== X-Google-Smtp-Source: ABdhPJyOkNfZOoej4IeafpRDVwSitjRAHM3RWhQEuX6ooj81i7kd2aCRXI9nb5wWsHjoRT5tfcb6Ag== X-Received: by 2002:a17:903:2082:b029:f6:9d83:3ede with SMTP id d2-20020a1709032082b02900f69d833edemr25072147plc.40.1621951721549; Tue, 25 May 2021 07:08:41 -0700 (PDT) Received: from mb2.local ([2405:201:5c06:70a7:cd84:943d:bc0:144c]) by smtp.gmail.com with ESMTPSA id f7sm13802705pfq.8.2021.05.25.07.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 07:08:40 -0700 (PDT) From: Pankaj Jangid To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#48609: Eglot and tab-always-indent conflict in python-mode References: <87v979b2tp.fsf@gmail.com> <87k0npb15j.fsf@gmail.com> <87fsydb05v.fsf@gmail.com> <87y2c3f948.fsf@gmail.com> X-Debbugs-CC: =?utf-8?Q?Fabi=C3=A1n?= E. Gallina Date: Tue, 25 May 2021 19:38:37 +0530 In-Reply-To: <87y2c3f948.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Tue, 25 May 2021 10:36:23 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 48609 Cc: 48609@debbugs.gnu.org, Doug Davis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Jo=C3=A3o T=C3=A1vora writes: >>> When Eglot is active, the completion system can find a large number of >>> completions available for that empty line. Since you have selected >>> tab-always-indent to be 'complete, Eglot will request and present those >>> completions in the *Completions* buffer. >>> >>> The only way to cancel that operation is by C-g or clicking somewhere >>> else. This in turn makes it so that the "last" command issued isn't >>> indent-for-tab-command anymore, and so there aren't two >>> indent-for-tab-command commands in a row. And that is the criteria >>> consulted by python.el's indentation function to decide to cycle the >>> indentation. >>> >>> So I'm not sure what needs to be fixed here, if anything, or how you >>> would like this to behave. >> >> I think that the best place should be python.el then. A variable >> =E2=80=98python-completion-on-empty-line=E2=80=99 or some better name. I= don=E2=80=99t know if >> such a variable already exist or not. Need to check. > > Yes, I agree, python.el. I wonder if instead of that variale the > cycling logic could be changed to account for this case where there may > be completions at point (Eglot is only one possible provider of such > completions, btw.) CC=E2=80=99ing Fabi=C3=A1n.