Benjamin McMillan <mcmilla...@gmail.com> writes:

> Ihor, I don't quite understand your remark about the two previous patches,
> are they something I need to take into account in this patch?

Yes. More specifically, you should make sure that the commits I linked
to are not broken by your patch.

> Although the commit only changes a couple of lines, there are large blocks
> whose indentation changes.
> The non-whitespace changes are
> 1) to add a without-restriction as soon as buffer switches to archive
> buffer.

> 3) Delete a call to widen, which had become redundant.

We cannot use `without-restriction' because it is only available since
Emacs 29, while we still support Emacs 28.

More importantly, this will likely break
44e7ed1a59c8587c2d5c3a54917576f1505a6c7b that purposely calls
`narrow-to-subtree'. Your `without-restriction' removes that
narrowing.

> 2) to wrap the call to org-fold-show-all in that buffer with an
> org-fold-core-save-visibility

If we look into bf09955fec57307616926959b31e19af42520db0, it introduced
`org-fold-show-all' to fix the following:

    The bug was this: when inserting an entry at the end of an archive
    buffer, the entry would get folded within the previous entry fold.
    This prevented the entry to get the proper DONE keyword when required.
    
    This change also kill the archive buffer after archiving.

I do not think that this bug is reported on the mailing list (at least,
I was unable to find anything), and, generally, folding state should not
affect todo keyword setting. So, we should likely just remove the call
to `org-fold-show-all'. But please double-check.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to