From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id OGXqNucdqGVJRwEAqHPOHw:P1 (envelope-from ) for ; Wed, 17 Jan 2024 19:35:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id OGXqNucdqGVJRwEAqHPOHw (envelope-from ) for ; Wed, 17 Jan 2024 19:35:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=h0zIuVAI; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705516519; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8hiLHLiH/umQjWhCTmGKKvRZmfbnrtast8//hRj5d7Y=; b=ZUPHe/Lv6NosceUzu2uzWsgkEr7l2HyKDTLpOIwRjjqMVWprMyAtoYJPsBDvzc9Zm+65fo r4ASpZlut40JV/1v1YxZoFCPNveD0clzHuDDYDs9pM+wNJmY6R66UTsEeBGkJ/67zvM4Cf anerNXpheSZcKKP8NZJ9e3jOqbFKR7HuEpFiqaaTJW7wWRjM/YxRAjhwnV5kafkBkgpctR 6ucjg8xbtybzc9C+n47nxl1K2AdTSNjuj5853+x9Jltk+ffk7AfpGgOQbTgw77O8cQICF7 6QUeKmM+ZPOa/Ai4cdn4ldvMyuwjLxDhUEV2wbRT3oWgtMTr6MwtV9s4kPCVPw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=h0zIuVAI; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705516519; a=rsa-sha256; cv=none; b=tBSijnlUjz3OkbMF3RgZcIvWOcp2S2VCmtdyF+fzO3xr9Ial79+JdmLWEadpXi6byMP3pl Yf/wSQN1U5DYS7sRXzhJIlYgUz+xMGqpUEsD8wjbj8V3ZKgX/K2YeB3VxHspA1tyy/uwfc KhDTassNRTZ3HKJ3yeFICko1wuCwmt23YzWp52bbmk1hDmE1qFsVPNLxgeQgkSggtscF+K 1CK/rczgl8IMpOhIiYj6d88Alf8cj3qCXuxQHThnaKyqw6YKtcqSGIRT/vqwL9kpKiADGS Wxopb2g3u5ulNWXYUjOTjj7wa6yefM6ZhqMVmq1/Jsmx4mpSJ+ZEg6p19cZ5+A== 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 8115959A0A for ; Wed, 17 Jan 2024 19:35:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQAk8-0001HA-P4; Wed, 17 Jan 2024 13:34:28 -0500 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 1rQAk7-0001Gy-Qq for emacs-orgmode@gnu.org; Wed, 17 Jan 2024 13:34:27 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQAk5-0007nU-FV for emacs-orgmode@gnu.org; Wed, 17 Jan 2024 13:34:27 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id ED997240101 for ; Wed, 17 Jan 2024 19:34:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705516461; bh=QVZs7KDI/MyP6yg3MnU3mel8TgCh/lfHko+9ESWTStk=; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To: Subject:Message-ID:From; b=h0zIuVAI4e3qOpWp5MzJSqNUHql4kX+cGyjd2QnCXzo/9juONTvdtPvKfneARuSMI wyDYV9ut7NxLaaTygsiMePY6f3SfFsLxeXOn590I51jL2AdzxMyPA8yvayZ2JI/RKl Rk0IOkmrFontspeU7Cj8FJZsgOcrXDbgplO5yJ1nV+Yw1KxfleOxA/AWu520KYm380 klshGSRemorjaeSWYF+wYwopLD+lD48vtKzBuI949HtH5XoHKJnKxTURqQURZae/x+ PC2HkS1CQa2yOUZ9EYs1JlIfJ96bzNe1hgizxfsGb9GNuItsNBCtFDEAhQUI+TvXBk wTTFOxHWjMd7A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TFZKS3Df8z6tsf; Wed, 17 Jan 2024 19:34:20 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 17 Jan 2024 18:34:20 +0000 From: gerard.vermeulen@posteo.net To: Emacs orgmode , Ihor Radchenko Subject: [BUG] defaults make it hard to edit Elisp blocks in org buffers Message-ID: Received-SPF: pass client-ip=185.67.36.66; envelope-from=gerard.vermeulen@posteo.net; 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.10 X-Migadu-Queue-Id: 8115959A0A X-Spam-Score: -9.10 X-Migadu-Scanner: mx11.migadu.com X-TUID: ZwG5NQQvzgHE * Why I do (setopt org-src-preserve-indention t) Sometimes, I want to do small Elisp edits without calling org-edit-source-code. Below, I describe a long standing bug (several years) that is also present in main. I use smartparens, but it reproduces also in a clean environment (minimal init.el) using main. #+begin_src emacs-lisp :results silent (setopt org-edit-src-content-indentation 4 ;; to amplify the effect org-src-preserve-indentation nil) #+end_src Place point after the first open parenthesis below and type return. #+begin_src emacs-lisp (()) #+end_src This moves the code 4 spaces to the right. Place point after the first open parenthesis of the lowest line below and type return. #+begin_src emacs-lisp ( ( )) #+end_src This moves the code again 4 spaces to the right. It does not matter whether the the parentheses contain for instance a function definition. * Therefore, I work with those settings breaking the default. #+begin_src emacs-lisp :results silent (setopt org-edit-src-content-indentation 2 org-src-preserve-indentation t) #+end_src Place point after the first open parenthesis below and type return. #+begin_src emacs-lisp (()) #+end_src The parentheses remain left-shifted. Place point after the first open parenthis of the lowest line below and type return. #+begin_src emacs-lisp ( ()) #+end_src Again, the parentheses remain left-shifted. #+begin_src emacs-lisp ( ( )) #+end_src The parentheses remain left-shifted. I prefer this over the default. I have only seen it with Elisp blocks. Regards -- Gerard