emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jack Kamm <jackkamm@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Recent folding issues
Date: Mon, 11 Jul 2022 23:17:06 -0700	[thread overview]
Message-ID: <871quqvorh.fsf@gmail.com> (raw)
In-Reply-To: <87ilo36su8.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 2344 bytes --]

Hi Ihor,

> May you provide the output of M-x org-version?

Org mode version 9.5.4 (release_9.5.4-623-gc66bdb @ /home/jack/dev/org-mode/lisp/)

I also updated org-mode to the most recent version (last commit 5
hours ago).

> I cannot reproduce. Please, update your Org to the latest version, try
> to reproduce, and provide the detailed steps required to obtain the
> confusing behaviour you are seeing.

I attach a couple files for a minimal reproducible example of both
issues.

Steps to reproduce:

0. Download the attached init.el and test.org. Edit the absolute path
   of "test.org" in the capture template in "init.el" to the location
   you downloaded it.

   Then do "emacs -q --load init.el test.org"

   test.org should look like this now:

> * Headline 1
> * 2021
> * 2022
> * Headline 4

1. Next, do "M-x org-capture". Then type "c". Then create the following note:

> **** Test entry 1

Then press C-c C-c. Buffer should look like this now:

> * Headline 1
> * 2021
> * 2022
> 
> ** 2022-07 July
> 
> *** 2022-07-11 Monday
> 
> **** Test entry 1
> 
> * Headline 4

2. Shift-TAB until all headlines are collapsed. Buffer should look like this:

> * Headline 1
> * 2021
> * 2022...
> * Headline 4

3. Capture a second note: do M-x org-capture, type "c", and create the entry:

> **** Test entry 2

And press C-c C-c.

Now, an error appears: I observe two headlines running into each other
on the last line, like so:

> * Headline 1
> * 2021
> * 2022...
> ** 2022-07 July...
> *** 2022-07-11 Monday...
> **** Test entry 2...* Headline 4

Now, to produce the other issue. Shift-tab until all headlines are
collapsed again. Doing this a couple times will also fix the above
error, and the buffer should look like this now:

> * Headline 1
> * 2021
> * 2022...
> * Headline 4

Put the pointer at the start of the line "* Headline 4". Then press Enter.

A newline is placed above "* Headline 4", but also, the preceding
headline "* 2022", has been expanded, so the buffer looks like this to me:

> * Headline 1
> * 2021
> * 2022
> 
> ** 2022-07 July
> 
> *** 2022-07-11 Monday
> 
> **** Test entry 1
> 
> **** Test entry 2
> 
> 
> * Headline 4

However, I would instead expect to see the following:

> * Headline 1
> * 2021
> * 2022...
> 
> * Headline 4

Which is what I observe when org-fold-core-style is set to overlays.

Best,
Jack


[-- Attachment #2: init.el --]
[-- Type: text/plain, Size: 272 bytes --]

(add-to-list 'load-path "~/dev/org-mode/lisp")

(customize-set-variable
 'org-capture-templates
 '(("c" "capture" entry (file+olp+datetree
                         "~/dev/orgmode-devel/220711-folding-issues/test.org")
    "* %?"
    :empty-lines 1 :jump-to-captured t)))


[-- Attachment #3: test.org --]
[-- Type: text/plain, Size: 41 bytes --]


* Headline 1
* 2021
* 2022
* Headline 4

  reply	other threads:[~2022-07-12  6:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11 15:56 Recent folding issues Jack Kamm
2022-07-12  1:08 ` Ihor Radchenko
2022-07-12  6:17   ` Jack Kamm [this message]
2022-07-12 13:58     ` Ihor Radchenko
2022-07-13 14:50       ` Jack Kamm
2022-07-14 13:40         ` Ihor Radchenko
2022-07-19 13:21         ` Ihor Radchenko
2022-07-23 15:38           ` Jack Kamm
2022-07-12  4:30 ` William Denton

Reply instructions:

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871quqvorh.fsf@gmail.com \
    --to=jackkamm@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).