From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KJR/AIkTG1/sbgAA0tVLHw (envelope-from ) for ; Fri, 24 Jul 2020 16:59:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0FucN4gTG19lCgAAbx9fmQ (envelope-from ) for ; Fri, 24 Jul 2020 16:59:52 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 455809403C5 for ; Fri, 24 Jul 2020 16:59:52 +0000 (UTC) Received: from localhost ([::1]:35552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jz131-0006ir-80 for larch@yhetil.org; Fri, 24 Jul 2020 12:59:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jz12Y-0006gs-Jm for emacs-orgmode@gnu.org; Fri, 24 Jul 2020 12:59:22 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:43823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jz12X-00058b-0z for emacs-orgmode@gnu.org; Fri, 24 Jul 2020 12:59:22 -0400 Received: by mail-wr1-x42e.google.com with SMTP id a15so8919026wrh.10 for ; Fri, 24 Jul 2020 09:59:20 -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=NHvLb8hi+vVUzzzEKTvmQmQGBzXoME1KuqLxwp8BRDs=; b=koMf91n+588W+gYx+j88nBltd44u77fDWmkZP2cy40Rx6E/po6OvkPaq6mshiY6aXt lL54iUTdMiwanhRZ8A8pMi5Tf3Qw5OSKO9OqFTaIod5k0O9EWXUxuygT3fa8Tx4NhWHC QLZS6uXZmo1DwQr26iCb/nsuRzAcr7YFO97gOXfS4O2zg1+T3lUNdrzAf6mdz9RknBI0 8d7towXITXLiDao8DdDkbu0kmOhCeglJSAqTEFSwRHx83dprxA+lxgQ9sUlaSQdvM3Nb 9E0jgQo79eq6XQgJEeLxps1H5KPrM6mfQzdsdZiUkIz8nVavZwlIpefGp45p5BID953e gnpQ== 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=NHvLb8hi+vVUzzzEKTvmQmQGBzXoME1KuqLxwp8BRDs=; b=Mux9ThrxwxkQzeT2d+A4BWI9iEJCyBIrZyHEwdjF9Umg6WvyC4bmr2RK2JftgbPSAN zf7gHUDkOcphV1ocSDS/nRAUtDkNF+BwUAL7hIRxPxe83POQ/IUw9q16fb0gOvpbdByy FUDk+SSNQwdLKaA8K9RUksaV8NRxpucgnED/4Sm/cH1rHJLICL9yIiiTTrByPgafERvf 5aAQjfnx2kH77TwikAYkQRC3Ss14AvtG2BUDh0YJp9wDW2XFPhibYEF4pFJDZkoTOIK/ pYIFfKNgvmrB8vFevP0fUDpp/2wY2B5VGnPhmJPSOXVXSALHpqRP6bY+o9TmMCNbTfVA dxhw== X-Gm-Message-State: AOAM532VRmb8zifIOcwzmymW8+hCzWf8tZlEGBYRDROFbWult7MFpzsj 1MuLG7J4T5fKCzieKWEED8tVjsHX X-Google-Smtp-Source: ABdhPJwQp7lHPVxSykO2zqDU1cCn9hrvXoDn42l5vy/rz/Njhch0eDVrikYXolpRwhnSPT9hXtYjiw== X-Received: by 2002:a5d:5486:: with SMTP id h6mr9016168wrv.136.1595609958685; Fri, 24 Jul 2020 09:59:18 -0700 (PDT) Received: from hirondell (183.114.141.77.rev.sfr.net. [77.141.114.183]) by smtp.gmail.com with ESMTPSA id 31sm1984627wrp.87.2020.07.24.09.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 09:59:17 -0700 (PDT) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Jarmo Hurri Subject: Re: Binding RET to org-return-and-maybe-indent References: <878sfbycip.fsf@iki.fi> <87sgdjhad8.fsf@gmail.com> <871rl2y2wa.fsf@iki.fi> <878sfaxoly.fsf@gmail.com> <87pn8l5yja.fsf@iki.fi> Date: Fri, 24 Jul 2020 18:59:15 +0200 In-Reply-To: <87pn8l5yja.fsf@iki.fi> (Jarmo Hurri's message of "Fri, 24 Jul 2020 07:26:17 +0300") Message-ID: <87eep0svbw.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::42e; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x42e.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: -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, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=koMf91n+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: il99Vw1d0TjK Jarmo Hurri writes: > * Demo of the effect of disabling elint > 1. Save this org into file =3Dorg-elint-disable.org=3D > 2. Save the following elisp into =3Dminimal-org.el=3D, replacing the > location of org mode with your path: > > #+begin_src elisp > (add-to-list 'load-path (expand-file-name "~/src/org-mode/lisp")) > (add-to-list 'load-path (expand-file-name "~/src/org-mode/contrib/= lisp" t)) > (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1))) > #+end_src > > 3. Toggle the last line > > #+begin_src elisp > (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1))) > #+end_src > > in =3Dminimal-org.el=3D to see the following effect: > 1. Open this file with > > #+begin_src sh > emacs -Q -l minimal-org.el org-elint-disable.org > #+end_src > > 2. Type C-c ' for (org-edit-special) in the source code block below, > and follow the instructions on the comment line. > > #+begin_src java :exports none :classname Demo > class Demo > { > // 1st press RET at the end of this line, then type TAB and } > #+end_src OK, here are my observations: * Emacs 28, Org 9.3 - RET: indented - TAB: nothing - }: de-indents * Emacs 28, Org master, electric-indent-mode on - RET: indented - TAB: nothing - }: de-indents * Emacs 28, Org master, electric-indent-mode off - RET: not indented - TAB: indents - }: does not indent I think this is just because disabling electric-indent-mode is the wrong thing to do: it should be electric-indent-local-mode. The former changes the default value of electric-indent-mode for *all buffers*, whereas the intent is to only disable it in Org buffers; we don't want to affect Org Src buffers=E2=80=A6 If I replace (electric-indent-mode -1) with (electric-indent-local-mode -1) in org-mode-hook, I get the behaviour we have with "Org 9.3" and "Org master, electric-indent-mode on". Can you tell me whether electric-indent-local-mode works better for you? If it does, I'll followup with a patch to ORG-NEWS.