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 ms0.migadu.com with LMTPS id GKbpDKVP0mCregEAgWs5BA (envelope-from ) for ; Tue, 22 Jun 2021 23:01:25 +0200 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 yKq2CKVP0mBkMgAAbx9fmQ (envelope-from ) for ; Tue, 22 Jun 2021 21:01:25 +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 6D33227AA0 for ; Tue, 22 Jun 2021 23:01:24 +0200 (CEST) Received: from localhost ([::1]:38026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvnWL-0003cr-Lg for larch@yhetil.org; Tue, 22 Jun 2021 17:01:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvnVI-0003ch-7L for emacs-orgmode@gnu.org; Tue, 22 Jun 2021 17:00:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43669) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvnVF-0004Dj-Mo for emacs-orgmode@gnu.org; Tue, 22 Jun 2021 17:00:15 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 2AB282400E5 for ; Tue, 22 Jun 2021 23:00:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.eu; s=2017; t=1624395605; bh=0Mtt0GwCHleYVsL5Qy1OTmzFuiXDm/iT/r17kybUjxk=; h=Subject:To:Cc:From:Date:From; b=Ytuh0xiJuhLlw28i58g2+FgI/xSPOpeA+A5rpsbWVzAIikbX/JBtmq/IKEbnuFCIN eBBrI0CVHnYHOPYQQWHAVZPbcmTyyxtWQLcO8u92BYappIbxb0rBOAxQykMn6WX+Ro 9SSMXlI4TOJf/jlNe5euq3SakgyBlTRcmWhJ0yfb98YXrEtKBPApc4IzRyehGZU5Ms tgo5elFtWXYMao8YWb5Xe7WI0ihsfqMtjhj17N9QVDmsA22mZBKf3LoIQ9bhVi3J4k aQ6SxpJyX32SaUwTSTg5aQvPNwEKhHPSkEjDy4jPp5XjMiTjA08o8/erkq3WlZk++p D+Xi2y9GRCGuA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4G8f102r8nz6tmG; Tue, 22 Jun 2021 23:00:04 +0200 (CEST) Subject: Re: extra space at the end of lines in source To: Greg Minshall References: <2681710.1624389697@apollo2.minshall.org> From: =?UTF-8?Q?S=c3=a9bastien_Miquel?= Message-ID: <3a1162f9-1898-ceac-1aec-be17707c5982@posteo.eu> Date: Tue, 22 Jun 2021 21:00:03 +0000 MIME-Version: 1.0 In-Reply-To: <2681710.1624389697@apollo2.minshall.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: fr Received-SPF: pass client-ip=185.67.36.66; envelope-from=sebastien.miquel@posteo.eu; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Reply-To: sebastien.miquel@posteo.eu Cc: org-mode-email Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624395684; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=P5jzbm/Y0QPcsGEBsIkqk97c2wq4OFb+DWzqRazABTk=; b=s9XF/NW/XDKvMNCIsvDBJuVfb+YHTY9mOb0Vq967Xcmvh5InuZ0nP85bVIZTSornoa4Hlx ySEvrb+AOdY97ixviAulcDi805o/7NWUTgbwrVJJwYfbo1M/TueEL/0WyrmcBs6+LIEAiA MUmhytzofdJaAYsdmGzhKGMjJHlhkj3eE8zQckBP071y690ie2ey6uBx1vfxoG7YyYxpJi 0VItJ3u1Cvh6ztsBBoOgh4gm/1VZuriiC4XrJtVBipab8AVU5M5rRL8UkCUlOc//fqcXbj 8QVyvgp6hgLon/7t5gbnqySx2nwCpTT46e0xTp7zg2LsV6YPyab37r+zTR4mQQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624395684; a=rsa-sha256; cv=none; b=OUFB1zt6/KNninP5It4HqUzfdTHDHW7De9Pdii8YJ37nVGFuHq/Uwp/ByKL707MfS8kmoa syQrdM4DZhJkqeOd/zJBD9QdT4OyRzLd8UVuGYoldRFK5Scdb/n65A3zqGFnXaxFmyH0Vo mWy41R1cMe25VFkGucPY/7iFyjs3LPRnuG0eAJleQAos8mTrft7zz/vlqUuJnFyT6iwtkz OLeqZUBo0NN6lCi2J6rC/WbET8QCyOwLOVqzyI8XfhRff2t8cCqDdxaA8me61hiyCJO/1j FsIvqCFINkBXBfq/E6gA69coUUXkjWQrdtJEVnIjlOfjUnDH21No1W/KkpNvZA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=Ytuh0xiJ; dmarc=pass (policy=none) header.from=posteo.eu; 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-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=Ytuh0xiJ; dmarc=pass (policy=none) header.from=posteo.eu; 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-Migadu-Queue-Id: 6D33227AA0 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: Fzyd99fMDMf4 For the record, the original issue is that with `org-src-tab-acts-natively' set to t (which is the new default) you couldn't use tab to indent an empty line, and electric-indent-mode wouldn't work properly. Greg Minshall writes: > i don't know what > would be involved to keep the fix for the original problem (which i was > also seeing), without adding these extra spaces. but, i suspect it > would be worth it, if feasible. I think the only way would be to change `org-src--contents-for-write-back' to keep track of where the point was in the edit buffer, and clean up spaces in other lines. Doesn't seem difficult ; maybe you could replace the `buffer-string` call by two calls, to get the part before point and the one after, then work with that. > it's long-term emacs behavior to eliminate spaces > at the end of lines, at least in programming modes. As for the `org-src--content-indentation' spaces, they are quite peculiar. Note that they are removed when you call =C-c '= and when you tangle (they should, but I haven't tested it), so strictly speaking, they are removed in programming modes. What if your org block itself is indented, do you also expect blank lines to be entirely empty ? As for additional indentation in a blank line, it will indeed never get cleaned up by org, which isn't ideal. But then, spaces at the end of non blank lines don't get cleaned up either (I think) and never were. It's up to the user to remove them, in the appropriate language mode. Despite these arguments, I have no opinion on the matter. Regards, -- Sébastien Miquel