doomemacs / doomemacs/core

+org--insert-item does not reveal the inserted heading

Open
#6,520 5 comments 2 reactions 0 assignees View on GitHub
is:bug needs-triage
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### What did you expect to happen?

When creating a new heading from an heading with hidden content I would expect the new heading to be visibile and directly accessible.

### What actually happened?

When calling the +org--insert-item function on an org heading that has its contents hidden the newly created heading will be created in the right place, but will remain hidden and cause some visibility isses that are solved only by cycling the full buffer through all the org visibility state.

In the follwing images I create some test heading, then hide their content and add a new heading using +org--insert-item on the fist heading. The result is the aformentioned visibility issue.

![screen2](https://user-images.githubusercontent.com/25611931/176381085-10aa8951-f634-4930-832e-97970b75d756.png)
s.
![screen1](https://user-images.githubusercontent.com/25611931/176381140-ff790b1c-5054-4cb1-a943-22ef1cfe799f.png)
![screen3](https://user-images.githubusercontent.com/25611931/176381188-abb9b9d1-85b5-4c97-abdc-15d15f670ace.png)

![screen4](https://user-images.githubusercontent.com/25611931/176381051-7c4d2a38-1dcc-4faf-b85c-be765884abae.png)

### Describe your attempts to resolve the issue

I temporarily fixed the issue by changing the +org--insert-item by commenting out the check for org-invisible-p.
```
;; (when (org-invisible-p)
(org-show-hidden-entry)
;; )

```
### Steps to reproduce

on vanilla doom paste this in an org mode buffer
```
* Test1
** Test2
```
then fold the first heading and call +org--insert-item on it

### System Information

https://pastebin.com/CxbwcHc4

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.