From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#35286: 26.2; indent-sexp broken Date: Mon, 15 Apr 2019 20:54:22 -0400 Message-ID: <87ftqizs5d.fsf@gmail.com> References: <87sguizurg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="78233"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: 35286@debbugs.gnu.org To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 16 02:55:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGCNX-000K6h-0k for geb-bug-gnu-emacs@m.gmane.org; Tue, 16 Apr 2019 02:55:15 +0200 Original-Received: from localhost ([127.0.0.1]:57461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGCNQ-0001J5-LW for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Apr 2019 20:55:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGCNL-0001Iw-3V for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2019 20:55:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hGCNJ-0000D8-Up for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2019 20:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50606) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hGCNJ-0000CL-NC for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2019 20:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hGCNJ-0006CU-L9 for bug-gnu-emacs@gnu.org; Mon, 15 Apr 2019 20:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Apr 2019 00:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35286 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35286-submit@debbugs.gnu.org id=B35286.155537607323800 (code B ref 35286); Tue, 16 Apr 2019 00:55:01 +0000 Original-Received: (at 35286) by debbugs.gnu.org; 16 Apr 2019 00:54:33 +0000 Original-Received: from localhost ([127.0.0.1]:35917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hGCMq-0006Bn-MW for submit@debbugs.gnu.org; Mon, 15 Apr 2019 20:54:32 -0400 Original-Received: from mail-qt1-f193.google.com ([209.85.160.193]:40793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hGCMp-0006Bb-8J for 35286@debbugs.gnu.org; Mon, 15 Apr 2019 20:54:31 -0400 Original-Received: by mail-qt1-f193.google.com with SMTP id x12so21461552qts.7 for <35286@debbugs.gnu.org>; Mon, 15 Apr 2019 17:54:31 -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; bh=C8hmwaZITLrEojRDWctp+//4gxFd5FDpbUtW7OYwDmI=; b=Jxq0rxYJ19mrDbaKtLVf9nSA1wjDjg3Wg0bDhOiXa8OiUQLcVj+ux7pCpunJAuoU+H 7Nh/s/Y7ZAZhqsXle5uUppq2bNu0F/ZOlLO9ifb0EdmP/g7ZvjQBgALo8hbc/yMpDLj8 fnQMpzrVS2kPF5LJNYgAKH/bEX1z6cRdgeJdfExQyIMKLzqaVOQrzB2kT7Y3l1+nDDJu ErThOU6NM0KkHXJbKufsU5DFD9XdHfrG4JkWTnJPZBy9zV/LLg7nbGpfdHgfSPElggKz 0UKIZa//TGfUOaIt3LVrY4KN2e6IszhGjCg302wRXSwXFCoTCz839t2FqgSsI6covDxI MhPA== 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; bh=C8hmwaZITLrEojRDWctp+//4gxFd5FDpbUtW7OYwDmI=; b=Q5VoK6k02vxP/OWxEEsFD6PpbJPum81bAy3PfypfjKhdpWwQDn7sMiQ815JnjxRWMN sko8FIIXkqMPciUG35kXL1g7QmDURCX8+eTx/Z4uIFhSlGoledVsc40NH5SF/JjFiJ0p 4+lH2HWNkVeExsGp61cqAYi1iz9WcCzHH/6Z50lmF8nN60WV9r9mQSLs0NycMYtIxYWF 7UTSjB7kVsOWeAm9bTKw1ma3UzUqHpgK1DXkb5aYFyccQMvmtiJ8N4dk4DoIKZxm/BvR 5EBBmrSsf19E/Luw1l2DbDoVJfQv2lxC9g9JhVBj7HbvNMLcBzczSiTPHqPKuxOj+IfI SG3g== X-Gm-Message-State: APjAAAV7xV/RqHevw/wzrchrpin0hU6TK/eGSaG4krikiQHU4PwHezUQ iQeq4wHCYx7ukkgwUWBHPjX4b9Q6 X-Google-Smtp-Source: APXvYqzVBhhldC79+OgJt9mscGFzYO0Iq8Gd5NLRnqMRjLt97vE2gXfJA5NvwNN4N++g/SP4cqJz/g== X-Received: by 2002:ac8:3092:: with SMTP id v18mr63054192qta.41.1555376065457; Mon, 15 Apr 2019 17:54:25 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id l6sm29743101qke.65.2019.04.15.17.54.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Apr 2019 17:54:24 -0700 (PDT) In-Reply-To: (Leo Liu's message of "Tue, 16 Apr 2019 08:35:48 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:157690 Archived-At: Leo Liu writes: > On 2019-04-15 19:57 -0400, Noam Postavsky wrote: >> I put that code there because Emacs 25 and earlier also indents more >> than one sexps after point in some cases. > > I didn't know that. Are those cases obscure? The minimal example would be (with point before "foo", the "xx)" part gets indented too): foo (bar xx) I'm not sure if anyone relies on that (I broke it in 26.1 and nobody reported it). The main motivating example is #s(foo bar) which is due to forward-sexp not handling #s correctly for Emacs Lisp (it's treated as a separate sexp rather than as a whole record expression). >> The regression is that the Emacs 26 code gets confused by comments at >> the end of line. Here's a patch for emacs-26 to fix this: > > Not just comments though it can be anything. For example, put the > following in prolog-mode. Move point to the first `{' char and then M-x > indent-sexp. Hmm, I'm a bit confused here. I thought indent-sexp is only good for Lisp-based languages. Do lisp-indent-calc-next/calculate-lisp-indent give usable results for prolog or ruby??