* Bug: headline folding broken by whitespace
@ 2020-10-31 15:06 Daniele Nicolodi
2020-10-31 16:28 ` Russell Adams
2020-10-31 16:49 ` Kyle Meyer
0 siblings, 2 replies; 10+ messages in thread
From: Daniele Nicolodi @ 2020-10-31 15:06 UTC (permalink / raw)
To: Org Mode List
Hello,
i saw a few reports of bugs related to folding and unfolding of
headlines recently, but I think this is not a duplicate.
I just noticed that with the latest release (Org mode version 9.4
(9.4-27-g47bf60-elpa @ /Users/daniele/.emacs.d/elpa/org-20201026/)
unfolding of headlines is broken by whitespace. In particular with a
buffer with this content:
* Foo
** Bar
bar bar bar+49 1520 7178926
* Baz
where the line before "* Baz" contains a single whitespace character,
the headline "* Foo" can be folded but cannot be unfolded. Removing the
whitespace while the headline is folded fixes the problem.
Cheers,
Dan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 15:06 Bug: headline folding broken by whitespace Daniele Nicolodi
@ 2020-10-31 16:28 ` Russell Adams
2020-10-31 16:44 ` Daniele Nicolodi
2020-10-31 16:53 ` Kyle Meyer
2020-10-31 16:49 ` Kyle Meyer
1 sibling, 2 replies; 10+ messages in thread
From: Russell Adams @ 2020-10-31 16:28 UTC (permalink / raw)
To: emacs-orgmode
On Sat, Oct 31, 2020 at 04:06:22PM +0100, Daniele Nicolodi wrote:
> I just noticed that with the latest release (Org mode version 9.4
> (9.4-27-g47bf60-elpa @ /Users/daniele/.emacs.d/elpa/org-20201026/)
> unfolding of headlines is broken by whitespace. In particular with a
> buffer with this content:
>
> * Foo
> ** Bar
> bar bar bar+49 1520 7178926
>
>
> * Baz
>
> where the line before "* Baz" contains a single whitespace character,
> the headline "* Foo" can be folded but cannot be unfolded. Removing the
> whitespace while the headline is folded fixes the problem.
I'm on Org mode version 9.4 (9.4-27-g47bf60-elpa) and tested, cannot
reproduce. Do you have something conflicting, or are you running an
Emacs distribution (ie: Doom, Space)?
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 16:28 ` Russell Adams
@ 2020-10-31 16:44 ` Daniele Nicolodi
2020-10-31 16:53 ` Kyle Meyer
1 sibling, 0 replies; 10+ messages in thread
From: Daniele Nicolodi @ 2020-10-31 16:44 UTC (permalink / raw)
To: emacs-orgmode
On 31/10/2020 17:28, Russell Adams wrote:
> On Sat, Oct 31, 2020 at 04:06:22PM +0100, Daniele Nicolodi wrote:
>> I just noticed that with the latest release (Org mode version 9.4
>> (9.4-27-g47bf60-elpa @ /Users/daniele/.emacs.d/elpa/org-20201026/)
>> unfolding of headlines is broken by whitespace. In particular with a
>> buffer with this content:
>>
>> * Foo
>> ** Bar
>> bar bar bar+49 1520 7178926
>>
>>
>> * Baz
>>
>> where the line before "* Baz" contains a single whitespace character,
>> the headline "* Foo" can be folded but cannot be unfolded. Removing the
>> whitespace while the headline is folded fixes the problem.
>
> I'm on Org mode version 9.4 (9.4-27-g47bf60-elpa) and tested, cannot
> reproduce. Do you have something conflicting, or are you running an
> Emacs distribution (ie: Doom, Space)?
Thank you for trying to reproduce the issue. Indeed if I try to
reproduce it with an Emacs without my customizations it works just fine.
I'm using Emacs 27.1 from here https://emacsformacosx.com/ I'm surprised
something in my configuration breaks this: I don't use anything fancy.
Cheers,
Dan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 16:28 ` Russell Adams
2020-10-31 16:44 ` Daniele Nicolodi
@ 2020-10-31 16:53 ` Kyle Meyer
1 sibling, 0 replies; 10+ messages in thread
From: Kyle Meyer @ 2020-10-31 16:53 UTC (permalink / raw)
To: emacs-orgmode
Russell Adams writes:
> On Sat, Oct 31, 2020 at 04:06:22PM +0100, Daniele Nicolodi wrote:
>> I just noticed that with the latest release (Org mode version 9.4
>> (9.4-27-g47bf60-elpa @ /Users/daniele/.emacs.d/elpa/org-20201026/)
>> unfolding of headlines is broken by whitespace. In particular with a
>> buffer with this content:
>>
>> * Foo
>> ** Bar
>> bar bar bar+49 1520 7178926
>>
>>
>> * Baz
>>
>> where the line before "* Baz" contains a single whitespace character,
>> the headline "* Foo" can be folded but cannot be unfolded. Removing the
>> whitespace while the headline is folded fixes the problem.
>
> I'm on Org mode version 9.4 (9.4-27-g47bf60-elpa) and tested, cannot
> reproduce. Do you have something conflicting, or are you running an
> Emacs distribution (ie: Doom, Space)?
If you try again, adding SPC on the line before Baz, you should see it
on the Org version you report.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 15:06 Bug: headline folding broken by whitespace Daniele Nicolodi
2020-10-31 16:28 ` Russell Adams
@ 2020-10-31 16:49 ` Kyle Meyer
2020-10-31 16:59 ` Daniele Nicolodi
1 sibling, 1 reply; 10+ messages in thread
From: Kyle Meyer @ 2020-10-31 16:49 UTC (permalink / raw)
To: Daniele Nicolodi; +Cc: Org Mode List
Daniele Nicolodi writes:
> Hello,
>
> i saw a few reports of bugs related to folding and unfolding of
> headlines recently, but I think this is not a duplicate.
I think you're referring to
https://orgmode.org/list/87h7qu10ht.fsf@eml.cc
https://orgmode.org/list/CAJj=8EFJXFu9ZQ11cO24AAu=1jykW2Zr+=R4FLuKG=bLjfUe+g@mail.gmail.com
The cases reported there are resolved by e8070d71a (Revert "org.el:
Allow empty subtrees to be folded back", 2020-10-26).
> I just noticed that with the latest release (Org mode version 9.4
> (9.4-27-g47bf60-elpa @ /Users/daniele/.emacs.d/elpa/org-20201026/)
> unfolding of headlines is broken by whitespace. In particular with a
> buffer with this content:
>
> * Foo
> ** Bar
> bar bar bar+49 1520 7178926
>
>
> * Baz
>
> where the line before "* Baz" contains a single whitespace character,
> the headline "* Foo" can be folded but cannot be unfolded. Removing the
> whitespace while the headline is folded fixes the problem.
Yep, with your test case (making sure to add a space on the line before
Baz), I can trigger the issue on your reported version (47bf6005b), and
it goes away with e8070d71a. So, it looks like the same underlying
problem and should go away with the next elpa bump.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 16:49 ` Kyle Meyer
@ 2020-10-31 16:59 ` Daniele Nicolodi
2020-10-31 17:58 ` Kyle Meyer
0 siblings, 1 reply; 10+ messages in thread
From: Daniele Nicolodi @ 2020-10-31 16:59 UTC (permalink / raw)
To: emacs-orgmode
On 31/10/2020 17:49, Kyle Meyer wrote:
> Daniele Nicolodi writes:
>
>> Hello,
>>
>> i saw a few reports of bugs related to folding and unfolding of
>> headlines recently, but I think this is not a duplicate.
>
> I think you're referring to
>
> https://orgmode.org/list/87h7qu10ht.fsf@eml.cc
> https://orgmode.org/list/CAJj=8EFJXFu9ZQ11cO24AAu=1jykW2Zr+=R4FLuKG=bLjfUe+g@mail.gmail.com
>
> The cases reported there are resolved by e8070d71a (Revert "org.el:
> Allow empty subtrees to be folded back", 2020-10-26).
>
>> I just noticed that with the latest release (Org mode version 9.4
>> (9.4-27-g47bf60-elpa @ /Users/daniele/.emacs.d/elpa/org-20201026/)
>> unfolding of headlines is broken by whitespace. In particular with a
>> buffer with this content:
>>
>> * Foo
>> ** Bar
>> bar bar bar+49 1520 7178926
>>
>>
>> * Baz
>>
>> where the line before "* Baz" contains a single whitespace character,
>> the headline "* Foo" can be folded but cannot be unfolded. Removing the
>> whitespace while the headline is folded fixes the problem.
>
> Yep, with your test case (making sure to add a space on the line before
> Baz), I can trigger the issue on your reported version (47bf6005b), and
> it goes away with e8070d71a. So, it looks like the same underlying
> problem and should go away with the next elpa bump.
This is funny. I have two emacs instances running: one with my
customizations and an emacs -Q one. The first exhibits the issue, the
second does not, matching what Russel reports.
By the way, how can I get a dump of org configuration similar to the one
org-submit-bug-report produces?
Cheers,
Dan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 16:59 ` Daniele Nicolodi
@ 2020-10-31 17:58 ` Kyle Meyer
2020-10-31 20:43 ` Russell Adams
0 siblings, 1 reply; 10+ messages in thread
From: Kyle Meyer @ 2020-10-31 17:58 UTC (permalink / raw)
To: Daniele Nicolodi; +Cc: emacs-orgmode
Daniele Nicolodi writes:
> This is funny. I have two emacs instances running: one with my
> customizations and an emacs -Q one. The first exhibits the issue, the
> second does not
If your emacs -Q session is just using the Org that comes with Emacs
27.1, it won't have the commit that introduced the regression: ee3c3b554
(org.el: Allow empty subtrees to be folded back, 2020-09-05). That was
part of the 9.3.8 release.
> matching what Russel reports.
As I mentioned elsewhere in the thread, my guess is that Russell was
using your example as is, rather than adding the space on the line
(where X is below).
--8<---------------cut here---------------start------------->8---
* Foo
** Bar
bar bar bar+49 1520 7178926
X
* Baz
--8<---------------cut here---------------end--------------->8---
If I use that example (with no custom configuration), the issue
(i.e. Foo won't unfold) starts with ee3c3b554 and goes away when that
commit is reverted in e8070d71a.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 17:58 ` Kyle Meyer
@ 2020-10-31 20:43 ` Russell Adams
2020-10-31 21:12 ` Kyle Meyer
0 siblings, 1 reply; 10+ messages in thread
From: Russell Adams @ 2020-10-31 20:43 UTC (permalink / raw)
To: emacs-orgmode
On Sat, Oct 31, 2020 at 01:58:25PM -0400, Kyle Meyer wrote:
> As I mentioned elsewhere in the thread, my guess is that Russell was
> using your example as is, rather than adding the space on the line
> (where X is below).
No. I added a space, and even used highlight-regexp to confirm all
spaces.
It did not occur for me.
------------------------------------------------------------------
Russell Adams RLAdams@AdamsInfoServ.com
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 20:43 ` Russell Adams
@ 2020-10-31 21:12 ` Kyle Meyer
2020-11-02 8:25 ` Richard Kim
0 siblings, 1 reply; 10+ messages in thread
From: Kyle Meyer @ 2020-10-31 21:12 UTC (permalink / raw)
To: emacs-orgmode
Russell Adams writes:
> On Sat, Oct 31, 2020 at 01:58:25PM -0400, Kyle Meyer wrote:
>> As I mentioned elsewhere in the thread, my guess is that Russell was
>> using your example as is, rather than adding the space on the line
>> (where X is below).
>
> No. I added a space, and even used highlight-regexp to confirm all
> spaces.
>
> It did not occur for me.
Well, then I'm out of guesses.
In any case, for those who can trigger the issue (using the example from
this thread as well as the examples from the related threads) on
ee3c3b554 up through 47bf6005b (as I can, with a vanilla Emacs 27.1),
e8070d71a should resolve it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: headline folding broken by whitespace
2020-10-31 21:12 ` Kyle Meyer
@ 2020-11-02 8:25 ` Richard Kim
0 siblings, 0 replies; 10+ messages in thread
From: Richard Kim @ 2020-11-02 8:25 UTC (permalink / raw)
To: emacs-orgmode
Kyle Meyer <kyle@kyleam.com> writes:
> Russell Adams writes:
>
>> On Sat, Oct 31, 2020 at 01:58:25PM -0400, Kyle Meyer wrote:
>>> As I mentioned elsewhere in the thread, my guess is that Russell was
>>> using your example as is, rather than adding the space on the line
>>> (where X is below).
>>
>> No. I added a space, and even used highlight-regexp to confirm all
>> spaces.
>>
>> It did not occur for me.
>
> Well, then I'm out of guesses.
>
> In any case, for those who can trigger the issue (using the example from
> this thread as well as the examples from the related threads) on
> ee3c3b554 up through 47bf6005b (as I can, with a vanilla Emacs 27.1),
> e8070d71a should resolve it.
I cannot trigger the problem on emacs 27.1 when it was launched with -q.
However I can trigger the issue on emacs 27.1 when spacemacs is used.
This is using latest org-mode package which I built from latest git
files.
The problem seems to be due in part to org-cycle-show-empty-lines which
is one of the functions in org-cycle-hook. I say this based on two
the observations that the problem goes away if either of these two
things are done:
1. Remove org-cycle-show-empty-lines from org-cycle-hook.
2. Set org-cycle-separator-lines (whose default value is 2) to some
large value, e.g., 5.
As far as I can tell the values of org-cycle-hook and
org-cycle-separator-lines are the same whether spacemacs is used or not.
Yet the problem is seen only on spacemacs. So it appears that some other
feature is used within spacemacs which interferes with
org-cycle-show-empty-lines. I have not been able to figure this out,
because there are just too many org related features enabled or
customized within spacemacs.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-11-02 8:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-31 15:06 Bug: headline folding broken by whitespace Daniele Nicolodi
2020-10-31 16:28 ` Russell Adams
2020-10-31 16:44 ` Daniele Nicolodi
2020-10-31 16:53 ` Kyle Meyer
2020-10-31 16:49 ` Kyle Meyer
2020-10-31 16:59 ` Daniele Nicolodi
2020-10-31 17:58 ` Kyle Meyer
2020-10-31 20:43 ` Russell Adams
2020-10-31 21:12 ` Kyle Meyer
2020-11-02 8:25 ` Richard Kim
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).