From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: newline-and-indent vs. electric-indent-mode Date: Sun, 24 Jan 2021 23:45:57 +0200 Message-ID: <67c10291-6b6d-ccdc-90d0-e3e9a3967898@yandex.ru> References: <87wnw5yt58.fsf@hajtower> <01d07f6d-cc4c-2f54-4bae-a611bba7be93@yandex.ru> <66b7932d-4cee-9628-fae0-168ee6ebc041@yandex.ru> <02e60113-66f4-0217-d8c4-abe8cb3bdb6d@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="blaine.gmane.org:116.202.254.214"; logging-data="39799"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: =?UTF-8?Q?Harald_J=c3=b6rg?= , Emacs Developer List To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 24 22:47:38 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 1l3nEQ-000AH7-46 for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jan 2021 22:47:38 +0100 Original-Received: from localhost ([::1]:40346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3nEO-0003VK-PY for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Jan 2021 16:47:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3nCv-0002NR-B5 for emacs-devel@gnu.org; Sun, 24 Jan 2021 16:46:07 -0500 Original-Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:38722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3nCs-000650-DS for emacs-devel@gnu.org; Sun, 24 Jan 2021 16:46:04 -0500 Original-Received: by mail-ej1-x633.google.com with SMTP id 6so15268032ejz.5 for ; Sun, 24 Jan 2021 13:46:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=X3V5SpPflu4Nrz3XNOalhKMobTZl2J2eo5AT5NgIMcw=; b=IlVy7JRqePrZC/YGqUwC1JvcjaHE6+IrotjPecGAlbNFZJRA9tqxxsnc+1qWxGeKIq 4SlPr4aJuwF7roufdvi8PLJSLSCyFisT3AqnpYdJfShILJ4ADT72zw7xuhXB/h2K1WdZ G1zr0AD71Lf8i3HDD2Lr2d8fLBQKu5yTofq+NJQ/2B8ON7eKSV1qOFBnQZD2XXl+dkYF r7XhWNXjffGRb4VPp1SoE45SJx/KgOPNLrj91sQx4ioCiL3UxLJtV+1QipfF0XXpwiDN Nsbhwe6wnP6dOIenzw4JYiphfhFfEGg8iJ2hkPyQwtUSFnqgXhoCIQr+a5W8J8NtObOB FuCA== 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:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=X3V5SpPflu4Nrz3XNOalhKMobTZl2J2eo5AT5NgIMcw=; b=CFVKZaRAX2UQqedm4PDXrh7DoZfeTQlNinVYop2jmAzFjuXTpC+dgBIT+Rc2RN5qGr 3JkRPn8nikzQr7kagNwD1HSREa+W1d9y1Shca/CKK7yJZTjqp71Ul6P89KnpZdOMe2Fn sJRT0czP6sONdnWzT0piCx4qKzEFvJfQ9uKVLtNIKaZYCEI3qIwCFHa5KWdFSjW09Tms 3ug9qs7pHfKqpFJpNi5EkYAScqyiTI/UCLlEYK0orBQbO+504XKiek8YEVT+4uqUTxSC LAzk6UbvHJcFugp+V08x9Lu2tVAP64PdgSVo3HJpXy1KjgEy0Hkc9LJMctI2lEYjuxg4 xJtQ== X-Gm-Message-State: AOAM532ZPP/lditO4BSOdWjT6aVg/xwg5pNMTadI+rZ6zz4lXY/iNVSt JJpVxCIHdL6FJoVAIuBuM8wD0rxi8qk= X-Google-Smtp-Source: ABdhPJy4LL+qMszV76q7oKZ/37RJx7OYOkwCUJX8syDncKkGBe1wxyfddLElDOIrSOKXic4rhN1sAQ== X-Received: by 2002:a17:906:36d4:: with SMTP id b20mr165384ejc.144.1611524760736; Sun, 24 Jan 2021 13:46:00 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id hd14sm4561924ejc.118.2021.01.24.13.45.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Jan 2021 13:45:59 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=raaahh@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:263359 Archived-At: On 24.01.2021 07:29, Stefan Monnier wrote: >> All right, filed as bug#46064. > > Thanks. > >>> I think `electric-indent-mode` is annoying in any case if the >>> indentation code disagrees with your style. >> True, but my present complaint is about it being annoying *twice* for the >> same line. And if it's being annoying while point is still on that line, >> it's marginally easier to fix. > > BTW, I just want to clarify that while I'm to be blamed for the current > behavior, I'm perfectly happy if someone wants to change it. > > My main goal was to consolidate all those major modes's ad-hoc > auto-indent (typically by binding RET to `newline-and-indent`) into > a global user config, and that's done. I've considered what default we could change, but if we wanted to set electric-indent-inhibit to t by default (after resolving bug#46064), most/all major modes should first get electric-indent-functions similar to #'ruby--electric-indent-p to compensate for it, and that's a non-trivial effort, not to mention the change in user habits. Though we probably could generate something based on SMIE grammar, in modes based on it.