From: Timothy <email@example.com>
To: "Frédéric Santos" <firstname.lastname@example.org>
Subject: Re: Bug: Behavior of org-adapt-indentation [9.4.6 (9.4.6-10-gee652a-elpa @ /home/fsantos/.emacs.d/elpa/org-20210705/)]
Date: Tue, 31 Aug 2021 23:59:33 +0800 [thread overview]
Message-ID: <email@example.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2022 bytes --]
I tried to reproduce with emacs -Q but I had no luck (see the image attached).
Could you give emacs -Q a go and let us know how it goes?
Frédéric Santos <firstname.lastname@example.org> writes:
> This might not be *really* a bug, but since a recent update of Org, I
> noticed an unwanted indentation of code blocks when the variable
> org-adapt-indentation is set to ’headline-data. It can be reproduced
> with this very minimal org config:
> (use-package org
> (require ’org-tempo)
> (setq org-adapt-indentation ’headline-data))
> In an org buffer, create a headline, and then:
> 1. Type some text which does *not* follow an empty line an press TAB:
> nothing happens (which is the expected behavior).
> 2. Type some text which does follow an empty line an hit TAB: this text
> gets indented according to the current headline level (the help page
> looks unclear to me: it might also be the expected behavior,
> although I don’t really understand the rationale for it).
> Point 2. has a side effect: when you still use the old template
> expansion mechanism for code blocks (the one provided by org-tempo.el,
> e.g. type <s and then hit TAB to expand a template), those code blocks
> now get indented according to the headline level (because you press TAB,
> I guess). I think it’s not the expected behavior, since those code
> blocks that follow an empty line will have a different indentation than
> the text before and after them.
> Here is an animated gif to better illustrate what I mean:
> Is there a workaround to avoid this indentation of code blocks?
> All the best,
> Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4)
> of 2021-03-26
> Package: Org mode version 9.4.6 (9.4.6-10-gee652a-elpa @ /home/fsantos/.emacs.d/elpa/org-20210705/)
All the best,
[-- Attachment #2: org-indent-Q.png --]
[-- Type: image/png, Size: 17233 bytes --]
prev parent reply other threads:[~2021-08-31 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 6:35 Bug: Behavior of org-adapt-indentation [9.4.6 (9.4.6-10-gee652a-elpa @ /home/fsantos/.emacs.d/elpa/org-20210705/)] Frédéric Santos
2021-08-31 15:59 ` Timothy [this message]
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).