emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cycling through TODO workflow joins the next line onto the current o


From: Kyle Meyer
Subject: Re: Cycling through TODO workflow joins the next line onto the current one
Date: Mon, 28 Sep 2020 23:22:59 -0400

Ihor Radchenko writes:

>> On my emacs 27, following demonstrates the problem.
>
> The patch is attached. It should fix the problem.

Thanks for the patch.

> Subject: [PATCH] Do not remove trailing newline when deleting planning info
>  line.
>
> * lisp/org.el (org-add-planning-info): Remove front newline instead of
> trailing newline when deleting planning info is completetly removed
> from a heading.  Fixes "Cycling through TODO workflow joins the next
> line onto the current one".
>
> The old behaviour affected folded headlines containing only planning
> info in the body:
>
> Before deletion:
> * DONE Headline<begin fold>
>   CLOSED: [2020-09-23 Wed 21:39]<end fold>
> * test
>
> After deletion:
> * DONE Headline<begin fold>
> <end fold>* test
>
> The newline after the first headline is hidden making both the
> headlines appear at the same visual line.
>
> New behaviour:
> After deletion:
> * DONE Headline
> * test
>
> All the folded text is completely removed.

Nicely explained, and appears to work well.  Applied (5d4c0f59d) with a
couple of minor tweaks to the commit message:

1:  8e776cca1 ! 1:  5d4c0f59d Do not remove trailing newline when deleting 
planning info line.
    @@ Metadata
     Author: Ihor Radchenko <yantar92@gmail.com>
     
      ## Commit message ##
    -    Do not remove trailing newline when deleting planning info line.
    +    Do not remove trailing newline when deleting planning info line
     
         * lisp/org.el (org-add-planning-info): Remove front newline instead of
    -    trailing newline when deleting planning info is completetly removed
    -    from a heading.  Fixes "Cycling through TODO workflow joins the next
    -    line onto the current one".
    +    trailing newline when planning info is completetly removed from a
    +    heading.
     
         The old behaviour affected folded headlines containing only planning
         info in the body:
    @@ Commit message
     
         All the folded text is completely removed.
     
    +    Reported-by: Krishan Kharagjitsing <krishan404@gmail.com>
    +    Ref: 
CAKXDJO2xUgBoTx-XcL7WbXyvP2Oj8iVEmdmRNCVzdRTEwzNR+Q@mail.gmail.com">https://orgmode.org/list/CAKXDJO2xUgBoTx-XcL7WbXyvP2Oj8iVEmdmRNCVzdRTEwzNR+Q@mail.gmail.com
    +
      ## lisp/org.el ##
     @@ lisp/org.el: (defun org-add-planning-info (what &optional time &rest 
remove)
         ;; If there is nothing more to add and no more keyword is



reply via email to

[Prev in Thread] Current Thread [Next in Thread]