* Bug: Append new heading when :END: exists
@ 2013-04-22 9:02 Muchenxuan Tong
2013-04-22 12:01 ` John Hendy
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Muchenxuan Tong @ 2013-04-22 9:02 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
1. Assume that the content is:
* Hello
:LOGBOOK:
- Note taken on [2013-04-22 Mon 16:57] \\
hello
:END:
2. Fold it, so that it becomes
* Hello…
3. Put the cursor at the end of the heading, and press M-RET or C-RET
* Hello…(here)
The new "*" will be in the beginning of :END:, which is incorrect.
[-- Attachment #2: Type: text/html, Size: 554 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-22 9:02 Bug: Append new heading when :END: exists Muchenxuan Tong
@ 2013-04-22 12:01 ` John Hendy
2013-04-22 18:57 ` Bastien
2013-04-22 15:40 ` Jeff Kowalczyk
2013-04-24 7:57 ` Bastien
2 siblings, 1 reply; 10+ messages in thread
From: John Hendy @ 2013-04-22 12:01 UTC (permalink / raw)
To: Muchenxuan Tong; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
On Apr 22, 2013 4:02 AM, "Muchenxuan Tong" <demon386@gmail.com> wrote:
>
> 1. Assume that the content is:
> * Hello
> :LOGBOOK:
> - Note taken on [2013-04-22 Mon 16:57] \\
> hello
> :END:
>
> 2. Fold it, so that it becomes
> * Hello…
>
> 3. Put the cursor at the end of the heading, and press M-RET or C-RET
> * Hello…(here)
>
> The new "*" will be in the beginning of :END:, which is incorrect.
>
This may be related to my post:
- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg70302.html
John
[-- Attachment #2: Type: text/html, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-22 9:02 Bug: Append new heading when :END: exists Muchenxuan Tong
2013-04-22 12:01 ` John Hendy
@ 2013-04-22 15:40 ` Jeff Kowalczyk
2013-04-22 18:48 ` Carsten Dominik
2013-04-24 7:57 ` Bastien
2 siblings, 1 reply; 10+ messages in thread
From: Jeff Kowalczyk @ 2013-04-22 15:40 UTC (permalink / raw)
To: emacs-orgmode
Sometime after 37f94d2 , a bug appeared which seems close to the thread
subject:
When in the body of a heading, and pressing meta-enter, message prints: 'not
in item'.
Reverting to 37f94d2 fixes.
Thanks,
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-22 15:40 ` Jeff Kowalczyk
@ 2013-04-22 18:48 ` Carsten Dominik
2013-04-22 20:01 ` John Hendy
0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2013-04-22 18:48 UTC (permalink / raw)
To: Jeff Kowalczyk; +Cc: emacs-orgmode
Hi Jeff,
thanks for the report - this should be fixed now.
- Carsten
On 22.4.2013, at 17:40, Jeff Kowalczyk <jtk@yahoo.com> wrote:
> Sometime after 37f94d2 , a bug appeared which seems close to the thread
> subject:
>
> When in the body of a heading, and pressing meta-enter, message prints: 'not
> in item'.
>
> Reverting to 37f94d2 fixes.
>
> Thanks,
> Jeff
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-22 12:01 ` John Hendy
@ 2013-04-22 18:57 ` Bastien
2013-04-23 1:23 ` Muchenxuan Tong
0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2013-04-22 18:57 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode, Muchenxuan Tong
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
I'm tempted to apply the following patch, as this problem falls under
the category of "inserting in an invisible region". I don't think it
breaks any non-interactive call of org-insert-heading, but this needs
further checking.
Also, note that the problem occurs only when there is no blank line
between the :END: and the following headline, so maybe the real fix
has to be within org-insert-heading...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org.el.patch --]
[-- Type: text/x-patch, Size: 464 bytes --]
diff --git a/lisp/org.el b/lisp/org.el
index 8c55bd4..4d16682 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7495,6 +7495,7 @@ and create a new headline with the text in the current line after point
When INVISIBLE-OK is set, stop at invisible headlines when going back.
This is important for non-interactive uses of the command."
(interactive "P")
+ (org-check-before-invisible-edit 'insert)
(cond
((or (= (buffer-size) 0)
(and (not (save-excursion
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-22 18:48 ` Carsten Dominik
@ 2013-04-22 20:01 ` John Hendy
2013-04-22 20:33 ` Bastien
0 siblings, 1 reply; 10+ messages in thread
From: John Hendy @ 2013-04-22 20:01 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Jeff Kowalczyk, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]
On Mon, Apr 22, 2013 at 1:48 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> Hi Jeff,
>
> thanks for the report - this should be fixed now.
For general headlines, this is fixed for me. I'm getting bad results
if there's a source code block in the headline, though. See attached
pics (in chronological order) showing what happens with a setup like
this:
* Heading
#+begin_src R
a <- 1 + 2
a
#+end_src
* Heading2
If I fold * Heading, =C-e= to the end of the line, and then M-RET, it
puts the asterisk at the end of the heading instead of creating a new
one. When I unfold, there's three dots after =#+end_src= and there's
the asterisk.
Also, I just tried this, and if there's no space or empty lines after
"Test", when I fold * Heading, the "t" appears after the folded
heading "..."
* Heading
#+begin_src R
a <- 1 + 2
a
#+end_src
Test
The last two screenshots are of that case.
I'm on Org-mode version 8.0.1 (release_8.0.1-15-g0fff0b).
John
>
> - Carsten
>
> On 22.4.2013, at 17:40, Jeff Kowalczyk <jtk@yahoo.com> wrote:
>
>> Sometime after 37f94d2 , a bug appeared which seems close to the thread
>> subject:
>>
>> When in the body of a heading, and pressing meta-enter, message prints: 'not
>> in item'.
>>
>> Reverting to 37f94d2 fixes.
>>
>> Thanks,
>> Jeff
>>
>>
>
>
[-- Attachment #2: 2013-04-22_145509.png --]
[-- Type: image/png, Size: 5801 bytes --]
[-- Attachment #3: 2013-04-22_145524.png --]
[-- Type: image/png, Size: 1777 bytes --]
[-- Attachment #4: 2013-04-22_145532.png --]
[-- Type: image/png, Size: 1806 bytes --]
[-- Attachment #5: 2013-04-22_145541.png --]
[-- Type: image/png, Size: 5914 bytes --]
[-- Attachment #6: 2013-04-22_150039.png --]
[-- Type: image/png, Size: 5250 bytes --]
[-- Attachment #7: 2013-04-22_150045.png --]
[-- Type: image/png, Size: 1621 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-22 20:01 ` John Hendy
@ 2013-04-22 20:33 ` Bastien
0 siblings, 0 replies; 10+ messages in thread
From: Bastien @ 2013-04-22 20:33 UTC (permalink / raw)
To: John Hendy; +Cc: Jeff Kowalczyk, emacs-orgmode, Carsten Dominik
Yes, this is the same problem than the one reported by Muchenxuan
Tong; a different problem than the one reported by Jeff, fixed.
(I will take a lot at the problem later on this week.)
I first wasn't able to reproduce those problems because I have
`org-special-ctrl-a/e' set to 'reversed, so C-e does not go after
the folded region -- maybe this should be the default behavior,
it would avoid a lot of these problems.
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-22 18:57 ` Bastien
@ 2013-04-23 1:23 ` Muchenxuan Tong
0 siblings, 0 replies; 10+ messages in thread
From: Muchenxuan Tong @ 2013-04-23 1:23 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 711 bytes --]
I checked the code of `org-insert-heading'.
One potential factor: when folded, and putting cursor and the end of
heading, the cursor is supposed to be
:END: (here)
and it's not judged as a heading.
On Tue, Apr 23, 2013 at 2:57 AM, Bastien <bzg@gnu.org> wrote:
> I'm tempted to apply the following patch, as this problem falls under
> the category of "inserting in an invisible region". I don't think it
> breaks any non-interactive call of org-insert-heading, but this needs
> further checking.
>
> Also, note that the problem occurs only when there is no blank line
> between the :END: and the following headline, so maybe the real fix
> has to be within org-insert-heading...
>
>
>
> --
> Bastien
>
>
[-- Attachment #2: Type: text/html, Size: 1644 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-22 9:02 Bug: Append new heading when :END: exists Muchenxuan Tong
2013-04-22 12:01 ` John Hendy
2013-04-22 15:40 ` Jeff Kowalczyk
@ 2013-04-24 7:57 ` Bastien
2013-04-24 8:31 ` Muchenxuan Tong
2 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2013-04-24 7:57 UTC (permalink / raw)
To: Muchenxuan Tong; +Cc: emacs-orgmode
Hi Muchenxuan,
Muchenxuan Tong <demon386@gmail.com> writes:
> 1. Assume that the content is:
> * Hello
> :LOGBOOK:
> - Note taken on [2013-04-22 Mon 16:57] \\
> hello
> :END:
>
> 2. Fold it, so that it becomes
> * Hello…
>
> 3. Put the cursor at the end of the heading, and press M-RET or C-RET
> * Hello…(here)
>
> The new "*" will be in the beginning of :END:, which is incorrect.
This is now fixed, along with the other problem reported by John for
* heading
#+begin_src sh
...
#+end_src
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Append new heading when :END: exists
2013-04-24 7:57 ` Bastien
@ 2013-04-24 8:31 ` Muchenxuan Tong
0 siblings, 0 replies; 10+ messages in thread
From: Muchenxuan Tong @ 2013-04-24 8:31 UTC (permalink / raw)
To: Bastien; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 701 bytes --]
Cool!
Thanks!
On Wed, Apr 24, 2013 at 3:57 PM, Bastien <bzg@gnu.org> wrote:
> Hi Muchenxuan,
>
> Muchenxuan Tong <demon386@gmail.com> writes:
>
> > 1. Assume that the content is:
> > * Hello
> > :LOGBOOK:
> > - Note taken on [2013-04-22 Mon 16:57] \\
> > hello
> > :END:
> >
> > 2. Fold it, so that it becomes
> > * Hello…
> >
> > 3. Put the cursor at the end of the heading, and press M-RET or C-RET
> > * Hello…(here)
> >
> > The new "*" will be in the beginning of :END:, which is incorrect.
>
> This is now fixed, along with the other problem reported by John for
>
> * heading
> #+begin_src sh
> ...
> #+end_src
>
> Thanks,
>
> --
> Bastien
>
[-- Attachment #2: Type: text/html, Size: 1260 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-04-24 8:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22 9:02 Bug: Append new heading when :END: exists Muchenxuan Tong
2013-04-22 12:01 ` John Hendy
2013-04-22 18:57 ` Bastien
2013-04-23 1:23 ` Muchenxuan Tong
2013-04-22 15:40 ` Jeff Kowalczyk
2013-04-22 18:48 ` Carsten Dominik
2013-04-22 20:01 ` John Hendy
2013-04-22 20:33 ` Bastien
2013-04-24 7:57 ` Bastien
2013-04-24 8:31 ` Muchenxuan Tong
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).