From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrey Listopadov Newsgroups: gmane.emacs.bugs Subject: bug#66159: 30.0.50; lua-ts-mode semantic indentation problems Date: Sun, 24 Sep 2023 19:38:38 +0300 Message-ID: <878r8vwm9v.fsf@gmail.com> References: <87fs36vvxl.fsf@gmail.com> <87v8bz3905.fsf@pub.pink> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3843"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.11; emacs 30.0.50 Cc: 66159@debbugs.gnu.org To: john muhl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 24 18:49:09 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qkSI9-0000s5-CM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Sep 2023 18:49:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkSHs-00019n-BA; Sun, 24 Sep 2023 12:48:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkSHq-00019f-Gf for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 12:48:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qkSHp-0002yL-Sj for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 12:48:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkSI1-00074o-Nu for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 12:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrey Listopadov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2023 16:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66159 X-GNU-PR-Package: emacs Original-Received: via spool by 66159-submit@debbugs.gnu.org id=B66159.169557410227015 (code B ref 66159); Sun, 24 Sep 2023 16:49:01 +0000 Original-Received: (at 66159) by debbugs.gnu.org; 24 Sep 2023 16:48:22 +0000 Original-Received: from localhost ([127.0.0.1]:43533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkSHO-00071e-8O for submit@debbugs.gnu.org; Sun, 24 Sep 2023 12:48:22 -0400 Original-Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:57496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkSHJ-00070X-Aq for 66159@debbugs.gnu.org; Sun, 24 Sep 2023 12:48:21 -0400 Original-Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-5033918c09eso7722537e87.2 for <66159@debbugs.gnu.org>; Sun, 24 Sep 2023 09:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695574079; x=1696178879; darn=debbugs.gnu.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=fpuQg05mg+Pkn3IThlk3ixR1jySv/uco8UII9j3g97w=; b=FoDX/NBd1iNGRHpT/JO+QjVwLjAMJvsAlsboD15lbMw3jULUH9iDbpgT5ygsTRyXFd Hm5z9WJDxyuVl4UtuU05GjDYgQlMBZ6HxiHb97d1AY7xvNXXYEzhDZ6arcIjN/sjH/Yt Zi7bZ0LS58P9mzclmxn0/IvuNKc/+N8hBmcuxlXpgbDOLPk3+217UkhOmDHLcR0gm+6w LWM8MKeFKDvAe+lMDeFGUPnrvI4hDRowY0iADDOX7xuZm79Cwwun8+6mJ3/CzV6p3/4n mvPjERP0SyAAZD15p3WI2QfsNG4mrmOXtawh4+cNq7S30FnEXhV/WU2cMn+iKaqOLjy9 3X7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695574079; x=1696178879; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fpuQg05mg+Pkn3IThlk3ixR1jySv/uco8UII9j3g97w=; b=i7/pS+3ihVBaBSV8WYXiHk56qxGWMMZESBJn7aRaKYj/mYnA8EgzySE5MbJPxZYEDC f2mOltGKNrH0OKybTWVZW8ue12DyX5v0iQD8zhxMChWKXu+zX6pYsPt35LPIbpjTgdD3 hKh/wP5ZogUgWlYqoIvysC7vGY6NPodAtP39GdoMmTkBO5ZSRLTnZWCKJ/dTSR2qAn8p meldg6NRlldetBG9juW/krfQC9cLLhprl4e+yrUCtAmF498PTHDIgibWxS6Z0vbVEUZa oTcGQxHJoiOp62c4NUDrqWGW3lMKxDEoANfcHCDcPUfQnw2YIb5LxqyEFKERd0MAjaE0 py6A== X-Gm-Message-State: AOJu0Yx0BsC3j3PIlWPVT9YuMZf6yprrasNbBWty1BXdp9KOq4bHd1Uo G7BZRvsIptsnmvxwoL3VuedAZhgmLK8= X-Google-Smtp-Source: AGHT+IE+5Zm1BuvE3M1tHbUv0L/RYzxfMTFLKoWFr6fCR8EzVESpnus0bydh0GvVWkfHG+QCb9+7SA== X-Received: by 2002:a19:5502:0:b0:4fe:5741:9eb9 with SMTP id n2-20020a195502000000b004fe57419eb9mr3317358lfe.49.1695574079032; Sun, 24 Sep 2023 09:47:59 -0700 (PDT) Original-Received: from toolbox.smtp.gmail.com (broadband-90-154-71-4.ip.moscow.rt.ru. [90.154.71.4]) by smtp.gmail.com with ESMTPSA id v26-20020aa7d65a000000b00530e32d6143sm4503481edr.43.2023.09.24.09.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 09:47:58 -0700 (PDT) In-reply-to: <87v8bz3905.fsf@pub.pink> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271264 Archived-At: Thanks! The patch seems to work as I would expect for most cases. > I don't see any reason not to support that style but I'm not sure how to > do it. A patch would be welcome but I'll try to figure it out sometime. A far as I understand it, in the `lua-mode' the overall line indentation is computed via subtracting indentation for every `end' in that line, e.g. `end end end' subtracts `lua-indent-level three times from current indent level. > Sure. It's a new mode so nothing is really set in stone. Let me know if > you have other suggestions. I also noticed that `lua-ts-inferior-lua` for some reason starts itself in a new frame instead of just a new window. I haven't seen this behavior with other inferior-*-modes, and the `lua-start-process' function from `lua-mode' doesn't spawn a new frame either. Looking at the code, it seems that it was a deliberate choice, as I see the use of `display-buffer-pop-up-frame' in the `display-buffer' ACTION arg. -- Andrey Listopadov