Re: [BUG] Freeze with org-adapt-indentation set to headline-data

2022-11-08 Thread David Lukeš
Ihor Radchenko  wrote:

> Fixed on main.

Confirmed, thank you very much for the lightning fast fix!

David



Re: [BUG] Freeze with org-adapt-indentation set to headline-data

2022-11-08 Thread Ihor Radchenko
David Lukeš  writes:

>
> I've hit a freeze when setting org-adapt-indentation to headline-data.
> I've bisected it to commit 0a6a56, "org-adapt-indentation: Fix
> 'headline-data checks". I can reproduce it in Emacs 28.2 on macOS with
> the following minimal init file:
> 

Thanks for reporting!
Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=8a827437a5f3e5c4f45d00c0926c317f1209415b

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] Freeze with org-adapt-indentation set to headline-data

2022-11-08 Thread David Lukeš
Hi all,

I've hit a freeze when setting org-adapt-indentation to headline-data.
I've bisected it to commit 0a6a56, "org-adapt-indentation: Fix
'headline-data checks". I can reproduce it in Emacs 28.2 on macOS with
the following minimal init file:

(add-to-list 'load-path "~/repos/org-mode/lisp")
(require 'org-loaddefs)
(setq org-adapt-indentation 'headline-data)

The freeze is perhaps best explained visually, please see here:
https://trnka.korpus.cz/~lukes/files/headline-data.mp4

Commentary / reproduction steps:

1. Open an Org file.
2. Type a level 1 heading, e.g. * foo, then RET.
3. Type a level 2 heading, e.g. ** bar, then RET.
4. Type RET a few more times -- works fine.
5. Go back to the level 2 heading line (C-p), jump to its end (C-e), press RET.
6. Press RET a few more times. No additional lines get inserted, Emacs
freezes (a spinner gets displayed, see video), C-g has to be used to
interrupt this.

A few more observations:

- After step 5, if you type a few regular characters first (letters,
numbers) and only then RET, no freeze occurs.
- After step 5, you can also type just a series of spaces, and no
freeze occurs while typing those spaces, but as soon as you type a RET
(i.e., a RET after a line which consists only of spaces), the freeze
triggers.

Not sure if this reproduces on Linux, I'm traveling ATM, so I don't
currently have access to a Linux box unfortunately.

Let me know if I can provide any additional information!

Best,

David