Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-16 Thread Bastien
Hi Miguel,

Miguel Morin  writes:

> I have no compelling reason to delete those lines, it just sometimes
> happens that I do delete when I do a quick capture, and then they
> wreak havoc in my main org buffer. No longer, thanks to you!

Glad the change can still whatever habits you have.

Best,

-- 
 Bastien



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-14 Thread Miguel Morin
I have no compelling reason to delete those lines, it just sometimes happens 
that I do delete when I do a quick capture, and then they wreak havoc in my 
main org buffer. No longer, thanks to you!

Miguel


On Tue, 11 Feb 2020 at 11:38 WET, Bastien wrote:

> Hi Miguel,
>
> Miguel Morin  writes:
>
>> delete newlines from the end of the org-capture buffer
>
> I can reproduce your problem when I do delete newlines
> from the end of the capture buffer, but I don't see why
> I would delete newlines.
>
> Is this just some casual cleanup on your side or do you
> have a compelling reason for deleting those lines?




Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-11 Thread Bastien
Hi Miguel,

Miguel Morin  writes:

> will insert "hello world!" at the beginning and end of the org buffer
> and not the org-capture buffer. I'm not sure if this is intended, and
> I never use this feature anyway. So I'm happy to close this matter
> here.

Okay, thanks for confirming the main issue is gone.

-- 
 Bastien



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-11 Thread Miguel Morin
Hi Bastien,

Yes, it works! I appreciate your work, thank you very much.

I tested the code with the Org 9.3.3 and confirm that the first issue I 
reported is fixed: now when I run `org-capture` and delete lines at the end of 
the org-capture buffer I cannot delete the newline that in the org buffer 
separates the capture item from the next heading.

The other issue I reported is still there, i.e. running this code:

```
(defun +org|insert-newlines ()
  (beginning-of-buffer) (insert "\nhello world!\n")
  (end-of-buffer) (insert "\nhello world!\n"))
+org|insert-newlines


(add-hook 'org-capture-before-finalize-hook #'+org|insert-newlines)
(+org|insert-newlines)
```

will insert "hello world!" at the beginning and end of the org buffer and not 
the org-capture buffer. I'm not sure if this is intended, and I never use this 
feature anyway. So I'm happy to close this matter here.

Miguel


On Wed, 05 Feb 2020 at 06:30 WET, Bastien wrote:

> Hi Miguel,
>
> I made a change in Org maint branch that could somehow impact the
> issue you reported.  Can you test and see if it does?
>
> Morin  writes:
>
>> In the course of fixing this, I found another bug in using the hook
>> `org-capture-before-finalize-hook`, which adds text at the beginning
>> and end of the org buffer and not in the beggining and end of the
>> capture item.
>
> If this is really another bug, please fill a different bug report for
> it, it helps us track all issues separately.
>
> Thanks,




Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-11 Thread Bastien
Hi Miguel,

Miguel Morin  writes:

> delete newlines from the end of the org-capture buffer

I can reproduce your problem when I do delete newlines
from the end of the capture buffer, but I don't see why
I would delete newlines.

Is this just some casual cleanup on your side or do you
have a compelling reason for deleting those lines?

-- 
 Bastien



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-04 Thread Bastien
Hi Miguel,

I made a change in Org maint branch that could somehow impact the
issue you reported.  Can you test and see if it does?

Morin  writes:

> In the course of fixing this, I found another bug in using the hook
> `org-capture-before-finalize-hook`, which adds text at the beginning
> and end of the org buffer and not in the beggining and end of the
> capture item.

If this is really another bug, please fill a different bug report for
it, it helps us track all issues separately.

Thanks,

-- 
 Bastien



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-01-11 Thread Miguel Morin
Hello,

For me, with my version, it is more than a visual problem. Before refiling, the 
Org buffer is:

```
* heading 1

** TODO test* heading 2

* heading 3
  
```

and after refiling to `heading 3`, it is:

```
* heading 1

* heading 3


** TODO test* heading 2
  
```

Doing `S-TAB` on the document does not change it in my version.

Regards,

Miguel

On Sat, 11 Jan 2020 at 15:58 WET, Nicolas Goaziou wrote:

> Hello,
>
> Miguel Morin  writes:
>
>> It's interesting that you are unable to reproduce the result. I have
>> Emacs 26.3 (9.0) on macOS Mojave 10.14.6. I have reproduced it with
>> `emacs -q`, so the problem is not my init file. Then I don't know what
>> the culprit is and am curious and available to try things to find it.
>
> OK. I can reproduce it. Actually, this is a _visual_ problem, the
> document is not mangled at all. If you do S-TAB on the document you will
> notice that everything is at the right place.
>
> I'm not saying there is no bug, but it is much less bad than I thought.
> I have no clue about the reason for this.
>
> Regards,




Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-01-11 Thread Samuel Wales
dunno if this is useful but i encounter mangled visibility all the
time.  concatenated headings and ellipsis at top of screen are the two
that i can think of that are most common.  undo-tree might cause the
concatenated headings.


On 1/11/20, Nicolas Goaziou  wrote:
> Hello,
>
> Miguel Morin  writes:
>
>> It's interesting that you are unable to reproduce the result. I have
>> Emacs 26.3 (9.0) on macOS Mojave 10.14.6. I have reproduced it with
>> `emacs -q`, so the problem is not my init file. Then I don't know what
>> the culprit is and am curious and available to try things to find it.
>
> OK. I can reproduce it. Actually, this is a _visual_ problem, the
> document is not mangled at all. If you do S-TAB on the document you will
> notice that everything is at the right place.
>
> I'm not saying there is no bug, but it is much less bad than I thought.
> I have no clue about the reason for this.
>
> Regards,
>
> --
> Nicolas Goaziou
>
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-01-11 Thread Nicolas Goaziou
Hello,

Miguel Morin  writes:

> It's interesting that you are unable to reproduce the result. I have
> Emacs 26.3 (9.0) on macOS Mojave 10.14.6. I have reproduced it with
> `emacs -q`, so the problem is not my init file. Then I don't know what
> the culprit is and am curious and available to try things to find it.

OK. I can reproduce it. Actually, this is a _visual_ problem, the
document is not mangled at all. If you do S-TAB on the document you will
notice that everything is at the right place.

I'm not saying there is no bug, but it is much less bad than I thought.
I have no clue about the reason for this.

Regards,

-- 
Nicolas Goaziou



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-01-09 Thread Miguel Morin
It's interesting that you are unable to reproduce the result. I have Emacs 26.3 
(9.0) on macOS Mojave 10.14.6. I have reproduced it with `emacs -q`, so the 
problem is not my init file. Then I don't know what the culprit is and am 
curious and available to try things to find it.

Miguel


On Thu, 09 Jan 2020 at 16:40 WET, Nicolas Goaziou wrote:

> Hello,
>
> Miguel Morin  writes:
>
>> I put "refiling" in the title as that is the moment when things go awry, so 
>> I noticed it when I refiled items.
>>
>> I updated Org to 9.3.1 and confirm that the bug is still present. Because I 
>> got some compatibility problems, I tested it with `emacs -q`, in which I 
>> didn't have email, and then drafted the email after reverting to the 
>> built-in 9.1.9.
>>
>> Below is the relevant part to reproduce the bug. What do you mean by
>> ECM? Error Correction Mode? Engineering Change Management?
>
> Complete Minimal Example, using French wording order, which is more or
> less what you did provide.
>
>> Start a file at `~/test.org` with:
>>
>> ```
>> * heading 1
>>
>> * heading 2
>>   
>> * heading 3
>> ```
>>
>> Set this capture template:
>>
>> ```
>> (setq org-capture-templates
>>   '(("t" "Todo" entry (file+headline "~/test.org" "heading 1")
>>   "* TODO %?\n")))
>> ```
>>
>> add a capture item, delete newlines from the end of the org-capture buffer, 
>> and refile to "heading 3". The heading next to the refiled item is gobbled 
>> and both the org-capture item and the gobbled "heading 2" move to "heading 
>> 3".
>>
>> [![Empty lines method, step 1 - create an org-capture item][1]][1]
>>
>> [![Empty lines method, step 2 - delete lines from end of org-capture 
>> buffer][2]][2]
>>
>> [![Empty lines method, step 3 - refile][3]][3]
>>
>>   [1]: https://i.stack.imgur.com/6cUlo.png
>>   [2]: https://i.stack.imgur.com/GPwg8.png
>>   [3]: https://i.stack.imgur.com/tzAJI.png
>
> FWIW, I cannot reproduce it with your recipe. Maybe someone else could.
>
> Regards,




Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-01-09 Thread Nicolas Goaziou
Hello,

Miguel Morin  writes:

> I put "refiling" in the title as that is the moment when things go awry, so I 
> noticed it when I refiled items.
>
> I updated Org to 9.3.1 and confirm that the bug is still present. Because I 
> got some compatibility problems, I tested it with `emacs -q`, in which I 
> didn't have email, and then drafted the email after reverting to the built-in 
> 9.1.9.
>
> Below is the relevant part to reproduce the bug. What do you mean by
> ECM? Error Correction Mode? Engineering Change Management?

Complete Minimal Example, using French wording order, which is more or
less what you did provide.

> Start a file at `~/test.org` with:
>
> ```
> * heading 1
>
> * heading 2
>   
> * heading 3
> ```
>
> Set this capture template:
>
> ```
> (setq org-capture-templates
>   '(("t" "Todo" entry (file+headline "~/test.org" "heading 1")
>"* TODO %?\n")))
> ```
>
> add a capture item, delete newlines from the end of the org-capture buffer, 
> and refile to "heading 3". The heading next to the refiled item is gobbled 
> and both the org-capture item and the gobbled "heading 2" move to "heading 3".
>
> [![Empty lines method, step 1 - create an org-capture item][1]][1]
>
> [![Empty lines method, step 2 - delete lines from end of org-capture 
> buffer][2]][2]
>
> [![Empty lines method, step 3 - refile][3]][3]
>
>   [1]: https://i.stack.imgur.com/6cUlo.png
>   [2]: https://i.stack.imgur.com/GPwg8.png
>   [3]: https://i.stack.imgur.com/tzAJI.png

FWIW, I cannot reproduce it with your recipe. Maybe someone else could.

Regards,

-- 
Nicolas Goaziou



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-01-08 Thread Miguel Morin
Hello,

I put "refiling" in the title as that is the moment when things go awry, so I 
noticed it when I refiled items.

I updated Org to 9.3.1 and confirm that the bug is still present. Because I got 
some compatibility problems, I tested it with `emacs -q`, in which I didn't 
have email, and then drafted the email after reverting to the built-in 9.1.9.

Below is the relevant part to reproduce the bug. What do you mean by ECM? Error 
Correction Mode? Engineering Change Management?

Regards,

Miguel

Start a file at `~/test.org` with:

```
* heading 1

* heading 2
  
* heading 3
```

Set this capture template:

```
(setq org-capture-templates
  '(("t" "Todo" entry (file+headline "~/test.org" "heading 1")
 "* TODO %?\n")))
```

add a capture item, delete newlines from the end of the org-capture buffer, and 
refile to "heading 3". The heading next to the refiled item is gobbled and both 
the org-capture item and the gobbled "heading 2" move to "heading 3".

[![Empty lines method, step 1 - create an org-capture item][1]][1]

[![Empty lines method, step 2 - delete lines from end of org-capture 
buffer][2]][2]

[![Empty lines method, step 3 - refile][3]][3]

  [1]: https://i.stack.imgur.com/6cUlo.png
  [2]: https://i.stack.imgur.com/GPwg8.png
  [3]: https://i.stack.imgur.com/tzAJI.png


On Thu, 02 Jan 2020 at 22:46 WET, Nicolas Goaziou wrote:

> Hello,
>
> Miguel Morin  writes:
>
>> TL;DR: starting a capture item and deleting the new lines at the end
>> of the capture buffer gobbles the next heading, and refiling moves the
>> gobbled heading along with the new capture item.
>
> I'm confused. Your bug title is about refiling, yet, all your message is
> about setting up capture in various ways.
>
> Could you update Org (Org 9.3.1 has been released last week) and try
> again? Also, could you provide an ECM demonstrating how to reproduce the
> issue in a simple way, not necessarily how you tried to work around
> it ? :)
>
> Thank you.
>
> Regards,




Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-01-02 Thread Nicolas Goaziou
Hello,

Miguel Morin  writes:

> TL;DR: starting a capture item and deleting the new lines at the end
> of the capture buffer gobbles the next heading, and refiling moves the
> gobbled heading along with the new capture item.

I'm confused. Your bug title is about refiling, yet, all your message is
about setting up capture in various ways.

Could you update Org (Org 9.3.1 has been released last week) and try
again? Also, could you provide an ECM demonstrating how to reproduce the
issue in a simple way, not necessarily how you tried to work around
it ? :)

Thank you.

Regards,

-- 
Nicolas Goaziou