From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gPJXK4x09WWX5wAAe85BDQ:P1 (envelope-from ) for ; Sat, 16 Mar 2024 11:29:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id gPJXK4x09WWX5wAAe85BDQ (envelope-from ) for ; Sat, 16 Mar 2024 11:29:32 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kxPmWRnq; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710584972; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=DKI/97F9EzDUBi8NwokZE3evF1vbLkTGaRo97m9uPys=; b=F0H/vYpkEMYwlC4fQ283C/c/FnykKHP/d8R8mpV8jCGur+KIVXA7/pl0WCg1IuLgTRH5EU m3m9J08nFf6HC4GHYZa/29aoAyXc01sUaMzROtNSBKOYUghn86G9RBDskY2lMe1DxqlGO0 4D9Gxl0QIVPmP7caAs4NTsUiBbDO1G9lL3rkcU23DSHz7+ovzFBbKjbpvI//DFeCaoUXWD pIbyARDXYTBckPI9ZUGWh+n8PV/nrhF6StEbPIxx64b5Dlo3k7FhJbOAWQDAt29HDaDYs9 2rIsxBcM+0eQrEpvymQdvLnwwl+YZgH3Z5XGtcFZVqAv6Cj8wSjrLN9b1Ljmag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kxPmWRnq; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710584972; a=rsa-sha256; cv=none; b=CKztxHuH5kJU8Rczn3/ZnkQXR2wFAJAm9tbdgekchtJ2imfop8vLQQYi4d33CeNpEkmLMD zanMFEsuJm1xdFjvAxB8eiXUudVKsAPH3l79sgEatlICysgRQlhsDM6iVeX+ox3qw84jtA 2B7P3Pv7iVntPKxv1AbYOq1sEGbT4DnmqLa39MQdzUYOJx4bv/9ayjBexOsjjwng1sJZ0Y qIAltiWe14O74W41NSdNgToJ7k0M/WNLuFvmyueK2RWUVAEI7eQJ9JgErUv1aGNNcoHeNB yE5kHt5PtxrncpgSWXs4cHdRLDy4b1m6WiMH6KoHlNM17Tj1yOP9aPDyneLsNg== 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 6D39513AA3 for ; Sat, 16 Mar 2024 11:29:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlRHK-0000jd-1a; Sat, 16 Mar 2024 06:28:38 -0400 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 1rlRHG-0000iA-VO for emacs-orgmode@gnu.org; Sat, 16 Mar 2024 06:28:34 -0400 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rlRHC-0000uz-Ks for emacs-orgmode@gnu.org; Sat, 16 Mar 2024 06:28:33 -0400 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-2218b571776so1707578fac.0 for ; Sat, 16 Mar 2024 03:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710584909; x=1711189709; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DKI/97F9EzDUBi8NwokZE3evF1vbLkTGaRo97m9uPys=; b=kxPmWRnqaX96mqVIfd9e3c6op5KMJaJ2AZ5IYQS6iOWWj3ttVhCCgq7H8l28eaEXP1 O42dil7y0hHvBRgcy/dPTaQGHyqzKg4UegkDjJ5fX28/tnjHoqJXBRdW1IbN8DeyyeHc kP44q3nK8mdUIjEI87vcbq2Fxkz3acmXPyViaLmVK64hY82fI1Ox37WEHseZLQsmsR62 Q7iju0JLwbQcDa01cQWjPQzGe05M4XQyw0Z833zlsHOquO3wv0/OlmbLtW6TbGS7r5YC zpldKpeQDvvqM6tL8xj6auoYZ7WzyJScV/Zh9zao5z1717YM1hiXSAorCxN65asMtsdB vCTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710584909; x=1711189709; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DKI/97F9EzDUBi8NwokZE3evF1vbLkTGaRo97m9uPys=; b=oMpQe9HAo3tn7/FznZ33z07uKmu6Yu7vNdjkl94FCyHdhXL/ZBRf4CL4P469SWsxVJ 9mq4L29i5E6oagFcum00u+lT3iOHkzyoJeB4arpOWwEnH6sJP37BBOmHbIOsyrk6LzhT P0bgSuWiUxpn0DKfNCFyR2EvzVYHi/Zik3ySvHqTY1qlqmn+jPfvDBDO8r95iWtMH83X cHzB1rvmvmHtN75q/+/paWV0MVcNRIY9iGcbqMNmLadhwPFC4YvPOALxosG2yIdWnd8E hg03YKvrOqelsGdpsgv+aFVVVjy1hapEFed/snJlIbUMoFRLvAWDuD/uNSUOGwNMEELq ERgw== X-Gm-Message-State: AOJu0YxWghTUvJm58/5q1hWUrWAAC7AR6G+WFcvKkLZ5L9hXJFx4XKAD dzDos8aNdzbKPZMj8nilIKeAuzNtLOSnaD7Rx5nyI7u++NDCsNzbaMRaNlH+PFfpvBAzC2KVopQ LT6MIm94t78Kn5LN8bXrT5sMtnsFuWxAKqJy+0A== X-Google-Smtp-Source: AGHT+IEoZJRXaHo7SwL8TS10ZMNLdK7xFnpb678Pwu5tncpZ7pP7qmKaT2FCsavBQK3syhPsMKGfkKaZGI9LolRwvU0= X-Received: by 2002:a05:6870:1717:b0:21f:b7d2:b8a1 with SMTP id h23-20020a056870171700b0021fb7d2b8a1mr8030312oae.21.1710584909102; Sat, 16 Mar 2024 03:28:29 -0700 (PDT) MIME-Version: 1.0 References: <871q8ajyxq.fsf@localhost> In-Reply-To: <871q8ajyxq.fsf@localhost> From: Rudi C Date: Sat, 16 Mar 2024 13:57:52 +0330 Message-ID: Subject: Re: Forcing tab-width to be 8 makes using Python source blocks very difficult To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000dd894b0613c49536" Received-SPF: pass client-ip=2001:4860:4864:20::33; envelope-from=rudiwillalwaysloveyou@gmail.com; helo=mail-oa1-x33.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.58 X-Spam-Score: -9.58 X-Migadu-Queue-Id: 6D39513AA3 X-Migadu-Scanner: mx13.migadu.com X-TUID: cUpLfscbtFQ5 --000000000000dd894b0613c49536 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable `evil-org->` doesn't matter per se. It runs `evil-shift-right`, which indents the selected region by the `evil-shift-width` amount. `evil-shift-width` is set based on `tab-width`. I solved this specific problem by overriding `evil-shift-width` using a timer in an org-mode hook. The delay introduced by the timer was necessary, as something kept overriding my settings. Perhaps the magic machinery that sets `tab-width` in the source blocks can also set `evil-shift-width`. The best-case scenario would be to have a list of variables that need to be set from their major-mode buffer in the source blocks. > May you please provide a detailed example where 8 spaces causes issues? My lists are still indenting with 2 spaces, so I am not actually seeing 8 spaces. I have no idea why that is, but I very much like the 2-space indentation. ``` - a - b ``` I see 4 spaces in numerical lists, which again, I have no idea about: ``` 1. hi 2. hi 3. hi ``` So I don't see the effects of `tab-width` anywhere except in `evil-shift-width`, as far as I can see currently. On Sat, Mar 16, 2024 at 1:11=E2=80=AFPM Ihor Radchenko wrote: > Rudi C writes: > > > Recently, a breaking change has been introduced in Org mode that sets t= he > > default tab-width to 8 spaces ( > > https://list.orgmode.org/orgmode/8734y5d2gs.fsf@localhost/). This chang= e > > has made using Python source blocks in Org mode challenging, as > operations > > like `evil-org->` rely on `tab-width`, and Python code conventions > > typically use 4 spaces for indentation. > > May you please provide more details on what exactly "evil-org->" refers > to and what specific problems you encountered? > > > Moreover, using 8 spaces for indentation is generally unsuitable for > small > > laptop screens, where screen real estate is of utmost importance. > > May you please provide a detailed example where 8 spaces causes issues? > In source blocks specifically, we make sure that tab width visually > looks as in the corresponding source code buffer. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > --000000000000dd894b0613c49536 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
`evil-org->` doesn't matter per se. It runs `e= vil-shift-right`, which indents the selected region by the `evil-shift-widt= h` amount. `evil-shift-width` is set based on `tab-width`. I solved this sp= ecific problem by overriding `evil-shift-width` using a timer in an org-mod= e hook. The delay introduced by the timer was necessary, as something kept = overriding my settings. Perhaps the magic machinery that sets `tab-width` i= n the source blocks can also set `evil-shift-width`. The best-case scenario= would be to have a list of variables that need to be set from their major-= mode buffer in the source blocks.

> May you please provide a deta= iled example where 8 spaces causes issues?

My lists are still indent= ing with 2 spaces, so I am not actually seeing 8 spaces. I have no idea why= that is, but I very much like the 2-space indentation.

```
- a=C2=A0 - b
```

I see 4 spaces in numerical lists, which again, = I have no idea about:

```
1. hi
=C2=A0 =C2=A02. hi
=C2=A0 = =C2=A0 =C2=A0 3. hi
```

So I don't see = the effects of `tab-width` anywhere except in `evil-shift-width`, as far as= I can see currently.

On Sat, Mar 16, 2024 at 1:11=E2=80=AFPM Ihor Radchenko= <yantar92@posteo.net> wro= te:
Rudi C <<= a href=3D"mailto:rudiwillalwaysloveyou@gmail.com" target=3D"_blank">rudiwil= lalwaysloveyou@gmail.com> writes:

> Recently, a breaking change has been introduced in Org mode that sets = the
> default tab-width to 8 spaces (
> https://list.orgmode.org/orgmode/8734= y5d2gs.fsf@localhost/). This change
> has made using Python source blocks in Org mode challenging, as operat= ions
> like `evil-org->` rely on `tab-width`, and Python code conventions<= br> > typically use 4 spaces for indentation.

May you please provide more details on what exactly "evil-org->&quo= t; refers
to and what specific problems you encountered?

> Moreover, using 8 spaces for indentation is generally unsuitable for s= mall
> laptop screens, where screen real estate is of utmost importance.

May you please provide a detailed example where 8 spaces causes issues?
In source blocks specifically, we make sure that tab width visually
looks as in the corresponding source code buffer.

--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,=
or support my work at <https://liberapay.com/yantar92>
--000000000000dd894b0613c49536--